body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
}

/* Portrait block overlay */
#rotateMessage {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 18px;
    padding: 20px;
}

iframe {
    width: 100vw;
    height: 100vh;
    border: none;
}

.carousel-img.active {
    display: block !important;
}

.modal-content {
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
}

.modal.fade .modal-dialog {
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.modal.fade.show .modal-dialog {
    opacity: 1;
    transform: translateY(0);
}

.modal-body {
    max-height: none;
    overflow: hidden;
}

.modal-dialog.custom-modal {
    max-width: 90%;
}

/* ==============================================
   Side Panel Modals
   ============================================== */
.modal.modal-right-half .modal-dialog {
    position: fixed;
    top: 0;
    right: 0;
    width: 48vw;
    height: 100%;
    margin: 0;
    max-width: none;
}

#productDetailsModal.modal.modal-right-half .modal-dialog {
    width: 55vw !important;
}

.modal.modal-right-half .modal-content {
    height: 100%;
    border-radius: 0;
    overflow-y: auto;
}

/* Full width below 1100px */
@media (max-width: 1100px) {

    .modal.modal-right-half .modal-dialog,
    #productListModal.modal.modal-right-half .modal-dialog,
    #productDetailsModal.modal.modal-right-half .modal-dialog {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .modal.modal-right-half .modal-content,
    #productListModal.modal.modal-right-half .modal-content,
    #productDetailsModal.modal.modal-right-half .modal-content {
        height: 100vh !important;
        border-radius: 0 !important;
    }
}

/* ==============================================
   Color Boxes
   ============================================== */
.color-box {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.3s ease;
}

.color-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.color-box::after {
    content: attr(data-color);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    font-size: 0.8rem;
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-box:hover::after {
    opacity: 1;
}

.color-burgundy {
    background-color: #581845;
}

.color-antique-white {
    background-color: #f2e5d7;
}

.color-pewter {
    background-color: #7f7f7f;
}

.color-cherry {
    background-color: #8b0000;
}

.color-walnut {
    background-color: #5c4033;
}

.color-rich-tobacco {
    background-color: #4b2e2b;
}

.color-black {
    background-color: #000;
}

.color-antique-green {
    background-color: #8a9a5b;
}

/* ==============================================
   Buttons
   ============================================== */
.btn-outline-primary {
    font-size: 0.9rem;
    border-radius: 20px;
    transition: 0.2s ease-in-out;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
}

.btn-outline-light {
    color: #f7b801;
    border: 1px solid #f7b801;
}

.btn-outline-light:hover {
    color: #000;
    background-color: #f7b801;
}

.btn-close {
    filter: none;
    opacity: 1;
    color: #f7b801 !important;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: none;
    background: transparent;
}

.btn-close::before {
    content: '×';
}

.btn-close>svg {
    display: none;
}

/* ==============================================
   Product Card (Collection List)
   ============================================== */
.product-card .card {
    padding: 10px;
    border-radius: 12px;
}

#productListModal .row {
    align-items: stretch;
}

#productListModal .col-6 {
    display: flex;
    flex-direction: column;
}

/* Free Shipping badge */
.free-shipping-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #2ecc71;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
}

/* Carousel arrows — top aligned to center of 130px image */
.image-carousel {
    position: relative;
    display: inline-block;
    width: 100%;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 65px;
    /* half of 130px */
    transform: translateY(-50%);
    z-index: 10;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
    line-height: 1;
}

.carousel-prev {
    left: calc(50% - 77px);
}

.carousel-next {
    right: calc(50% - 77px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #f7b801;
    color: #000;
}

/* Thumb row */
.thumb-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 6px;
}

.thumb-row img {
    width: 25px;
    height: 25px;
    object-fit: cover;
    border-radius: 3px;
}

/* Review images (in collection cards) */
.review-images {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 6px;
}

.review-images img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ffffff22;
}

/* ── NEW: Judge.me stars on collection cards ── */
.product-card .card-stars {
    font-size: 0.8rem;
    line-height: 1;
    margin: 2px 0 4px;
    text-align: center;
    white-space: nowrap;
}

.product-card .card-stars-count {
    color: #aaa;
    font-size: 0.72rem;
}

/* Price row */
.product-card .price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
    margin-bottom: 4px;
    text-align: center;
}

.product-card .price-row .main-price {
    white-space: nowrap;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
    font-size: 15px !important;
}

.product-card .price-row .compare-price {
    white-space: nowrap;
    flex-shrink: 0;
    color: #aaa;
    text-decoration: line-through;
    font-size: 15px !important;
}

/* ==============================================
   Container Query — scale fonts with modal width
   ============================================== */
#productListModal .modal-content {
    container-type: inline-size;
    container-name: listmodal;
}

@container listmodal (max-width: 300px) {
    .product-card h6 {
        font-size: 0.60rem !important;
    }

    .product-card .main-price {
        font-size: 11px !important;
    }

    .product-card .compare-price {
        font-size: 11px !important;
    }
}

@container listmodal (min-width: 301px) and (max-width: 450px) {
    .product-card h6 {
        font-size: 0.65rem !important;
    }

    .product-card .main-price {
        font-size: 12px !important;
    }

    .product-card .compare-price {
        font-size: 12px !important;
    }
}

@container listmodal (min-width: 451px) and (max-width: 650px) {
    .product-card h6 {
        font-size: 0.72rem !important;
    }

    .product-card .main-price {
        font-size: 13px !important;
    }

    .product-card .compare-price {
        font-size: 13px !important;
    }
}

@container listmodal (min-width: 651px) {
    .product-card h6 {
        font-size: 0.82rem !important;
    }

    .product-card .main-price {
        font-size: 15px !important;
    }

    .product-card .compare-price {
        font-size: 15px !important;
    }
}

/* ==============================================
   Modal Themes
   ============================================== */
#productListModal .modal-content,
#productDetailsModal .modal-content {
    color: #fff;
    background-color: #3b2a1c;
}

#productListModal .modal-title,
#productDetailsModal .modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f7b801;
}

#productListModal .card,
#productDetailsModal .card {
    border: 1px solid #7a6a5a;
    border-radius: 10px;
    background-color: #2e1e14;
}

#productListModal .card-title,
#productListModal .card-text,
#productDetailsModal .card-title,
#productDetailsModal .card-text,
#productDetailsModal h4,
#productDetailsModal h5,
#productDetailsModal strong {
    color: #fff;
}

#productDetailsModal .text-muted {
    color: #ccc !important;
}

#productListModal .text-muted {
    color: #ccc !important;
}

/* Product Detail Modal — prices */
#productDetailsModal #modalSalePrice {
    color: #ff5c5c;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    font-weight: 700;
    white-space: nowrap;
}

#productDetailsModal #modalComparePrice {
    color: #aaa;
    font-size: clamp(0.8rem, 1.4vw, 0.95rem);
    text-decoration: line-through;
    white-space: nowrap;
}

#productDetailsModal .btn-warning {
    color: #000;
    font-weight: bold;
    border: none;
    background-color: #f7b801;
}

#productDetailsModal img {
    border: 1px solid #ffffff10;
}

#productDetailsModal .form-control,
#productDetailsModal .form-select {
    color: #fff;
    border: 1px solid #7a6a5a;
    background-color: #2e1e14;
}

#productDetailsModal .form-control:focus,
#productDetailsModal .form-select:focus {
    border-color: #f7b801;
    box-shadow: none;
}

/* Variant select gold arrow */
#productDetailsModal .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f7b801' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.25rem !important;
}

#productDetailsModal .badge.bg-secondary {
    color: #fff;
    background-color: #6c584c !important;
}

#productDetailsModal .modal-body {
    padding-bottom: 40px;
}

#productDetailsModal .description-toggle {
    border-top: 1px solid #7a6a5a;
    border-bottom: 1px solid #7a6a5a;
}

#productDetailsModal .modal-dialog {
    position: fixed !important;
    top: 0;
    right: 0;
    transform: none !important;
}

#productDetailsModal {
    touch-action: pan-y;
}

/* ==============================================
   Close Product button
   ============================================== */
/* #productDetailsModal .modal-header button[data-bs-dismiss="modal"] {
    font-size: 0.95rem !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    margin-top: -4px;
} */

/* ==============================================
   Main Image Wrapper (Product Detail)
   ============================================== */
.main-image-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-img-arrow {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 20;
}

.main-img-arrow:hover {
    background: rgba(247, 184, 1, 0.9);
    color: #000;
}

#mainProductImage {
    display: block;
    flex: 1;
    height: 320px !important;
    max-height: 320px !important;
    object-fit: contain;
    min-width: 0;
}

/* ==============================================
   Stock + Production Time
   ============================================== */
#productStock,
#productionTime {
    font-size: clamp(0.65rem, 1.2vw, 0.85rem);
    white-space: nowrap;
}

/* ==============================================
   Trusted Badge
   ============================================== */
#trustedBadgeBottom {
    text-align: center;
    padding: 15px 0 5px;
}

.trusted-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2e1e14;
    border: 1px solid #f7b801;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #f7b801;
    margin-top: 6px;
}

.trusted-box strong {
    color: #f7b801 !important;
}

/* ==============================================
   Payment Icons + Buttons
   ============================================== */
#paymentIcons {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.payment-icon {
    width: auto;
    height: 22px;
    padding: 3px 5px;
    object-fit: contain;
    border: 1px solid #ffffff22;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 0 4px #0003;
}

#shippingTaxBars>div>div {
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
}

.shop-pay-btn {
    background-color: #5a31f4 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
}

.shop-pay-btn img {
    height: 18px;
    border: none !important;
    background: transparent !important;
}

/* more-payment-btn removed from HTML — rule kept for safety */
.more-payment-btn {
    display: none !important;
}

/* ==============================================
   Thumbnails
   ============================================== */
#productThumbnails img {
    border: 2px solid #ffffff22;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    width: 65px;
    height: 65px;
    object-fit: cover;
}

#productThumbnails img:hover,
#productThumbnails img.active-thumb {
    border-color: #f7b801;
    transform: scale(1.07);
}

/* Review images — single scrollable line (mobile + desktop) */
#reviewImages {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

#reviewImages img,
#reviewImages .review-thumb {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ffffff22;
    cursor: pointer;
    transition: 0.2s;
}

#reviewImages img:hover {
    border-color: #f7b801;
    transform: scale(1.05);
}

/* ==============================================
   NEW: Reviews section title (Etsy + Judge.me headings)
   ============================================== */
.reviews-section-title {
    color: #f7b801;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-top: 1px solid #ffffff15;
    padding-top: 14px;
    margin-bottom: 8px;
}

/* ==============================================
   Etsy (Elfsight) widget container — DARK theme
   (Judge.me section jaisa, taake match kare)
   ============================================== */
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16 {
    max-height: 440px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    border-radius: 10px;
    background: #2e1e14;
    /* dark brown — baaki theme jaisa */
    border: 1px solid #ffffff10;
    padding: 12px;
}

/* widget ke andar ka text light kar do taake dark bg pe parhe */
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16,
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16 * {
    color: #eee !important;
}

/* Etsy widget ke andar light/white cards ko bhi dark karo */
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16 [class*="card"],
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16 [style*="background"] {
    background: #3b2a1c !important;
}

/* stars apna gold rang rakhein */
#etsyReviews .elfsight-app-ef61a078-440f-488b-b8fb-0785b5828f16 svg {
    fill: #f7b801 !important;
}

/* ==============================================
   Judge.me Reviews
   ============================================== */
#judgemeReviews {
    font-size: 0.78rem;
}

#judgemeReviews img {
    border: 1px solid #ffffff22;
    transition: transform 0.15s;
}

#judgemeReviews img:hover {
    transform: scale(1.06);
    border-color: #f7b801;
}

/* ==============================================
   Global Loader
   ============================================== */
#globalLoader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner-wrapper .spinner-border {
    width: 3rem;
    height: 3rem;
}

#productBadges .badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* ==============================================
   Responsive — Landscape Mobile
   ============================================== */
@media (max-width: 900px) and (orientation: landscape) {
    #productDetailsModal .modal-dialog {
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    #productDetailsModal .modal-content {
        height: 100vh !important;
        border-radius: 0 !important;
        padding: 8px !important;
    }

    #productDetailsModal .row {
        flex-wrap: nowrap !important;
    }

    #productDetailsModal .col-md-6:first-child {
        flex: 0 0 42% !important;
        max-width: 42% !important;
    }

    #productDetailsModal .col-md-6:last-child {
        flex: 0 0 58% !important;
        max-width: 58% !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #mainProductImage {
        height: 200px !important;
        max-height: 200px !important;
        padding: 0 !important;
    }

    #productThumbnails {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        gap: 5px;
    }

    #productThumbnails img {
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0;
    }

    #modalSalePrice {
        font-size: 16px !important;
    }

    .addToCartBtn {
        padding: 8px !important;
        font-size: 12px !important;
    }

    .payment-icon {
        height: 20px !important;
    }

    #collapseDesc {
        max-height: 150px;
        overflow-y: auto;
    }
}

@media (max-width: 900px) {
    .modal.fade .modal-dialog {
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 767px) {
    #productDetailsModal .row {
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    #productDetailsModal .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    #productDetailsModal .modal-body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    #mainProductImage {
        height: 220px !important;
        max-height: 220px !important;
        margin-bottom: 0 !important;
    }
}

/* ==============================================
   Close Collection button — bigger on mobile
   ============================================== */
@media (max-width: 768px) {
    /* #productListModal .modal-header button[data-bs-dismiss="modal"] {
        font-size: 1.05rem !important;
        padding: 12px 28px !important;
        border-radius: 30px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
    } */
}

/* ==============================================
   iFrame Controls
   ============================================== */
#iframeControls {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9000;
    display: flex;
    gap: 8px;
    transition: opacity 0.3s ease;
}

#iframeControls.hidden-by-modal {
    opacity: 0;
    pointer-events: none;
}

#iframeControls button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #f7b801;
    background: rgba(0, 0, 0, 0.75);
    color: #f7b801;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s, transform 0.15s;
}

#iframeControls button:hover {
    background: #f7b801;
    color: #000;
    transform: scale(1.08);
}

#chatBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9000;
    width: 58px;
    height: 58px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.3s ease;
}

#chatBtn:hover {
    background: #fff;
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

#chatBtn.hidden-by-modal {
    opacity: 0;
    pointer-events: none;
}

/* ── Production time "?" tooltip ── */
.prod-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

.prod-tip-box {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 210px;
    max-width: 60vw;
    background: #1c1c1c;
    color: #fff;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    line-height: 1.55;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    z-index: 99999;
    white-space: normal;
}

/* niche teer (arrow) jo ? ki taraf point kare */
.prod-tip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 9px;
    border: 6px solid transparent;
    border-top-color: #1c1c1c;
}

.prod-tip:hover .prod-tip-box,
.prod-tip:focus .prod-tip-box,
.prod-tip.show .prod-tip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   AUTO LANDSCAPE — rotate the entire page in portrait mode
   ═══════════════════════════════════════════════════════ */
#rotateMessage {
    display: none !important;
}

@media screen and (orientation: portrait) and (max-width: 1024px) {
    body {
        position: fixed;
        overflow: hidden;
        width: 100vh;
        height: 100vw;
        top: calc(50vh - 50vw);
        left: calc(50vw - 50vh);
        transform-origin: center center;
        transform: rotate(90deg);
    }
}

@media screen and (orientation: portrait) and (max-width: 1366px) {
    body {
        position: fixed;
        overflow: hidden;
        width: 100vh;
        height: 100vw;
        top: calc(50vh - 50vw);
        left: calc(50vw - 50vh);
        transform-origin: center center;
        transform: rotate(90deg);
    }

    #app {
        width: 100vh !important;
        height: 100vw !important;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE PORTRAIT (body rotate 90deg) — modals ko full
   rotated viewport do. Rotated body ki width = 100vh aur
   height = 100vw hoti hai, isliye normal vw/vh swap karte
   hain warna modal chhota / side mein sikud kar aata hai.
   ═══════════════════════════════════════════════════════ */
@media screen and (orientation: portrait) and (max-width: 1366px) {

    /* dono modals — units swap (rotated body ke hisaab se) */
    #productListModal.modal.modal-right-half .modal-dialog,
    #productDetailsModal.modal.modal-right-half .modal-dialog,
    .modal.modal-right-half .modal-dialog {
        width: 100vh !important;
        /* rotated body ki width */
        height: 100vw !important;
        /* rotated body ki height */
        max-width: 100vh !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        margin: 0 !important;
    }

    #productListModal.modal.modal-right-half .modal-content,
    #productDetailsModal.modal.modal-right-half .modal-content,
    .modal.modal-right-half .modal-content {
        height: 100vw !important;
        /* rotated body ki height */
        border-radius: 0 !important;
    }

    /* product modal — image left + info right (landscape jaisa) */
    #productDetailsModal .row {
        flex-wrap: nowrap !important;
    }

    #productDetailsModal .col-md-6:first-child {
        flex: 0 0 42% !important;
        max-width: 42% !important;
    }

    #productDetailsModal .col-md-6:last-child {
        flex: 0 0 58% !important;
        max-width: 58% !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #mainProductImage {
        height: 200px !important;
        max-height: 200px !important;
    }
}

/* Custom Dropdown */
.csd-wrapper {
    position: relative;
    user-select: none;
    z-index: 100;
}

.csd-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #2e1e14;
    border: 1px solid #7a6a5a;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.csd-selected:hover,
.csd-wrapper.open .csd-selected {
    border-color: #f7b801;
}

.csd-arrow {
    color: #f7b801;
    font-size: 1rem;
    transition: transform 0.2s;
    pointer-events: none;
}

.csd-wrapper.open .csd-arrow {
    transform: rotate(180deg);
}

.csd-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1e110a;
    border: 1px solid #f7b801;
    border-radius: 6px;
    overflow-y: auto;
    max-height: 220px;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.csd-option {
    padding: 10px 14px;
    color: #ddd;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #ffffff10;
}

.csd-option:last-child {
    border-bottom: none;
}

.csd-option:hover {
    background: #3b2a1c;
    color: #fff;
}

.csd-option.selected {
    color: #f7b801;
    font-weight: 600;
}

.csd-option.selected::before {
    content: '✓ ';
}

/* ==============================================
   Floating X close — dono modals (overlay top-right)
   ============================================== */
.modal-close-x {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 30;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #f7b801;
    border-radius: 50%;
    color: #f7b801;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    /* modal-dialog pe pointer-events:none hota hai */
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: background .2s, color .2s, transform .15s;
}

.modal-close-x:hover {
    background: #f7b801;
    color: #000;
    transform: scale(1.08);
}

/* title corner X ke neeche na chhupe (desktop split view) */
#productDetailsModal #modalProductTitle {
    padding-right: 54px;
}

/* ==============================================
   Product Detail (desktop) — LEFT images sticky, RIGHT column scrolls
   Client req: right column scroll ho, left (images) move na ho.
   ============================================== */
@media (min-width: 768px) {

    /* scroll sirf modal-content pe rakho — body ka apna scroll band */
    #productDetailsModal .modal-content {
        overflow-y: auto;
    }

    #productDetailsModal .modal-body {
        overflow: visible;
    }

    /* columns ko top-align — warna left col stretch hoke sticky bekaar */
    #productDetailsModal .modal-body>.row {
        align-items: flex-start;
    }

    /* LEFT column (images) — top pe sticky rahe; apna scrollbar NA aaye */
    #productDetailsModal .modal-body .col-md-6:first-child {
        position: sticky;
        top: 0;
        align-self: flex-start;
    }
}

/* ==============================================
   Variant dropdown — neeche content ke OOPAR float kare
   (sticky/overflow ki wajah se clip ho raha tha)
   ============================================== */
#productDetailsModal #variantOptions,
#productDetailsModal #variantOptions .col-12,
#productDetailsModal #variantOptions .csd-wrapper {
    overflow: visible !important;
}

#productDetailsModal .csd-wrapper.open {
    z-index: 9999;
}

.csd-dropdown {
    z-index: 99999 !important;
    /* sab content ke oopar */
}
