/* ============================================================
   PRODUCT DETAIL PAGE — FULL CSS (Hover Zoom + Lightbox Swipe)
   Compatible with product-detail.js V11
   Version: 2.0 - Fixed Layout & Enhanced Lightbox
   ============================================================ */

/* ----------------------------------------
   GLOBAL BODY LOCK
---------------------------------------- */
body.zoom-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100vh !important;
    top: 0;
    left: 0;
}

/* ----------------------------------------
   LAYOUT WRAPPERS
---------------------------------------- */

.product-detail-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 550px 1fr;
    gap: 50px;
    width: 100%;
}

.no-variant-message {
    margin-top: 10px;
    padding: 12px 15px;
    background: #f5f7fa;
    border-left: 4px solid #0836C1; /* Sheaker Blue */
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.no-variant-message i {
    color: #0836C1;
    font-size: 16px;
}

@media (max-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ----------------------------------------
   PRODUCT IMAGES SECTION (Flex Layout)
---------------------------------------- */

.product-images-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* ----------------------------------------
   THUMBNAIL GALLERY (LEFT SIDE)
---------------------------------------- */

.thumbnail-gallery {
    flex-shrink: 0;
    width: 85px;
    order: 1; /* Position on LEFT */
}

.thumbnail-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thumbnail-item {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
    width: 85px;
    height: 85px;
    background: #f9f9f9;
}

.thumbnail-item:hover {
    border-color: rgba(138, 43, 226, 0.5);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-item.active {
    border-color: var(--sheaker-purple, #8a2be2);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.2);
}

/* ----------------------------------------
   MAIN IMAGE CONTAINER (RIGHT SIDE)
---------------------------------------- */

.main-image-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 14px;
    order: 2; /* Position on RIGHT */
    background: #f9f9f9;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
    transform-origin: center center;
    cursor: zoom-in;
}

/* Hover zoom (desktop only) */
@media (min-width: 768px) {
    .main-product-image.hover-zoom {
        transform: scale(1.6);
    }
}

/* ----------------------------------------
   PRODUCT BADGES
---------------------------------------- */

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.product-badge {
    background: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    color: #222;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-badge.new {
    background: var(--sheaker-blue, #4169E1);
    color: #fff;
}

.product-badge.featured {
    background: var(--sheaker-orange, #FF8C00);
    color: #1f1f1f;
}

/* ----------------------------------------
   MOBILE RESPONSIVE - THUMBNAIL LAYOUT
---------------------------------------- */

@media (max-width: 768px) {
    .product-images-section {
        flex-direction: column-reverse;
    }
    
    .thumbnail-gallery {
        width: 100%;
        order: 2;
        margin-top: 15px;
    }
    
    .thumbnail-grid {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .thumbnail-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .thumbnail-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    .thumbnail-item {
        flex-shrink: 0;
        width: 70px;
        height: 70px;
    }
    
    .main-image-container {
        order: 1;
        min-height: 300px;
    }
}

/* ----------------------------------------
   COLOR OPTIONS
---------------------------------------- */

.color-selection {
    margin-bottom: 20px;
}

.variant-title {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: #333;
}

.selected-variant {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}

.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--sheaker-purple, #8a2be2);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.color-option .swatch {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: block;
    border: solid var(--sheaker-purple, #8a2be2);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.2);
}

/* ----------------------------------------
   SIZE OPTIONS
---------------------------------------- */

.size-selection {
    margin-bottom: 20px;
}

.size-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 12px;
}

.size-option {
    padding: 10px 20px;
    border: 2px solid var(--border, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
    background: #fff;
}

.size-option:hover:not(.disabled) {
    border-color: var(--sheaker-blue, #4169E1);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.size-option.active {
    background: var(--sheaker-blue, #4169E1);
    color: #fff;
    border-color: var(--sheaker-blue, #4169E1);
}

.size-option.disabled {
    opacity: 0.35;
    pointer-events: none;
    background: #f5f5f5;
    text-decoration: line-through;
}

.size-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--sheaker-blue, #4169E1);
    text-decoration: none;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.size-guide-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ----------------------------------------
   STOCK STATUS
---------------------------------------- */

.stock-status {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.stock-status.in-stock {
    background: #eafff3;
    color: #0a8c4a;
    border: 1px solid #b8f5d3;
}

.stock-status.out-of-stock {
    background: #ffeaea;
    color: #d80032;
    border: 1px solid #ffc2c2;
}

/* ----------------------------------------
   QUANTITY SECTION
---------------------------------------- */

.product-action-section {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.quantity-control-group {
    flex: 0 0 auto;
}

.quantity-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border, #ddd);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    padding: 12px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    border: none;
    background: #f5f5f5;
    font-size: 20px;
    font-weight: 600;
    transition: background 0.2s;
    color: #333;
}

.qty-btn:hover {
    background: #e8e8e8;
}

.qty-btn:active {
    background: #ddd;
}

.qty-input {
    width: 65px;
    height: 45px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    color: #333;
    outline: none;
}

/* Remove spinner arrows */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* ----------------------------------------
   ADD TO CART BUTTON
---------------------------------------- */

.btn.btn-primary {
    background: var(--sheaker-blue, #4169E1);
    padding: 14px 28px;
    border-radius: 12px;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 45px;
    box-shadow: 0 2px 8px rgba(65, 105, 225, 0.2);
}

.btn.btn-primary:hover:not(:disabled) {
    background: var(--sheaker-blue-dark, #2851c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.btn.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

/* ----------------------------------------
   PRODUCT TABS / DESCRIPTION
---------------------------------------- */

.product-tabs {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.tab-navigation {
    margin-bottom: 15px;
}

.tab-navigation strong {
    font-size: 16px;
    color: #333;
}

.tab-content {
    color: #666;
    line-height: 1.7;
    font-size: 15px;
}

/* ============================================================
   FULLSCREEN LIGHTBOX - ENHANCED VERSION
============================================================ */

.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1005 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.image-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1000000;
}

/* Close button */
.close-lightbox {
    position: fixed;
    top: 25px;
    right: 35px;
    font-size: 45px;
    color: #fff;
    cursor: pointer;
    z-index: 1000001 !important;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    line-height: 1;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.close-lightbox:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Navigation arrows */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 52px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000001 !important;
    transition: all 0.2s ease;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev { 
    left: 25px; 
}

.lightbox-next { 
    right: 25px; 
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .close-lightbox {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 35px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 12px 16px;
    }
    
    .lightbox-prev { 
        left: 10px; 
    }
    
    .lightbox-next { 
        right: 10px; 
    }
    
    .image-lightbox img {
        max-width: 95vw;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 32px;
        padding: 10px 14px;
    }
}

/* ----------------------------------------
   UTILITY CLASSES
---------------------------------------- */

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* ----------------------------------------
   PRINT STYLES
---------------------------------------- */

@media print {
    .image-lightbox,
    .lightbox-prev,
    .lightbox-next,
    .close-lightbox {
        display: none !important;
    }
}