/* Product detail — matches homepage blue / slate / soft purple */

.pd-page {
    --pd-bg: #f1f5f9;
    --pd-card: #ffffff;
    --pd-text: #0f172a;
    --pd-muted: #64748b;
    --pd-line: rgba(148, 163, 184, 0.35);
    --pd-blue: #3b82f6;
    --pd-indigo: #6366f1;
    --pd-purple: #8b5cf6;
    --pd-ok: #059669;
    --pd-danger: #dc2626;
    direction: rtl;
    text-align: right;
    font-family: iransans, yekan, Tahoma, sans-serif;
    color: var(--pd-text);
    padding-bottom: 0;
    /* Keep overflow visible so position:sticky on tabs works */
    overflow: visible;
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(99, 102, 241, 0.08), transparent 55%),
        radial-gradient(ellipse 50% 35% at 0% 20%, rgba(59, 130, 246, 0.06), transparent 50%),
        var(--pd-bg);
}

/* Body overflow-x:hidden breaks sticky; clip does not */
html:has(.pd-page),
body.main_body:has(.pd-page) {
    overflow-x: clip !important;
}

.pd-page a { text-decoration: none !important; }

.pd-top-title {
    margin: 0 0 10px;
    padding: 0 2px;
    font-family: yekan, iransans;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    color: #334155;
    text-align: right;
}

.pd-main-open {
    display: block;
    cursor: zoom-in;
}

.pd-main-open .pd-main-img {
    pointer-events: none;
}

.pd-wrap {
    padding-top: 12px;
    padding-bottom: 0;
}

/* Same width as homepage product rails (site container = 1360px on xl) */
.pd-page > .container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 576px) {
    .pd-page > .container { max-width: 540px; }
}
@media (min-width: 768px) {
    .pd-page > .container { max-width: 720px; }
}
@media (min-width: 992px) {
    .pd-page > .container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .pd-page > .container { max-width: 1360px; }
}

/* Match spacing used between other detail sections */
.pd-page .pd-section {
    margin-bottom: 12px;
}

.pd-page > .mpc-section {
    margin-top: 12px;
    margin-bottom: 12px;
    direction: ltr;
    text-align: initial;
    color: initial;
}

.pd-page > .mpc-section:last-of-type {
    margin-bottom: 0;
}

/* Sticky cart bar width */
.pd-sticky-cart-inner {
    width: 100%;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 576px) {
    .pd-sticky-cart-inner { max-width: 540px; }
}
@media (min-width: 768px) {
    .pd-sticky-cart-inner { max-width: 720px; }
}
@media (min-width: 992px) {
    .pd-sticky-cart-inner { max-width: 960px; }
}
@media (min-width: 1200px) {
    .pd-sticky-cart-inner { max-width: 1360px; }
}

/* Breadcrumb */
.pd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 4px 0 16px;
    font-size: 12px;
    color: var(--pd-muted);
    font-family: yekan, iransans;
}

.pd-breadcrumb a {
    color: #334155;
    font-weight: 700;
}

.pd-breadcrumb a:hover { color: var(--pd-indigo); }

.pd-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1;
}

.pd-breadcrumb .current {
    color: #475569;
    max-width: 100%;
}

/* Hero */
.pd-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.25fr);
    gap: 22px;
    align-items: start;
    background: var(--pd-card);
    border: 1px solid var(--pd-line);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    padding: 20px;
    margin-bottom: 16px;
}

.pd-gallery {
    position: relative;
}

.pd-gallery .product-main-image-wrap {
    background:
        radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08), transparent 50%),
        linear-gradient(180deg, #f8fafc, #fff);
    border: 1px solid var(--pd-line);
    border-radius: 16px;
    padding: 18px;
    overflow: hidden;
}

.pd-main-img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    margin: 0 auto;
    cursor: zoom-in;
}

.pd-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.pd-thumb {
    width: 58px;
    height: 58px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--pd-line);
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pd-thumb:hover,
.pd-thumb.is-active {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.pd-buybox {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.pd-title {
    margin: 0;
    font-family: yekan, iransans;
    font-size: 20px;
    line-height: 1.7;
    color: var(--pd-text);
}

.pd-title-en {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    direction: ltr;
    text-align: left;
    font-family: iransans, sans-serif;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    background: #f1f5f9;
    border: 1px solid var(--pd-line);
    color: #475569;
}

.pd-chip strong,
.pd-chip .val {
    color: var(--pd-indigo);
    font-weight: 700;
}

.pd-chip.ok {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.25);
    color: var(--pd-ok);
}

.pd-chip.bad {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
    color: var(--pd-danger);
}

.pd-chip.sku {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.25);
}

.pd-short {
    font-size: 13px;
    line-height: 1.9;
    color: var(--pd-muted);
    text-align: justify;
}

.pd-price-panel {
    margin-top: 4px;
    padding: 16px;
    border-radius: 16px;
    background:
        radial-gradient(ellipse 80% 80% at 100% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #1e1b4b 120%);
    color: #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
    text-align: center;
}

.pd-price-old {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    font-family: iransans;
    margin-bottom: 8px;
    text-align: center;
}

.pd-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    margin-bottom: 10px;
    border-radius: 7px;
    font-family: iransans, yekan, sans-serif;
    font-size: 12px;
    font-weight: 700;
    background: #e53935;
    color: #fff;
    line-height: 1.4;
}

.pd-price-main {
    font-size: 30px;
    font-family: iransans, BYekan;
    color: #fff;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-align: center;
}

.pd-price-main .unit {
    font-size: 13px;
    font-family: yekan, iransans;
    margin-right: 6px;
    color: #cbd5e1;
}

.pd-price-strike {
    font-size: 15px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 8px;
}

.pd-price-contact {
    font-size: 16px;
    color: #c4b5fd;
    font-family: yekan, iransans;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: yekan, iransans;
    font-size: 15px;
    transition: box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.pd-btn-primary {
    flex: 1 1 200px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 55%, #7c3aed 100%);
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.35);
}

.pd-btn-primary:hover {
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.45);
    color: #fff !important;
}

.pd-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0 !important;
}

.pd-btn-ghost:hover {
    border-color: rgba(167, 139, 250, 0.55);
    color: #c4b5fd !important;
    background: rgba(255, 255, 255, 0.12);
}

/* Compare stays as the small gallery icon only — no buy-box button */
.pd-actions .compare-toggle-btn {
    display: none !important;
}

.pd-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.pd-trust-item {
    text-align: center;
    padding: 12px 8px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--pd-line);
}

.pd-trust-item i {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #6366f1);
}

.pd-trust-item:nth-child(2) i { background: linear-gradient(145deg, #6366f1, #8b5cf6); }
.pd-trust-item:nth-child(3) i { background: linear-gradient(145deg, #1e3a8a, #3b82f6); }
.pd-trust-item:nth-child(4) i { background: linear-gradient(145deg, #7c3aed, #4f46e5); }

.pd-trust-item span {
    display: block;
    font-size: 12px;
    color: #475569;
    font-family: iransans;
}

/* Sticky section nav — stays at top while scrolling */
.pd-tabs,
#top_sticky_menu_id.pd-tabs {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 850;
    margin: 0 0 16px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

#top_sticky_menu_id.pd-tabs.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 10px;
    right: 10px;
    width: auto;
    margin: 0;
    border-radius: 12px;
    z-index: 860;
}

.pd-tabs-spacer {
    display: none;
    width: 100%;
}

.pd-tabs-spacer.is-active {
    display: block;
}

.pd-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 8px;
    border-radius: 10px;
    color: #cbd5e1 !important;
    font-family: yekan, iransans;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    transition: background .2s ease, color .2s ease;
}

.pd-tab:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #fff !important;
}

.pd-tab i { color: #a5b4fc; }

/* Content sections */
.pd-section {
    background: var(--pd-card);
    border: 1px solid var(--pd-line);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 12px;
    overflow: hidden;
}

.pd-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pd-line);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.pd-section-head h2,
.pd-section-head h3 {
    margin: 0;
    font-family: yekan, iransans;
    font-size: 17px;
    color: var(--pd-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pd-section-head h2 i,
.pd-section-head h3 i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #7c3aed);
    font-size: 14px;
}

.pd-section-head .sub {
    font-size: 13px;
    color: var(--pd-muted);
    font-family: iransans2, iransans;
}

.pd-section-body {
    padding: 18px;
    font-size: 14px;
    line-height: 2;
    color: #334155;
}

.pd-section-body.pd-desc {
    text-align: justify;
}

/* Pros / cons */
.pd-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
}

.pd-list-card {
    border-radius: 14px;
    border: 1px solid var(--pd-line);
    overflow: hidden;
    background: #fff;
}

.pd-list-card .hd {
    padding: 12px 14px;
    font-family: yekan, iransans;
    font-size: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-list-card.pros .hd {
    background: linear-gradient(90deg, #059669, #10b981);
}

.pd-list-card.cons .hd {
    background: linear-gradient(90deg, #dc2626, #f43f5e);
}

.pd-list-card ul {
    list-style: none;
    margin: 0;
    padding: 10px 14px 14px;
}

.pd-list-card li {
    position: relative;
    padding: 8px 0 8px 0;
    padding-right: 16px;
    font-size: 13px;
    line-height: 1.8;
    color: #475569;
    border-bottom: 1px dashed #e2e8f0;
}

.pd-list-card li:last-child { border-bottom: none; }

.pd-list-card li:before {
    content: '';
    position: absolute;
    right: 0;
    top: 16px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.pd-list-card.pros li:before { background: #10b981; }
.pd-list-card.cons li:before { background: #f43f5e; }

/* Specs */
.pd-specs {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 13px;
}

.pd-specs tr td {
    padding: 12px 14px;
    background: #f8fafc;
    border-top: 1px solid var(--pd-line);
    border-bottom: 1px solid var(--pd-line);
    vertical-align: top;
}

/* RTL: first cell is the right (label) side — keep outer right border */
.pd-specs tr td:first-child {
    width: 32%;
    color: #475569;
    font-weight: 700;
    border-right: 1px solid var(--pd-line);
    border-left: 1px solid var(--pd-line);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, #eef2ff, #f8fafc);
}

.pd-specs tr td:last-child {
    color: #0f172a;
    border-left: 1px solid var(--pd-line);
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.pd-section-body .pd-specs {
    margin: 0;
}

/* Comments */
.pd-comment-cta {
    text-align: center;
    padding: 8px 0 18px;
    color: var(--pd-muted);
    font-size: 14px;
}

.pd-comment-cta .pd-btn-primary {
    margin-top: 12px;
    display: inline-flex;
    flex: none;
}

.pd-comment {
    border: 1px solid var(--pd-line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
}

.pd-comment-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #eef2ff, #f1f5f9);
    font-size: 13px;
}

.pd-comment-meta .title {
    font-weight: 700;
    color: #1e293b;
}

.pd-comment-meta .who {
    color: var(--pd-muted);
}

.pd-comment-body {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.9;
    color: #334155;
    background: #fafafa;
}

.pd-comment-reply {
    padding: 0 14px 12px;
    font-size: 13px;
    color: #4338ca;
    background: #fafafa;
}

/* Lightbox */
#image-gallery .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

#image-gallery .modal-header,
#image-gallery .modal-footer {
    border: none;
    background: #0f172a;
    color: #fff;
}

#image-gallery .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#image-gallery .btn {
    border-radius: 10px;
}

/* Mobile sticky cart */
.pd-sticky-cart {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.25);
}

.pd-sticky-price {
    color: #fff;
    font-family: iransans;
    font-size: 16px;
    min-width: 0;
    flex: 1;
    text-align: center;
}

.pd-sticky-price .unit {
    font-size: 11px;
    color: #94a3b8;
    margin-right: 4px;
}

.pd-sticky-cart .pd-btn-primary {
    flex: 0 0 auto;
    padding: 11px 16px;
    font-size: 14px;
}

/* Login modal polish */
.pd-login-modal .modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
}

.pd-login-modal .modal-header {
    background: linear-gradient(90deg, #0f172a, #312e81);
    color: #fff;
    border: none;
}

.pd-login-modal .modal-header .close {
    color: #fff;
    opacity: .85;
    text-shadow: none;
}

.pd-login-modal .modal-body {
    padding: 20px;
    text-align: center;
}

@media screen and (max-width: 991px) {
    .pd-page {
        overflow: visible;
        max-width: 100%;
    }

    .pd-page > .container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .pd-hero {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
    }

    .pd-gallery,
    .pd-buybox {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .pd-main-img {
        max-height: 260px;
    }

    .pd-thumbs {
        gap: 6px;
        margin-top: 10px;
    }

    .pd-thumb {
        width: 52px;
        height: 52px;
    }

    .pd-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-proscons {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 10px;
    }

    .pd-tabs {
        display: flex;
        flex-wrap: nowrap;
        grid-template-columns: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 6px;
        margin: 0 0 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pd-tab {
        flex: 1 0 auto;
        white-space: nowrap;
        font-size: 12px;
        padding: 9px 10px;
        gap: 6px;
    }

    .pd-tab span { display: inline; }
}

@media screen and (max-width: 767px) {
    .pd-page {
        /* no large empty band above footer — sticky cart clearance goes on footer */
        padding-bottom: 0;
        overflow: visible;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Keep section tabs stuck at top of viewport while scrolling */
    .pd-tabs,
    #top_sticky_menu_id.pd-tabs {
        position: relative;
        top: auto;
        z-index: 850;
        margin-bottom: 10px;
    }

    #top_sticky_menu_id.pd-tabs.is-fixed {
        position: fixed !important;
        top: 8px !important;
        left: 10px;
        right: 10px;
        z-index: 860;
    }

    /* Clearance for fixed sticky cart lives inside footer (not a white gap above it) */
    body:has(.pd-sticky-cart) .site-footer {
        margin-top: 0 !important;
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    /* Avoid stacking body padding from compare bar + sticky cart (was a huge white gap) */
    body.has-compare-bar:has(.pd-sticky-cart) {
        padding-bottom: 0 !important;
    }

    body.has-compare-bar:has(.pd-sticky-cart) #compare_float_bar {
        bottom: 62px;
    }

    .pd-wrap {
        padding-top: 8px;
        padding-bottom: 0;
    }

    .pd-page > .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .pd-breadcrumb {
        margin: 0 0 10px;
        font-size: 11px;
        gap: 4px 6px;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pd-top-title {
        font-size: 13px;
        margin-bottom: 8px;
        line-height: 1.6;
        text-align: center;
    }

    .pd-breadcrumb .current {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .pd-hero {
        padding: 10px;
        border-radius: 14px;
        margin-bottom: 10px;
    }

    .pd-title {
        font-size: 15px;
        text-align: center;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .pd-title-en {
        text-align: center;
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .pd-meta {
        justify-content: flex-start;
    }

    .pd-chip {
        font-size: 11px;
        padding: 5px 10px;
    }

    .pd-short {
        text-align: right;
        text-align-last: right;
        max-width: 100%;
        overflow: hidden;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pd-short * {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .pd-short img {
        height: auto !important;
    }

    .pd-short ul,
    .pd-short ol {
        margin: 0;
        padding: 0 1.25em 0 0;
        text-align: right;
        list-style-position: outside;
    }

    .pd-short li {
        margin: 4px 0;
        overflow-wrap: anywhere;
    }

    .pd-short table {
        display: block;
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
    }

    .pd-price-panel {
        text-align: center;
        padding: 14px;
        border-radius: 14px;
        overflow: hidden;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pd-price-main {
        font-size: 22px;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .pd-price-strike {
        display: inline-block;
        margin: 0 0 6px;
        font-size: 13px;
    }

    .pd-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pd-actions form {
        flex: 1 1 auto !important;
        width: 100%;
        display: block !important;
    }

    .pd-actions .pd-btn,
    .pd-actions .compare-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .pd-trust {
        gap: 8px;
    }

    .pd-trust-item {
        padding: 10px 6px;
    }

    .pd-trust-item span {
        font-size: 11px;
    }

    .pd-section {
        margin-bottom: 10px;
        border-radius: 14px;
        max-width: 100%;
    }

    .pd-section-head {
        padding: 12px 12px;
        gap: 6px;
    }

    .pd-section-head h2,
    .pd-section-head h3 {
        font-size: 15px;
    }

    .pd-section-head .sub {
        font-size: 12px;
        width: 100%;
        overflow-wrap: anywhere;
    }

    .pd-section-body {
        padding: 12px;
        max-width: 100%;
        overflow-x: hidden;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .pd-section-body img,
    .pd-desc img {
        max-width: 100% !important;
        height: auto !important;
    }

    .pd-section-body table {
        width: 100% !important;
        max-width: 100%;
        display: block;
        overflow-x: auto;
    }

    /* Specs: stack label / value on mobile */
    .pd-specs,
    .pd-specs tbody {
        display: block;
        width: 100%;
    }

    .pd-specs tr {
        display: block;
        margin-bottom: 8px;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--pd-line);
    }

    .pd-specs tr td {
        display: block;
        width: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 10px 12px;
    }

    .pd-specs tr td:first-child {
        width: 100% !important;
        background: #eef2ff;
        font-size: 12px;
    }

    .pd-specs tr td:last-child {
        background: #f8fafc;
        font-size: 13px;
    }

    .pd-tabs {
        border-radius: 12px;
    }

    .pd-tab {
        flex: 0 0 auto;
        min-width: max-content;
    }

    .pd-comment-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .pd-sticky-cart {
        display: block;
        width: 100%;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }

    .pd-sticky-cart-inner {
        max-width: 100% !important;
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
        gap: 8px;
        align-items: center;
    }

    .pd-sticky-price {
        font-size: 14px;
        text-align: center;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 100%;
    }

    .pd-sticky-cart .pd-btn-primary {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .pd-page > .mpc-section {
        margin-top: 10px;
        margin-bottom: 8px;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .pd-page > .mpc-section:last-of-type {
        margin-bottom: 0;
    }

    /* Shrink gap between last product rail and site footer */
    body.main_body:not(:has(.pd-sticky-cart)) .site-footer {
        margin-top: 8px;
    }

    body.main_body:has(.pd-sticky-cart) .site-footer {
        margin-top: 0 !important;
    }

    .pd-page > .mpc-section .mpc-panel {
        padding: 10px 8px 12px;
    }

    .pd-page > .mpc-section .mpc-carousel,
    .pd-page > .mpc-section .owl-stage-outer {
        max-width: 100%;
    }
}

/* Fancybox above fixed mobile header (header z-index ~12050) */
.fancybox__container {
    --fancybox-zIndex: 13000;
    z-index: 13000 !important;
}

.fancybox__toolbar,
.fancybox__toolbar .f-button.is-close,
.fancybox__content > .f-button.is-close-btn {
    z-index: 13010 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
