/* Product Detail Page Styles */

.product-detail-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-xl);
    padding-top: 140px;
    /* Space for fixed navbar */
    padding-bottom: var(--space-xl);
    min-height: 80vh;
}

@media (max-width: 900px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }

    .product-gallery {
        height: 400px;
    }
}

/* Slideshow Container */
.product-gallery {
    position: relative;
    background-color: #f9f9f9;
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0;
    position: absolute;
    /* Stack images */
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Prevent clicking invisible images */
    z-index: 1;
}

.gallery-img.active {
    opacity: 1;
    position: relative;
    /* Keep flow for the active one if needed, or absolute is fine */
    pointer-events: auto;
    /* Allow clicking active image */
    z-index: 5;
}

/* Navigation Arrows */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
}

.slider-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-main);
    stroke-width: 1.5;
    fill: none;
}

/* Product Info */
.product-info-panel {
    padding: var(--space-md);
}

.product-breadcrumbs {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

.product-title-large {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
}

.product-price-large {
    font-size: 1.5rem;
    color: var(--color-text-main);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.product-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 500px;
}

.spec-list {
    margin-bottom: var(--space-lg);
    border-top: 1px solid #eee;
    padding-top: var(--space-sm);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    gap: 2rem;
    /* Ensure label and value never touch */
}

/* AR Features */
/* AR Model Viewer */
model-viewer {
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    --poster-color: transparent;
}

.model-3d.hidden {
    display: none;
}

.product-gallery {
    position: relative;
    /* Ensure absolute children are relative to this */
}

.btn-ar-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    /* Auto width for pill shape */
    padding: 10px 24px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-text-main);
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    cursor: pointer;
    font-family: var(--font-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 0;
    transition: all 0.3s ease;
}

.btn-ar-toggle:hover {
    background-color: #fff;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Product Configuration (Swatches) */
.product-config {
    margin: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
}

.config-section {
    margin-bottom: var(--space-md);
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--color-text-light);
}

.swatch-grid {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.swatch-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* RH style is often round or rounded sq */
    border: 1px solid var(--color-border);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

.swatch-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.swatch-btn.selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-accent);
}

.selected-value-label {
    display: block;
    font-size: 0.8rem;
    margin-top: 4px;
    color: var(--color-text-main);
    font-weight: 500;
}

/* ============================================ */
/* Related Products Carousel */
/* ============================================ */

.related-products-section {
    padding: var(--space-xl) 0;
    background-color: #f9f9f9;
    border-top: 1px solid var(--color-border);
}

.related-products-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.related-products-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-main);
}

.view-collection-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

.view-collection-link:hover {
    opacity: 0.7;
}

.related-products-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
    /* Space for nav buttons */
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: var(--space-sm) 0;
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.product-card {
    flex: 0 0 auto;
    width: 280px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.product-card-info {
    padding: var(--space-md);
    text-align: center;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-main);
    margin: 0;
}

/* Carousel Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.carousel-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn.prev {
    left: 10px;
}

.carousel-nav-btn.next {
    right: 10px;
}

.carousel-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text-main);
    stroke-width: 2;
    fill: none;
}

/* Responsive */
@media (max-width: 768px) {
    .related-products-carousel {
        padding: 0 var(--space-md);
    }

    .carousel-nav-btn {
        display: none;
        /* Hide nav buttons on mobile, use swipe */
    }

    .product-card {
        width: 240px;
    }

    .product-card-image {
        height: 240px;
    }
}

/* ============================================ */
/* Visual Feature Cards */
/* ============================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.feature-card {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-surface-light);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.feature-card .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text-main);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}

/* ============================================ */
/* Enhanced Collapsible Sections */
/* ============================================ */

details {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-md);
    margin: var(--space-sm) 0;
    transition: all 0.3s ease;
    background: white;
}

details[open] {
    background: var(--color-surface-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

details summary {
    font-weight: 600;
    cursor: pointer;
    padding: var(--space-sm);
    list-style: none;
    display: flex;
    justify-content: between;
    align-items: center;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: "▼";
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--color-accent);
}

details[open] summary::after {
    transform: rotate(180deg);
}

details summary:hover {
    color: var(--color-accent);
}

/* ============================================ */
/* India-Specific Section Styling */
/* ============================================ */

.india-info-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    padding: var(--space-lg);
    border-radius: 8px;
    margin-top: var(--space-xl);
}

.india-info-section h3 {
    color: #0369a1;
    margin-bottom: var(--space-md);
}

/* ============================================ */
/* Responsive Feature Cards */
/* ============================================ */

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: var(--space-sm);
    }

    .feature-card {
        padding: var(--space-md);
    }

    .feature-card .icon {
        font-size: 2rem;
    }
}