/* ==========================================================================
   Product page (site/product) — built on tokens.css. Logical properties for RTL.
   ========================================================================== */

[v-cloak] { visibility: hidden; }
.ds-pdp { background: var(--ds-bg); color: var(--ds-ink); padding-block: 24px 64px; }
.ds-pdp__wrap { max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
.ds-pdp a:focus-visible, .ds-pdp button:focus-visible { outline: none; box-shadow: var(--ds-focus); }
[dir="rtl"] .ds-pdp__flip { transform: scaleX(-1); }

/* ---------- Top bar */
.ds-pdp__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.ds-pdp__crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ds-muted); min-width: 0; }
.ds-pdp__crumbs a { color: var(--ds-muted); }
.ds-pdp__crumbs a:hover { color: var(--ds-ink); }
.ds-pdp__back {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 16px;
    border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: #fff; color: var(--ds-ink); font-weight: 700;
}
.ds-pdp__back:hover { border-color: var(--ds-ink); color: var(--ds-ink); }

/* ---------- Layout */
.ds-pdp__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.ds-pdp__media { position: sticky; top: 16px; min-width: 0; }
.ds-pdp__info { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Gallery */
.ds-pdp__stage { aspect-ratio: 1 / 1; max-width: 100%; border-radius: var(--ds-radius-xl); background: #fff; border: 1px solid var(--ds-line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ds-pdp__stage img { width: 100%; height: 100%; object-fit: contain; }
.ds-pdp__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin-top: 12px; }
.ds-pdp__thumb {
    aspect-ratio: 1 / 1; padding: 0; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-line); background: #fff; overflow: hidden; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ds-pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ds-pdp__thumb[aria-pressed="true"] { border: 2px solid var(--ds-primary); }
.ds-pdp__thumb--video { background: var(--ds-ink); color: #fff; border-color: var(--ds-ink); }
.ds-pdp__thumb--video:hover { color: #fff; opacity: .9; }

/* ---------- Cards */
.ds-pdp__card { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); padding: 20px; }
.ds-pdp__card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.ds-pdp__card-head .ds-pdp__card-title { margin: 0; }
.ds-pdp__card-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.ds-pdp__muted { margin: 0; color: var(--ds-muted); font-size: 15px; }
.ds-pdp__kit { margin-top: 20px; }
.ds-pdp__kit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ds-pdp__btn { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border-radius: var(--ds-radius); font-weight: 700; }
.ds-pdp__badge-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ds-neutral-bg); color: var(--ds-ink); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Heading */
.ds-pdp__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 700; }
.ds-pdp__chips li { background: var(--ds-neutral-bg); padding: 4px 10px; border-radius: 999px; }
.ds-pdp__title { margin: 12px 0 0; font-size: 32px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; text-wrap: balance; }
.ds-pdp__summary { margin: 8px 0 0; color: var(--ds-text-2); line-height: 1.8; font-size: 16px; }
.ds-pdp__summary a { font-weight: 700; color: var(--ds-primary-text); white-space: nowrap; }
.ds-pdp__stock { align-self: flex-start; margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.ds-pdp__stock.is-in { background: var(--ds-success-bg); color: var(--ds-success); }
.ds-pdp__stock.is-low { background: var(--ds-warning-bg); color: var(--ds-warning); }
.ds-pdp__stock.is-out { background: var(--ds-danger-bg); color: var(--ds-danger); }
.ds-pdp__stock.is-neutral { background: var(--ds-neutral-bg); color: var(--ds-text-2); }

/* ---------- Countries */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cp-card {
    display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; text-align: start; font: inherit;
    border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius); background: #fff; cursor: pointer; color: var(--ds-ink);
}
.cp-card:hover { border-color: var(--ds-ink); }
.cp-card--active { border: 2px solid var(--ds-ink); padding: 7px 9px; background: var(--ds-bg-soft); }
.cp-flag { width: 24px; height: 17px; object-fit: cover; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.cp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-price { font-size: 13px; color: var(--ds-success); font-weight: 700; text-align: start; }
.cp-check { color: var(--ds-ink); flex-shrink: 0; }

/* ---------- Calculator */
.ds-pdp__calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-pdp__num { background: var(--ds-bg-soft); border-radius: var(--ds-radius-md); padding: 14px; min-width: 0; }
.ds-pdp__num > span { display: block; font-size: 14px; color: var(--ds-muted); font-weight: 600; }
.ds-pdp__num > b { display: block; margin-top: 4px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: start; }
.ds-pdp__num--qty { background: #fff; border: 2px solid var(--ds-ink); padding: 10px 12px; }
.ds-pdp__stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.ds-pdp__stepper button { width: 40px; height: 40px; flex: none; border-radius: var(--ds-radius); border: 1px solid var(--ds-line-strong); background: #fff; font-size: 22px; font-weight: 700; line-height: 1; color: var(--ds-ink); cursor: pointer; }
.ds-pdp__stepper button:disabled { opacity: .4; cursor: not-allowed; }
.ds-pdp__stepper input { width: 100%; min-width: 0; border: 0; text-align: center; font: inherit; font-size: 22px; font-weight: 800; background: transparent; color: var(--ds-ink); -moz-appearance: textfield; }
.ds-pdp__stepper input::-webkit-outer-spin-button, .ds-pdp__stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ds-pdp__stepper input:focus { outline: none; box-shadow: var(--ds-focus); border-radius: 6px; }
.ds-pdp__profit {
    margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border-radius: var(--ds-radius-md); padding: 14px 16px; background: var(--ds-success-bg); color: var(--ds-success);
}
.ds-pdp__profit.is-neg { background: var(--ds-danger-bg); color: var(--ds-danger); }
.ds-pdp__profit strong { display: block; font-size: 15px; }
.ds-pdp__profit small { display: block; font-size: 13px; margin-top: 2px; }
.ds-pdp__profit > b { font-size: 28px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-pdp__calc-note { margin-top: 10px; font-size: 14px; }
.ds-pdp__calc-note strong { color: var(--ds-ink); }

/* ---------- Variant choice */
.ds-pdp__opt + .ds-pdp__opt { margin-top: 16px; }
.ds-pdp__opt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ds-pdp__opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.step-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ds-ink); color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.color-swatch-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ds-line-strong); cursor: pointer; padding: 0; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; position: relative; transition: box-shadow .15s;
}
.color-swatch-btn:hover { box-shadow: 0 0 0 3px var(--ds-line); }
.color-swatch-btn.swatch-active { border-color: var(--ds-ink); box-shadow: 0 0 0 3px #fff inset, 0 0 0 2px var(--ds-ink); }
.color-swatch-btn.swatch-unavailable { opacity: .4; cursor: not-allowed; }
.color-swatch-btn.swatch-unavailable::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(-45deg, rgba(0,0,0,.25), rgba(0,0,0,.25) 1px, transparent 1px, transparent 5px); }
.swatch-check-icon { color: #fff; font-size: 1rem; text-shadow: 0 0 3px rgba(0, 0, 0, .6); pointer-events: none; }
.option-choice-btn {
    min-height: 44px; padding: 0 16px; border-radius: var(--ds-radius); border: 1px solid var(--ds-line-strong); background: #fff; color: var(--ds-ink);
    cursor: pointer; font: inherit; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
}
.option-choice-btn:hover { border-color: var(--ds-ink); }
.option-choice-btn.option-choice-active { border: 2px solid var(--ds-ink); padding: 0 15px; background: var(--ds-bg-soft); font-weight: 800; }
.option-choice-btn.option-choice-soldout { opacity: .55; cursor: not-allowed; text-decoration: line-through; }
.soldout-badge { font-size: 12px; background: var(--ds-neutral-bg); color: var(--ds-text-2); border-radius: 999px; padding: 1px 8px; font-weight: 700; text-decoration: none; }
.opt-price { font-size: 13px; color: var(--ds-success); font-weight: 700; }
.variant-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .25); flex-shrink: 0; }

.ds-pdp__alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: var(--ds-radius); font-weight: 700; font-size: 14px; animation: dsPdpIn .15s ease; }
.ds-pdp__alert:first-child { margin-top: 0; margin-bottom: 12px; }
.ds-pdp__alert--warn { background: var(--ds-warning-bg); color: var(--ds-warning); }
.ds-pdp__alert--bad { background: var(--ds-danger-bg); color: var(--ds-danger); }
.ds-pdp__alert--ok { background: var(--ds-success-bg); color: var(--ds-success); }
.ds-pdp__alert--ok a { color: var(--ds-success); text-decoration: underline; margin-inline-start: auto; }
@keyframes dsPdpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.ds-pdp__actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.ds-pdp__btn-lg { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--ds-radius-md); font-weight: 800; font-size: 16px; }
.ds-pdp__guest p { margin: 0; font-weight: 700; }
.ds-pdp__guest .ds-pdp__actions { border-top: 0; padding-top: 0; margin-top: 12px; }

/* ---------- Description / videos */
.ds-pdp__section { margin-top: 24px; }
.ds-pdp__section .ds-pdp__card-title { margin-bottom: 14px; }
.ds-pdp__desc { line-height: 1.9; color: var(--ds-text-2); max-width: 820px; overflow-wrap: anywhere; }
.ds-pdp__desc img { max-width: 100%; height: auto; border-radius: var(--ds-radius); }
.ds-pdp__videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 16px; }
.ds-pdp__videos .ratio { border-radius: var(--ds-radius-md); overflow: hidden; }

/* ---------- Sticky bar */
.ds-pdp-sticky { position: fixed; top: 0; inset-inline: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--ds-line); box-shadow: 0 8px 24px -16px rgba(20, 20, 20, .35); padding-top: env(safe-area-inset-top, 0px); }
.ds-pdp-sticky[hidden] { display: none; }
.ds-pdp-sticky__in { max-width: 1280px; margin-inline: auto; padding: 8px 24px; display: flex; align-items: center; gap: 12px; }
.ds-pdp-sticky__in img { width: 44px; height: 44px; border-radius: var(--ds-radius-sm); object-fit: cover; border: 1px solid var(--ds-line); }
.ds-pdp-sticky__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ds-pdp-sticky__txt strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-pdp-sticky__txt span { font-size: 14px; color: var(--ds-primary-text); font-weight: 800; text-align: start; }
.ds-pdp-sticky .btn { min-height: 44px; font-weight: 800; white-space: nowrap; }

/* ---------- Responsive */
@media (max-width: 991.98px) {
    .ds-pdp__grid { grid-template-columns: 1fr; gap: 24px; }
    .ds-pdp__media { position: static; }
    .ds-pdp__stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 575.98px) {
    .ds-pdp { padding-top: 12px; }
    .ds-pdp__wrap { padding-inline: 16px; }
    .ds-pdp__bar { margin-bottom: 12px; }
    .ds-pdp__back { display: none; }
    .ds-pdp__title { font-size: 24px; }
    .ds-pdp__card { padding: 16px; }
    .ds-pdp__calc { grid-template-columns: 1fr 1fr; }
    .ds-pdp__num--qty { grid-column: 1 / -1; }
    .ds-pdp__num > b { font-size: 19px; }
    .ds-pdp__profit > b { font-size: 24px; }
    .ds-pdp__actions { grid-template-columns: 1fr; }
    .ds-pdp__thumbs { display: flex; overflow-x: auto; }
    .ds-pdp__thumb { flex: 0 0 68px; }
    .ds-pdp-sticky__in { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ds-pdp__alert { animation: none; } }

/* Ad designer button + video cards */
.ds-pdp__studio { flex-basis: 100%; }
.ds-pdp__video { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ds-pdp__video video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.ds-pdp__video-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ds-pdp__video-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ds-text-2); }
.ds-pdp__video-tag .bi-youtube { color: #ff0000; }
.ds-pdp__video-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ds-pdp__video-bar .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Key facts + FAQ (AEO) */
.ds-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin: 0; }
.ds-facts__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--ds-line, #e7e5e4); margin-inline-end: 24px; }
.ds-facts dt { margin: 0; color: var(--ds-muted, #57534e); font-weight: 600; }
.ds-facts dd { margin: 0; font-weight: 800; text-align: end; }
.ds-faq { display: grid; gap: 8px; }
.ds-faq__item { border: 1px solid var(--ds-line, #e7e5e4); border-radius: 12px; background: #fff; }
.ds-faq__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 48px; }
.ds-faq__q::-webkit-details-marker { display: none; }
.ds-faq__q h3 { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.4; }
.ds-faq__q::after { content: '+'; flex: 0 0 auto; font-size: 1.25rem; font-weight: 700; color: var(--ds-muted, #57534e); }
.ds-faq__item[open] .ds-faq__q::after { content: '–'; }
.ds-faq__q:focus-visible { outline: 2px solid var(--ds-primary, #dc143c); outline-offset: 2px; border-radius: 12px; }
.ds-faq__a { padding: 0 16px 14px; color: var(--ds-ink, #1c1917); line-height: 1.7; }
@media (max-width: 575.98px) { .ds-facts__row { margin-inline-end: 0; } }
