/* ---------- Product detail page ---------- */
.pdp { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 60px; }
.pdp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.pdp-crumb a { color: var(--authority-blue); text-decoration: none; }
.pdp-crumb a:hover { text-decoration: underline; }
.pdp-crumb strong { color: var(--text); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pdp-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pdp-media {
  position: relative; margin: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 24px; padding: 48px 40px; display: grid; place-items: center;
  box-shadow: var(--shadow); min-height: 460px;
}
.pdp-media img { max-width: 100%; max-height: 480px; object-fit: contain; display: block; }
.pdp-badge {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  background: var(--authority-blue); color: #fff; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 7px 13px; border-radius: 999px;
}

.pdp-info { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.pdp-cat { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--authority-blue); }
.pdp-info h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin: 0; color: var(--text); letter-spacing: -0.01em; }
.pdp-lead { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.65; }

.pdp-rating { display: flex; align-items: center; gap: 10px; }
.pdp-stars { display: inline-flex; gap: 2px; }
.pdp-stars svg { width: 18px; height: 18px; }
.pdp-rating a { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.pdp-rating a:hover { color: var(--authority-blue); }

.pdp-price-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pdp-price { font-size: 2rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.pdp-stock { font-size: 0.82rem; font-weight: 600; color: var(--green-2); background: #e9f6ef; padding: 6px 12px; border-radius: 999px; }
.pdp-stock.out { color: #b42318; background: #fdecea; }

.pdp-status { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
.pdp-status.ok { background: #e9f6ef; border: 1px solid #bfe6d0; color: #14532d; }
.pdp-status.warn { background: #fef6e7; border: 1px solid #f3dfae; color: #7a4d00; }
.pdp-status.bad { background: #fdecea; border: 1px solid #f5c6c0; color: #7f1d1d; }
.pdp-status span { color: inherit; opacity: 0.85; }

.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.pdp-add { font-size: 1rem; padding: 14px 30px; border-radius: 14px; }
.pdp-add.added { background: var(--green-2); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }

.pdp-trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pdp-trust li { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.pdp-trust svg { width: 17px; height: 17px; flex: none; color: var(--authority-blue); }

.pdp-details { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; margin-top: 48px; }
.pdp-detail-block { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; }
.pdp-detail-block h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--text); }
.pdp-detail-block p { margin: 0; color: var(--muted); line-height: 1.7; }
.pdp-notes { display: flex; flex-direction: column; gap: 14px; }
.pdp-note strong { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--authority-blue); }
.pdp-note p { margin-top: 4px; }

.pdp-similar { margin-top: 48px; }
.pdp-similar .shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pdp-similar h2 { margin: 0; font-size: 1.3rem; color: var(--text); }
.pdp-similar-link { color: var(--authority-blue); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.pdp-similar-link:hover { text-decoration: underline; }
.pdp-similar-track { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.pdp-sim-card {
  scroll-snap-align: start; display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.pdp-sim-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pdp-sim-media { display: grid; place-items: center; height: 150px; padding: 18px; background: #fff; }
.pdp-sim-media img { max-width: 100%; max-height: 114px; object-fit: contain; }
.pdp-sim-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.pdp-sim-cat { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.pdp-sim-body strong { font-size: 0.86rem; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdp-sim-price { font-size: 0.92rem; font-weight: 700; color: var(--authority-blue); margin-top: 2px; }

@media (max-width: 900px) {
  .pdp-shell { grid-template-columns: 1fr; gap: 26px; }
  .pdp-media { min-height: 320px; padding: 30px 24px; }
  .pdp-media img { max-height: 320px; }
  .pdp-details { grid-template-columns: 1fr; margin-top: 34px; }
}
@media (max-width: 480px) {
  .pdp { width: calc(100% - 28px); padding-top: 16px; }
  .pdp-price { font-size: 1.6rem; }
  .pdp-similar-track { grid-auto-columns: 168px; }
}

.pdp [hidden] { display: none !important; }

.pdp-options { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.pdp-options > span { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--authority-blue); }
.pdp-option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-option { min-width: 58px; text-align: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 700; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pdp-option:hover { border-color: var(--authority-blue); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,30,105,.12); }
.pdp-option[aria-current="true"] { background: var(--authority-blue); border-color: var(--authority-blue); color: #fff; }
.pdp-media { background: radial-gradient(circle at 20% 15%, #eef4ff 0, #fff 42%, #f8fafc 100%); }
.pdp-info { position: sticky; top: 92px; }
@media (max-width:900px){ .pdp-info{position:static} }

/* Option picker + layout refinements */
.pdp-media { background: #fff; padding: 36px; }
.pdp-media img { width: 100%; height: auto; max-height: 460px; border-radius: 14px; }
.pdp-lead { font-size: 1rem; }
.pdp-picker { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.pdp-picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pdp-picker-head strong { font-size: .95rem; }
.pdp-picker-head span { font-size: .85rem; color: var(--authority-blue); font-weight: 700; }
.pdp-picker-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.pdp-chip { min-height: 44px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.pdp-chip:hover { border-color: var(--authority-blue); transform: translateY(-1px); }
.pdp-chip.is-on { background: var(--authority-blue); border-color: var(--authority-blue); color: #fff; }
.pdp-chip:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.pdp-picker-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; font-weight: 600; }
.pdp-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pdp-qty button { width: 42px; height: 42px; border: 0; background: #f8fafc; font-size: 1.15rem; cursor: pointer; color: var(--text); }
.pdp-qty output { min-width: 40px; text-align: center; font-weight: 700; }
.pdp-picker-err { margin: 0; color: #b42318; font-size: .86rem; font-weight: 600; }
.pdp-picker-lines { margin: 0; font-size: .84rem; color: var(--green-2); font-weight: 600; }
.pdp-picker-lines:empty { display: none; }
.pdp-picker.is-error { border-color: #f04438; animation: pdp-shake .35s ease; }
@keyframes pdp-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pdp-add { transition: background .2s ease, transform .15s ease; }
.pdp-add:active { transform: scale(.98); }
@media (max-width: 900px) { .pdp-media { padding: 22px; min-height: 0; } }
@media (max-width: 560px) {
  .pdp-actions { display: grid; grid-template-columns: 1fr; }
  .pdp-actions .button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .pdp-picker.is-error { animation: none; } }

.pdp-stock:not(.out) { color: #1e40af; }
#pdp-image { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: contain; }
@media (max-width: 900px) { .pdp-crumb { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; } .pdp-crumb strong { min-width: 0; flex: 0 1 auto; } }

/* Image zoom + gallery */
.pdp-zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; }
.pdp-zoom:focus-visible { outline: 3px solid #2f5bd3; outline-offset: 3px; }
.pdp-zoom-hint { position: absolute; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 999px; background: rgba(15, 30, 70, .78); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pdp-thumbs button { width: 64px; height: 64px; padding: 0; border-radius: 10px; border: 2px solid #e2e8f0; background: #fff; cursor: pointer; overflow: hidden; }
.pdp-thumbs button[aria-current="true"] { border-color: #1e3a8a; }
.pdp-thumbs button:focus-visible { outline: 3px solid #2f5bd3; outline-offset: 2px; }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: contain; }

/* reviews */
.pdp-reviews { margin: 40px 0 8px; padding: 24px; border: 1px solid #e5e9f0; border-radius: 14px; background: #fff; }
.pdp-rev-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pdp-rev-head h2 { margin: 0; font-size: 22px; }
.pdp-rev-write { min-height: 44px; padding: 0 18px; border: 1.5px solid #1e3a8a; border-radius: 10px; background: #fff; color: #1e3a8a; font: inherit; font-weight: 700; cursor: pointer; }
.pdp-rev-write:hover { background: #f1f5ff; }
.pdp-rev-summary { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pdp-rev-avg { font-size: 38px; line-height: 1; font-weight: 800; color: #0f172a; }
.pdp-rev-summary .pdp-stars svg { width: 22px; height: 22px; }
.pdp-rev-count { color: #475569; font-size: 14px; }
.pdp-rev-empty { margin: 0; color: #475569; }
.pdp-rev-thanks { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #ecfdf3; color: #14532d; font-weight: 600; }
.pdp-rev-form { display: grid; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef1f5; max-width: 560px; }
.pdp-rev-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.pdp-rev-stars legend { width: 100%; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
.pdp-rev-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pdp-rev-stars label { font-size: 34px; line-height: 1; color: #d9dde4; cursor: pointer; padding: 2px; }
.pdp-rev-stars input:checked ~ label, .pdp-rev-stars label:hover, .pdp-rev-stars label:hover ~ label { color: #f59e0b; }
.pdp-rev-stars input:focus-visible + label { outline: 3px solid #2f5bd3; outline-offset: 2px; border-radius: 6px; }
.pdp-rev-field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.pdp-rev-field input, .pdp-rev-field textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #cfd6e0; border-radius: 10px; font: inherit; font-weight: 400; font-size: 16px; }
.pdp-rev-field textarea { resize: vertical; min-height: 110px; }
.pdp-rev-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.pdp-rev-note { margin: 0; font-size: 13px; color: #64748b; }
.pdp-rev-msg { margin: 0; min-height: 0; font-size: 14px; }
.pdp-rev-msg.is-err { color: #b42318; font-weight: 600; }
.pdp-rev-send { justify-self: start; min-height: 46px; padding: 0 22px; border: 0; border-radius: 10px; background: #16a34a; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pdp-rev-send:disabled { opacity: .6; }
.pdp-rev-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.pdp-rev-item { padding: 16px 0; border-top: 1px solid #eef1f5; }
.pdp-rev-item p { margin: 8px 0 0; line-height: 1.55; color: #1f2937; overflow-wrap: anywhere; }
.pdp-rev-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pdp-rev-meta .pdp-stars svg { width: 16px; height: 16px; }
.pdp-rev-meta time { color: #64748b; }
.pdp-rev-reply { padding: 10px 12px; border-radius: 10px; background: #f6f8fb; font-size: 14px; }
@media (max-width: 640px) { .pdp-reviews { padding: 18px 16px; margin-top: 28px; } .pdp-rev-head h2 { font-size: 19px; } .pdp-rev-write { width: 100%; } }

/* Variant picker (color + size) */
.pdp-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-swatch { width: 52px; height: 52px; padding: 2px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pdp-swatch img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pdp-swatch.is-on { border-color: var(--authority-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.pdp-swatch:disabled { opacity: .35; cursor: not-allowed; }
.pdp-swatch:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.pdp-chip:disabled { color: #a3a9b3; background: #f4f6f9; text-decoration: line-through; cursor: not-allowed; transform: none; }
.pdp-qty button:disabled { opacity: .4; cursor: not-allowed; }
.pdp-picker-sum { margin: 0; font-size: .86rem; color: var(--muted, #5b6472); }
