/* ============================================================
   XSENSE — Product page styles (loads after styles.css)
   ============================================================ */

/* ---------- Breadcrumb + product nav ---------- */
.product-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.product-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .85rem;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--muted);
    transition: color .25s var(--ease);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.crumb-sep {
    opacity: .45;
}

.crumb-current {
    color: var(--text);
    font-weight: 600;
}

.product-prevnext {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pn-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}

.pn-btn:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Product summary ---------- */
.product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-sm);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.gallery-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(11, 14, 20, .55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.gallery-zoom:hover {
    background: var(--accent);
    transform: scale(1.08);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(11, 14, 20, .5);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s var(--ease), opacity .25s var(--ease);
    opacity: 0;
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--accent);
}

.gallery-nav.prev {
    left: 12px;
}

.gallery-nav.next {
    right: 12px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.thumb {
    flex: 1;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--surface-2);
    padding: 0;
    transition: border-color .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease);
    opacity: .7;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.thumb.active {
    border-color: var(--accent);
    opacity: 1;
}

/* Info column */
.product-info .product-cat {
    display: inline-block;
    margin-bottom: 10px;
}

.product-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.25;
    letter-spacing: -.02em;
    margin-bottom: 8px;
    text-wrap: balance;
}

.product-sku {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.product-sku b {
    color: var(--text);
}

.product-lead {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 12px;
}

.product-short {
    font-size: .95rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 22px;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.product-price-row .price {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--text);
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 700;
    color: #16a34a;
    background: rgba(22, 163, 74, .1);
    border: 1px solid rgba(22, 163, 74, .25);
    padding: 6px 14px;
    border-radius: 999px;
}

html[data-theme="dark"] .stock-badge {
    color: #4ade80;
    background: rgba(74, 222, 128, .12);
    border-color: rgba(74, 222, 128, .3);
}

/* Purchase row */
.purchase-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .95rem;
    transition: background-color .25s var(--ease), color .25s var(--ease);
}

.qty-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.qty-input {
    width: 52px;
    height: 48px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
}

.btn-dark {
    background: var(--text);
    color: var(--bg);
}

.btn-dark:hover {
    transform: translateY(-2px);
    opacity: .9;
}

html[data-theme="dark"] .btn-dark {
    background: #fff;
    color: #0b0e14;
}

.cart-btn,
.buy-btn {
    flex: 1;
    min-width: 150px;
}

/* Actions: compare / wishlist */
.product-actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
    transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}

.act-btn i {
    font-size: .95rem;
}

.act-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.act-btn.toggled {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
}

.act-btn.toggled:hover {
    color: #fff;
}

/* Share */
.share-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.share-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
}

.share-icons {
    display: flex;
    gap: 8px;
}

.share-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.share-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Visitors */
.visitors {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 999px;
}

.visitors i {
    color: var(--accent);
}

.visitors b {
    color: var(--text);
    font-size: 1rem;
}

/* ---------- Rich text (product details) ---------- */
.details .container {
    max-width: 1080px;
}

.details-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
}

.details-media {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--surface-2);
}

.details-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    .details-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.rich-text p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 20px;
}

.rich-text p:first-of-type::first-letter {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.6em;
    line-height: 1;
    float: left;
    margin: .08em .14em 0 0;
    color: var(--accent);
}

html[dir="rtl"] .rich-text p:first-of-type::first-letter {
    float: right;
    margin: .08em 0 0 .14em;
}

/* ---------- Split cards (features / accessories) ---------- */
.split-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
    max-width: 1080px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
}

.info-card-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.info-card-title i {
    color: var(--accent);
}

.check-list li {
    position: relative;
    padding: 8px 0 8px 30px;
    font-size: .93rem;
    color: var(--muted);
    line-height: 1.6;
    border-bottom: 1px dashed var(--border);
}

.check-list li:last-child {
    border-bottom: none;
}

.check-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--accent);
    font-size: .85rem;
}

html[dir="rtl"] .check-list li {
    padding: 8px 30px 8px 0;
}

html[dir="rtl"] .check-list li::before {
    left: auto;
    right: 0;
}

/* ---------- Video ---------- */
.video-frame {
    max-width: 860px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
    position: relative;
    background: var(--dark-0);
}

.video-frame .video-poster {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- In box ---------- */
.inbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.inbox-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.inbox-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.inbox-media {
    aspect-ratio: 1 / 1;
    background: var(--box-grad, linear-gradient(150deg, #2a1d10, #14100a));
}

.inbox-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inbox-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    padding: 18px 16px 22px;
}

/* ---------- Highlight blocks ---------- */
.highlights .container {
    max-width: 1080px;
}

.highlight-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin-bottom: 48px;
}

.highlight-block:last-child {
    margin-bottom: 0;
}

.highlight-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    margin-bottom: 14px;
}

.highlight-desc {
    font-size: .96rem;
    color: var(--muted);
    line-height: 1.8;
}

.highlight-media {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--hl-grad, linear-gradient(150deg, #1a130b, #0e0a06));
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-md);
}

.highlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-block--reverse .highlight-text {
    order: 2;
}

.highlight-block--reverse .highlight-media {
    order: 1;
}

/* ---------- Hotspots ---------- */
.hotspot-stage {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

/* The frame is the configurable box that holds .hotspot-img. Its size comes
   from the CSS custom properties injected by pages/product.php, which are
   themselves driven by the visual builder's hotspot image settings.
   --hs-w / --hs-h      : target box size
   --hs-min-* / --hs-max-* : clamps
   --hs-ratio           : aspect ratio (width / height) when locked */
.hotspot-frame {
    position: relative;
    width: var(--hs-w, 520px);
    max-width: min(100%, var(--hs-max-w, 900px));
    min-width: min(100%, var(--hs-min-w, 220px));
    margin: 0 auto;
    border-radius: var(--radius);
    /* The dots and their tooltips live inside the frame so their percentage
       coordinates are relative to the image box. overflow must stay visible
       so the tooltips are not clipped; the image itself is clipped below. */
    overflow: visible;
    background: var(--dark-0);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

/* Position presets — the frame itself is centered by default; these shift it
   within the available column without breaking the layout. */
.hotspot-frame--pos-left {
    margin-left: 0;
    margin-right: auto;
}

.hotspot-frame--pos-right {
    margin-left: auto;
    margin-right: 0;
}

/* --- Aspect modes --- */

/* auto: the image keeps its natural ratio and drives the frame height. */
.hotspot-frame--auto {
    height: auto;
}

/* square: a 1:1 box; the image is fitted inside it. */
.hotspot-frame--square {
    aspect-ratio: 1 / 1;
    height: auto;
}

/* rectangle: uses the configured ratio when available, otherwise the image's
   own ratio. Falls back to 4:3 when no ratio is set. */
.hotspot-frame--rectangle {
    aspect-ratio: var(--hs-ratio, 4 / 3);
    height: auto;
}

/* When a fixed height is configured, honour it (clamped) and let the ratio
   rules above be overridden by the explicit box. */
.hotspot-frame[style*="--hs-h:"] {
    height: var(--hs-h, auto);
}

/* The media wrapper is the positioning context for the dots. It shrinks to
   the image's rendered box so a stored percentage maps to the exact same
   point the visual builder used. */
.hotspot-media {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
}

.hotspot-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: var(--hs-fit, contain);
    /* The frame no longer clips (so tooltips can overflow), so the image
       carries the rounded corners itself. */
    border-radius: var(--radius);
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* In auto mode the image defines the height, so it must not be stretched. */
.hotspot-frame--auto .hotspot-img {
    height: auto;
    object-fit: contain;
}

/* Fixed-height mode: the image fills the box using the configured fit. */
.hotspot-frame--fixed .hotspot-img {
    height: 100%;
    object-fit: var(--hs-fit, contain);
}

/* Mobile: the frame always fits the viewport width and never overflows. */
@media (max-width: 640px) {
    .hotspot-frame {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

.hotspot-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    box-shadow: 0 4px 16px var(--accent-soft);
}

.hotspot-dot:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.hotspot-dot.open {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hotspot-sonar {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent);
    animation: hotspot-ping 2s var(--ease) infinite;
}

@keyframes hotspot-ping {
    0% {
        transform: scale(1);
        opacity: .8;
    }
    80%, 100% {
        transform: scale(2.1);
        opacity: 0;
    }
}

.hotspot-tip {
    position: absolute;
    z-index: 6;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
    pointer-events: none;
}

.hotspot-tip.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hotspot-tip h4 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.35;
    margin: 0 0 8px;
    /* Allow long titles to wrap cleanly onto multiple lines without
       overlapping the paragraph below or breaking mid-word. */
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.hotspot-tip p {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
}

/* Default tip placement — each tip is positioned ABOVE its own dot with a
   consistent 14px gap. The exact left/top are set inline by product.js based
   on the dot's own % position, so the box always tracks the dot it belongs to
   (including newly added points) instead of using hard-coded slots. */
.hotspot-tip {
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-100% - 14px));
}

.hotspot-tip.open {
    transform: translate(-50%, calc(-100% - 14px));
}

/* Reviews empty state */
.reviews-empty {
    text-align: center;
    padding: 48px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.reviews-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}
.reviews-empty-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.reviews-empty-text {
    color: var(--muted);
    max-width: 420px;
    margin: 0 auto;
    font-size: .95rem;
    line-height: 1.6;
}

/* ---------- Icon grid ---------- */
.icon-grid-section .container {
    max-width: 1080px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.icon-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}

.icon-item i {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform .3s var(--ease);
}

/* Uploaded image replacing the FontAwesome icon in an icon-item */
.icon-item-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform .3s var(--ease);
}
.icon-item:hover .icon-item-img {
    transform: scale(1.15);
}

.icon-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    color: var(--text);
}

.icon-item:hover i {
    transform: scale(1.15);
}

/* ---------- Reviews page ---------- */
.reviews-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 40px;
}

.rating-summary {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
}

.rating-big {
    text-align: center;
    margin-bottom: 22px;
}

.rating-number {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 8px;
}

.rating-stars {
    position: relative;
    display: inline-block;
    color: var(--gold);
    letter-spacing: 3px;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.rating-stars .stars-bg {
    color: var(--border);
    display: inline-block;
}

.rating-stars .stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    color: var(--gold);
}

html[dir="rtl"] .rating-stars .stars-fill {
    left: auto;
    right: 0;
}

.rating-total {
    font-size: .85rem;
    color: var(--muted);
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
    color: var(--muted);
}

.rating-bar-row .bar-label {
    min-width: 34px;
}

.rating-bar-row .bar-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.rating-bar-row .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #f59e0b);
    width: 0;
    transition: width .8s var(--ease);
}

.rating-bar-row .bar-count {
    min-width: 22px;
    text-align: left;
}

html[dir="rtl"] .rating-bar-row .bar-count {
    text-align: right;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-list .review-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
}

.review-list .review-quote {
    width: 100%;
}

.review-list .review-text {
    width: 100%;
}

/* Review form */
.review-form-wrap {
    max-width: 820px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(26px, 4vw, 40px);
    box-shadow: var(--shadow-sm);
}

.review-form-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.review-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .88rem;
    font-weight: 600;
}

.field--full {
    grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: .92rem;
    font-family: inherit;
    transition: border-color .25s var(--ease), background-color .25s var(--ease);
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(5, 7, 12, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox[hidden],
.video-embed[hidden] {
    display: none !important;
}

.lightbox img {
    max-width: min(92vw, 900px);
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s var(--ease), transform .25s var(--ease);
}

.lightbox-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s var(--ease);
}

.lightbox-nav:hover {
    background: var(--accent);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .icon-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }

    .reviews-layout {
        grid-template-columns: 1fr;
    }

    .rating-summary {
        position: static;
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .highlight-block {
        grid-template-columns: 1fr;
    }

    .highlight-block--reverse .highlight-text {
        order: 1;
    }

    .highlight-block--reverse .highlight-media {
        order: 2;
    }

    .inbox-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .icon-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .review-form-grid {
        grid-template-columns: 1fr;
    }

    .lightbox {
        padding: 16px;
    }

    .hotspot-tip {
        width: min(240px, 80vw);
    }

    /* Center tips on small screens with a consistent 14px gap above the dot */
    .hotspot-tip[data-tip="1"],
    .hotspot-tip[data-tip="2"] {
        left: 50%;
        top: 42.5%;
        transform: translate(-50%, calc(-100% - 14px));
    }

    .hotspot-tip[data-tip="3"],
    .hotspot-tip[data-tip="4"] {
        left: 50%;
        right: auto;
        top: 42.5%;
        bottom: auto;
        transform: translate(-50%, calc(-100% - 14px));
    }

    .hotspot-tip[data-tip="3"].open,
    .hotspot-tip[data-tip="4"].open,
    .hotspot-tip[data-tip="1"].open,
    .hotspot-tip[data-tip="2"].open {
        transform: translate(-50%, calc(-100% - 14px));
    }
}

@media (max-width: 480px) {
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-prevnext .pn-btn {
        width: 36px;
        height: 36px;
    }

    .cart-btn,
    .buy-btn {
        min-width: 100%;
        flex-basis: 100%;
    }

    .qty {
        flex: 1;
    }
}
