.product-detail{
    padding:60px 0;
    background:var(--background);
}

.product-detail .container{
    max-width:1600px;
    margin:auto;
}

/* GRID */
.product-detail-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
}

/* LEFT */
.product-gallery{
    display:flex;
    flex-direction:column;
    align-items:center;
}

/**
    * PRODUCT CARD (FOR RELATED PRODUCTS)
    */
    /* LENS */
.lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 3px solid #FFFFFF;
    outline: 1px solid var(--accent);
    border-radius: 50%;
    display: none;
    pointer-events: none;
    background-repeat: no-repeat;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 
                inset 0 0 15px rgba(255, 255, 255, 0.4),
                inset 0 0 30px rgba(201, 162, 39, 0.2); 
    z-index: 10;
}

/* REMOVE OLD SCALE ZOOM */
.main-image:hover img {
    transform: none;
}

/* MODAL ZOOM */
.zoomable {
    cursor: zoom-in;
    transition: transform 0.2s ease-out;
}

/* MAIN IMAGE */
.main-image{
    width:100%;
    max-width:500px;
    height:400px;
    border-radius:16px;

    background: var(--background);
    border: 1px solid rgba(201, 162, 39, 0.15);
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
    position: relative;
    display: flex;
    overflow:hidden;
    cursor:crosshair;
    justify-content: center;
}

.main-image img{
    width:100%;
    height:100%;
    object-fit: contain;
    padding: 15px;  
    transition: 0.3s ease;
}

/* ZOOM EFFECT */
/* .main-image:hover img{
    transform:scale(1.4);
} */

/* THUMBNAILS */
.thumbnail-list{
    display:flex;
    gap:12px;
    margin-top:15px;
}

.thumbnail-list img{
    width:80px;
    height:80px;
    object-fit:cover;
    border-radius:10px;
    cursor:pointer;
    border:2px solid transparent;
    transition:0.3s;
}

.thumbnail-list img:hover{
    border-color:var(--accent);
}

/* RIGHT */
.product-info h1{
    font-size:32px;
    margin-bottom:10px;
}

.price{
    font-size:26px;
    color:var(--accent);
    font-weight:bold;
    margin-bottom:15px;
}

.short-desc{
    margin-bottom:20px;
    line-height:1.6;
}

/* BUTTONS */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center; /* 💡 बटनहरूलाई एउटै सिधा लाइनमा राख्न दाई */
}

.actions form {
    display: inline-block;
    margin: 0;
    padding: 0;
}
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-outline {
    border: 1px solid var(--primary);
    padding: 12px 25px;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* META */
.product-meta p{
    margin-bottom:6px;
}

/* DESCRIPTION */
.product-description{
    margin-top:60px;
    padding:25px;
    background:white;
    border-radius:12px;
}

/* RELATED */
.related{
    margin-top:60px;
}

.related-grid{
     display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* MODAL */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 12, 0.85); /* Premium near-black color */
    backdrop-filter: blur(12px); /* Luxury blur effect */
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    user-select: none; /* Prevents text highlighting while dragging */
}

/* Modal Inner Zoom Wrapper */
.modal-zoom-wrapper {
    position: relative;
    width: 85vw;
    height: 80vh;
    overflow: hidden; /* Hide overflow when image zooms and pans */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.image-modal img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-origin: center center;
    transition: transform 0.15s ease-out;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.image-modal img.dragging {
    cursor: grabbing;
    transition: none; /* Turn off transitions during panning to prevent lag */
}

/* Control Panel */
.modal-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(12, 12, 12, 0.75);
    border: 1px solid rgba(201, 162, 39, 0.3); /* Gold border */
    padding: 10px 24px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.modal-btn {
    background: transparent;
    border: none;
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn:hover {
    background: var(--accent); /* Gold color */
    color: var(--white);
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(201, 162, 39, 0.4);
}

.modal-btn.btn-close {
    background: rgba(230, 57, 70, 0.1);
    color: #E63946;
    border-color: rgba(230, 57, 70, 0.2);
}

.modal-btn.btn-close:hover {
    background: #E63946;
    color: #FFFFFF;
    border-color: #E63946;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.4);
}

/* Zoom Level Percentage Indicator */
.zoom-indicator {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    font-family: monospace;
}

/* Panning instruction hint */
.pan-hint {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    z-index: 10000;
}

/* MOBILE */
@media(max-width:900px){
    .product-detail-grid{
        grid-template-columns:1fr;
    }

    .main-image{
        height:300px;
    }

    .related-grid,
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}


/* ==========================================
   ❤️ WISHLIST LIVE BUTTON ROYAL STYLE
========================================== */
#wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#wishlist-btn i {
    transition: transform 0.2s ease;
}

/* जब विशलिस्टमा थपिन्छ, बटन रातो र रोयल देखिन्छ भाई */
#wishlist-btn.wishlisted {
    border-color: #7a0c0c !important;
    color: #7a0c0c !important;
    background: #fff5f5 !important;
}

#wishlist-btn.wishlisted i {
    color: #e74c3c !important; /* कडा रातो मुटु भाई */
    transform: scale(1.15);
}

#wishlist-btn:hover i {
    transform: scale(1.2);
}


/* ==================================================
   📱 MODERN MOBILE RESPONSIVENESS (SMARTPHONE OPTIMIZATION)
   ================================================== */
@media (max-width: 768px) {
    .product-detail {
        padding: 20px 0 35px 0 !important;
    }

    .product-detail .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* 📸 Gallery Section */
    .product-gallery {
        width: 100% !important;
        align-items: center !important;
    }

    .main-image {
        width: 100% !important;
        max-width: 100% !important;
        height: 290px !important;
        min-height: 290px !important;
        border-radius: 14px !important;
        background: #FAF7F0 !important;
        border: 1px solid rgba(201, 162, 39, 0.25) !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
    }

    .main-image img {
        padding: 10px !important;
        object-fit: contain !important;
    }

    /* Disable desktop hover lens on mobile touch devices */
    .lens {
        display: none !important;
    }

    /* 🌊 Horizontal Scroll Thumbnails on Mobile */
    .thumbnail-list {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
        margin-top: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        scrollbar-width: none !important;
        padding: 4px 2px !important;
        justify-content: flex-start !important;
    }

    .thumbnail-list::-webkit-scrollbar {
        display: none !important;
    }

    .thumbnail-list img {
        width: 62px !important;
        height: 62px !important;
        min-width: 62px !important;
        min-height: 62px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        object-fit: cover !important;
        border: 2px solid transparent !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    .thumbnail-list img:hover,
    .thumbnail-list img.active {
        border-color: var(--accent, #C9A227) !important;
    }

    /* 🏷️ Product Info */
    .product-info {
        width: 100% !important;
    }

    .product-info h1 {
        font-size: 21px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        color: #1a1a1a !important;
    }

    .product-info .price {
        font-size: 22px !important;
        font-weight: 800 !important;
        color: var(--primary, #7A0C0C) !important;
        margin-bottom: 12px !important;
    }

    .short-desc {
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        color: #555555 !important;
        margin-bottom: 18px !important;
    }

    /* ⚡ Action Buttons: Modern 2-Column Touch Grid */
    .actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .actions form {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .actions .btn-primary,
    .actions .btn-outline {
        width: 100% !important;
        height: 46px !important;
        padding: 8px 6px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .actions .btn-primary {
        background: var(--primary, #7A0C0C) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(122, 12, 12, 0.25) !important;
    }

    /* 📜 Product Meta Box */
    .product-meta {
        background: #FAF7F0 !important;
        border: 1px solid rgba(201, 162, 39, 0.2) !important;
        border-radius: 10px !important;
        padding: 12px 14px !important;
        font-size: 13px !important;
        margin-bottom: 15px !important;
    }

    .product-meta p {
        margin-bottom: 6px !important;
    }

    .product-meta p:last-child {
        margin-bottom: 0 !important;
    }

    /* 📖 Description Box */
    .product-description {
        margin-top: 25px !important;
        padding: 18px 14px !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        border: 1px solid rgba(201, 162, 39, 0.15) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    }

    .product-description h2 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
        color: var(--primary, #7A0C0C) !important;
    }

    .product-description p {
        font-size: 13.5px !important;
        line-height: 1.6 !important;
        color: #444444 !important;
    }

    /* 🏺 Related Products: 2-Column Responsive Grid */
    .related {
        margin-top: 30px !important;
    }

    .related h2 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .related br {
        display: none !important;
    }

    .related-grid,
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .related-grid .product-card,
    .products-grid .product-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .related-grid .product-card .img-box,
    .products-grid .product-card .img-box {
        height: 125px !important;
        min-height: 125px !important;
        max-height: 125px !important;
        border-radius: 14px 14px 0 0 !important;
        overflow: hidden !important;
    }

    .related-grid .product-card .img-box img,
    .products-grid .product-card .img-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .related-grid .product-card .card-body,
    .products-grid .product-card .card-body {
        padding: 8px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        flex-grow: 1 !important;
    }

    .related-grid .product-card .card-body h3,
    .products-grid .product-card .card-body h3 {
        font-size: 13px !important;
        line-height: 1.3 !important;
        min-height: 32px !important;
        max-height: 32px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        margin-bottom: 2px !important;
    }

    .related-grid .product-card .price,
    .products-grid .product-card .price {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: var(--primary, #7A0C0C) !important;
        margin-bottom: 8px !important;
    }

    .related-grid .product-card .btn-small,
    .products-grid .product-card .btn-small {
        display: block !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        text-align: center !important;
        background: var(--primary, #7A0C0C) !important;
        color: #ffffff !important;
        text-decoration: none !important;
        margin-top: auto !important;
    }

    /* 🔍 Zoom Modal on Mobile */
    .modal-zoom-wrapper {
        width: 95vw !important;
        height: 72vh !important;
        border-radius: 12px !important;
    }

    .modal-controls {
        bottom: 16px !important;
        padding: 6px 14px !important;
        gap: 8px !important;
    }

    .modal-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .zoom-indicator {
        font-size: 12px !important;
        min-width: 44px !important;
    }

    .pan-hint {
        top: 15px !important;
        font-size: 11px !important;
        padding: 4px 12px !important;
        width: 90% !important;
        text-align: center !important;
    }
}
