/* =========================================================================
   7. REFINED PRODUCT DETAIL (E-COMMERCE UI)
   ========================================================================= */

.product-detail-modal .modal-content {
    max-width: 1100px;
    height: 95vh;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    /* Glassy white */
    backdrop-filter: blur(20px);
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

/* Left: Media Area */
.detail-media-container {
    background: rgba(31, 78, 95, 0.03);
    /* Very subtle teal tint */
    display: flex;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

.thumbnails-column {
    width: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-right: 20px;
}

.thumb-item {
    width: 64px;
    height: 64px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}

.thumb-item:hover,
.thumb-item.active {
    border-color: var(--color-deep-teal);
    box-shadow: 0 0 0 1px var(--color-deep-teal);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-image-viewer img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 5;
    font-size: 20px;
}

.nav-arrow.left {
    left: 10px;
}

.nav-arrow.right {
    right: 10px;
}

/* --- Modal Overrides --- */
.product-detail-modal.modal-overlay {
    background: rgba(0, 0, 0, 0.3);
    /* High see-through rate */
    align-items: center;
    /* Center vertically */
    backdrop-filter: blur(5px);
    /* Reduce blur slightly */
}

@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .detail-media-container {
        height: 300px;
        flex-shrink: 0;
    }

    .thumbnails-column {
        max-height: 260px;
        /* Approx 3.5 items (64*3.5 + gaps) */
        overflow-y: auto;
    }

    /* Fatter scrollbar for mobile thumbnails */
    .thumbnails-column::-webkit-scrollbar {
        width: 8px;
        /* Fatter scrollbar */
    }

    .thumbnails-column::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

    .main-image-viewer img {
        max-height: 100%;
        width: auto;
    }

    .main-image-viewer {
        justify-content: flex-start;
        padding-left: 20px;
    }

    .product-detail-modal .modal-content {
        height: auto;
        max-height: 90vh;
        margin: 20px;
        border-radius: 20px;
    }

    .detail-content-scroll {
        padding: 10px;
        /* Reduced from 40px to 10px (25%) */
    }
}

.detail-content-scroll {
    padding: 40px;
    overflow-y: auto;
    color: #1a1a1a;
}

.breadcrumb-trail {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 24px;
}

.breadcrumb-trail span {
    margin: 0 4px;
}

.brand-label {
    font-weight: 700;
    color: var(--color-deep-teal);
    letter-spacing: 1px;
    font-size: 14px;
    margin-bottom: 8px;
}

.product-full-title {
    font-family: var(--font-family-serif);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.product-meta-small {
    font-size: 12px;
    color: #718096;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.stars {
    color: #f6ad55;
    font-size: 18px;
}

.rating-count {
    font-size: 14px;
    color: #4a5568;
}

.pricing-block {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
}

.main-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-deep-teal);
}

.financing-info {
    font-size: 14px;
    color: #4a5568;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
}

.financing-info b {
    font-size: 18px;
    color: #000;
}

.savings-tag {
    color: #e53e3e;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Variant Selectors */
.selection-group {
    margin-bottom: 28px;
}

.selection-label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    display: block;
}

.color-swatches {
    display: flex;
    gap: 12px;
}

.swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.swatch.active {
    border-color: var(--color-deep-teal);
}

.swatch img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Size Selection Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.size-btn {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.size-btn:hover {
    border-color: var(--color-deep-teal);
    background: #f7fafc;
}

.size-btn.active {
    background: var(--color-deep-teal);
    color: #fff;
    border-color: var(--color-deep-teal);
    box-shadow: 0 4px 12px rgba(31, 78, 95, 0.2);
}

.delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.option-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
}

.option-card.active {
    border-color: var(--color-deep-teal);
    background: rgba(31, 78, 95, 0.05);
}

.option-icon {
    font-size: 24px;
}

.option-text h5 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.option-text p {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.4;
}

.add-to-cart-bar {
    display: flex;
    gap: 16px;
    padding: 32px 0;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
    background: transparent;
    backdrop-filter: none;
    position: relative;
    bottom: auto;
}

.btn-add-cart {
    flex: 1;
    background-color: var(--color-deep-teal);
    color: #ffffff;
    border: 1px solid var(--color-classic-gold);
    box-shadow: 0 4px 20px rgba(31, 78, 95, 0.3);
    font-weight: 800;
    font-size: 16px;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-add-cart:hover {
    background-color: #163642;
    /* Darker Teal */
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--color-classic-gold);
    border-color: #fff;
}

.btn-wishlist {
    width: 56px;
    height: 56px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #a0aec0;
}

/* Specifications Table */
.spec-section {
    margin-top: 48px;
    border-top: 2px solid #edf2f7;
    padding-top: 32px;
}

.spec-section h3 {
    font-family: var(--font-family-serif);
    margin-bottom: 24px;
}

.spec-grid {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    padding: 16px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.spec-row:nth-child(even) {
    background: #f8f9fa;
}

.spec-label {
    font-weight: 700;
    color: #4a5568;
}

.spec-value {
    color: #1a1a1a;
}