/* =============================================================
   pages/product.css  —  Product Detail Page Styles
   Loaded only on product pages via @push('styles')
   ============================================================= */

/* ── Product Gallery ─────────────────────────────────────────── */
.prd-gallery-wrap {
    max-width: 100%;
}

.prd-main-img-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f8f8;
    cursor: zoom-in;
    border: 1px solid var(--line, #eee);
}

.prd-main-img {
    width: 100%;
    height: 440px;
    object-fit: contain;
    display: block;
    transition: transform .35s ease;
}

@media (max-width: 767.98px) {
    .prd-main-img {
        height: 300px;
    }
}

.prd-main-img-wrap:hover .prd-main-img {
    transform: scale(1.03);
}

/* Zoom icon */
.prd-zoom-btn {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--line, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.prd-zoom-btn:hover {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

/* Thumbnail strip */
.prd-thumb-strip {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.prd-thumb-strip::-webkit-scrollbar {
    display: none;
}

.prd-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 2px solid var(--line, #eee);
    overflow: hidden;
    background: #f8f8f8;
    padding: 0;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}

.prd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

.prd-thumb:hover {
    border-color: var(--primary, #e53);
}

.prd-thumb.active {
    border-color: var(--primary, #e53);
    box-shadow: 0 0 0 3px rgba(229, 51, 51, .15);
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.prd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prd-lightbox[hidden] {
    display: none !important;
}

.prd-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    cursor: zoom-out;
}

.prd-lightbox-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
}

.prd-lb-img {
    max-width: 82vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    display: block;
    user-select: none;
    animation: lbFadeIn .2s ease;
}

@keyframes lbFadeIn {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.prd-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.prd-lb-close:hover {
    background: rgba(255, 255, 255, .25);
}

.prd-lb-nav {
    position: fixed;
    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, .2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 2;
}

.prd-lb-nav:hover {
    background: rgba(255, 255, 255, .25);
}

.prd-lb-prev {
    left: 20px;
}

.prd-lb-next {
    right: 20px;
}

.prd-lb-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
    background: rgba(0, 0, 0, .4);
    padding: 4px 14px;
    border-radius: 20px;
}

[data-naqshat-sale-part][hidden] {
    display: none !important;
}

/* Fill the viewer without cutting off artwork or measurement labels. */
.nq-product-layout .prd-lightbox { z-index: 100010; }
.nq-product-layout .prd-lightbox-backdrop { background: #080908 !important; }
.nq-product-layout .prd-lightbox-inner {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
}
.nq-product-layout .prd-lb-img {
    width: 100vw;
    height: auto;
    max-width: 100vw;
    max-height: calc(100dvh - 80px);
    border-radius: 0 !important;
    box-shadow: none !important;
}
.nq-product-layout .prd-lb-prev { left: 8px; right: auto; }
.nq-product-layout .prd-lb-next { right: 8px; left: auto; }
.nq-product-layout .prd-lb-counter { bottom: max(12px, env(safe-area-inset-bottom)); }

/* Keep the actual size controls next to the image on Naqshat phones. */
@media (max-width: 767.98px) {
    body.nq-mobile-product .section-page-title-single { display: none; }
    .nq-product-layout { padding: 10px 0 24px !important; }
    .nq-product-layout > .container { padding-inline: 12px; }
    .nq-product-layout > .container > .row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0 !important;
    }
    .nq-product-layout > .container > .row > .col-md-6,
    .nq-product-layout .tf-product-info-wrap,
    .nq-product-layout .tf-product-info-list,
    .nq-product-layout .tf-product-info-heading { display: contents; }
    .nq-product-layout .tf-zoom-main,
    .nq-product-layout .product-infor-cate { display: none; }
    .nq-product-layout .product-infor-name {
        order: 1;
        margin: 0 !important;
        font-size: clamp(17px, 4.6vw, 21px);
        line-height: 1.35;
    }
    .nq-product-layout .product-infor-price {
        order: 4;
        margin: 0 !important;
        gap: 9px;
    }
    .nq-product-layout .product-infor-price .price-on-sale { font-size: 22px; }
    .nq-product-layout .product-infor-price > p { font-size: 13px; }
    .nq-product-layout #productOptionPicker { order: 3; margin: 0 !important; }
    .nq-product-layout #productOptionPicker .option-group { margin-bottom: 0 !important; }
    .nq-product-layout #productOptionPicker .option-group > .d-flex { margin-bottom: 6px !important; }
    .nq-product-layout #productOptionPicker .option-group > .d-flex p { font-size: 13px !important; }
    .nq-product-layout #productOptionPicker [data-group-kind="variant"] .option-group-values {
        display: flex;
        gap: 7px;
    }
    .nq-product-layout #productOptionPicker [data-group-kind="variant"] .option-value-label {
        flex: 1 1 0;
        min-width: 0;
        margin: 0;
    }
    .nq-product-layout #productOptionPicker [data-group-kind="variant"] .option-value-card {
        min-width: 0;
        min-height: 56px;
        padding: 7px 4px;
        gap: 2px;
        border-radius: 10px;
    }
    .nq-product-layout #productOptionPicker [data-group-kind="variant"] .option-value-img,
    .nq-product-layout #productOptionPicker [data-group-kind="variant"] .naqshat-option-comparison { display: none; }
    .nq-product-layout #productOptionPicker .option-value-name { font-size: 13px; line-height: 1.25; }
    .nq-product-layout #productOptionPicker .option-value-price { font-size: 12px; line-height: 1.25; }
    .nq-product-layout .prd-gallery-wrap {
        order: 2;
        position: static !important;
        top: auto !important;
    }
    .nq-product-layout .prd-main-img { height: var(--nq-product-gallery-height, clamp(160px, 32svh, 320px)); }
    .nq-product-layout .prd-main-img-wrap:hover .prd-main-img { transform: none; }
    .nq-product-layout .prd-thumb-strip { margin-top: 6px; gap: 6px; }
    .nq-product-layout .prd-thumb { width: 38px; height: 38px; border-radius: 7px; }
    .nq-product-layout .nq-wall-ar { order: 5; margin: 0; margin-inline-end: 60px; }
    .nq-product-layout .nq-wall-ar__launch { padding: 8px 11px; min-height: 44px; }
    .nq-product-layout .nq-wall-ar__label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .nq-product-layout .nq-wall-ar__title { font-size: 13px; }
    .nq-product-layout .bundle-picker { order: 6; }
    .nq-product-layout .tf-product-variant { display: none; }
    .nq-product-layout .product-infor-desc {
        order: 7;
        margin: 12px 0 0 !important;
        padding-top: 18px;
        border-top: 1px solid var(--line, #e7e7e7);
        font-size: 14px;
        line-height: 1.8;
    }
    .nq-product-layout .product-infor-desc::before {
        content: attr(data-nq-description-title);
        display: block;
        margin-bottom: 9px;
        color: var(--text, #17210b);
        font-size: 17px;
        font-weight: 700;
    }
    .nq-product-layout .product-infor-meta { order: 8; margin: 0 !important; font-size: 11px; }
    body.nq-mobile-product {
        padding-bottom: calc(var(--nq-mobile-toolbar-height, 70px) + var(--nq-product-atc-height, 66px) + var(--nq-product-admin-height, 0px)) !important;
    }
    body.nq-mobile-product.naqshat-mobile-toolbar [data-naqshat-mobile-toolbar] {
        top: calc(var(--nq-mobile-toolbar-top) - var(--nq-product-admin-height, 0px));
    }
    body.nq-mobile-product .tf-sticky-btn-atc {
        top: var(--nq-product-atc-top, auto);
        bottom: auto !important;
        transform: none !important;
        transition: none;
        z-index: 190;
        border-top: 1px solid #e2e6d9;
        box-shadow: 0 -4px 16px #14260012;
    }
    body.nq-mobile-product .tf-sticky-btn-atc .tf-height-observer { padding: 8px 0; }
    body.nq-mobile-product .tf-sticky-atc-infos { width: 100%; }
    body.nq-mobile-product .tf-sticky-btn-atc .tf-product-info-quantity { gap: 8px; }
    body.nq-mobile-product .tf-sticky-btn-atc .wg-quantity { flex: 0 0 104px; height: 44px; }
    body.nq-mobile-product .tf-sticky-btn-atc .tf-btn { flex: 1 1 auto; min-width: 0; min-height: 44px; gap: 4px; padding: 9px; font-size: 13px; }
    body.nq-mobile-product.naqshat-mobile-toolbar .wa-float {
        top: var(--nq-product-wa-top, auto);
        bottom: auto !important;
        left: 12px;
        right: auto;
        width: 44px;
        height: 44px;
    }
    body.nq-mobile-product .wa-float svg { width: 25px; height: 25px; }
    body.nq-mobile-product.naqshat-mobile-keyboard .tf-sticky-btn-atc:not(:focus-within) { visibility: hidden; pointer-events: none; }
}

@media (max-width: 359.98px) {
    body.nq-mobile-product #naqshat-sticky-price,
    body.nq-mobile-product .nq-atc-separator { display: none; }
}
