/* 
 * =============================================================================
 * PREMIUM IMMERSIVE PRODUCT DETAIL - ORIGINAL DESIGN
 * Luxury magazine-style product showcase with cinematic animations
 * =============================================================================
 */

:root {
    --product-primary: #5D4037;
    --product-accent: #EAE3D9;
    --product-dark: #1a1614;
    --product-light: #F5F5F0;
}

/* 
 * FULL-HEIGHT HERO SECTION
 * Immersive first impression with floating product
 * =============================================================================
 */

.product-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--product-light) 0%, var(--product-accent) 100%);
    overflow: hidden;
    padding: 2rem;
}

/* Animated background pattern */
.product-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150%;
    height: 150%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(93, 64, 55, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(93, 64, 55, 0.05) 0%, transparent 50%);
    animation: float-pattern 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-pattern {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -30px) rotate(5deg); }
}

/* 
 * FLOATING PRODUCT IMAGE
 * 3D-like presentation with parallax effect
 * =============================================================================
 */

.product-showcase {
    position: relative;
    width: 50%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-float-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.product-main-visual {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 2rem;
    overflow: hidden;
    transform: translateZ(50px);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 50px 100px -20px rgba(93, 64, 55, 0.25),
        0 30px 60px -30px rgba(0, 0, 0, 0.3);
}

.product-main-visual:hover {
    transform: translateZ(70px) rotateY(2deg);
}

.product-main-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.product-main-visual:hover img {
    transform: scale(1.05);
}

/* Floating badge */
.product-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--product-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: badge-float 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 
 * PRODUCT INFO PANEL
 * Magazine-style typography with elegant spacing
 * =============================================================================
 */

.product-info-panel {
    width: 50%;
    padding: 0 4rem;
    animation: slide-in-right 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--product-primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.product-name {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: #1a1614;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.product-tagline {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(26, 22, 20, 0.7);
    margin-bottom: 2rem;
    font-weight: 400;
}

.product-price-display {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 3rem;
}

.product-price-main {
    font-size: 3rem;
    font-weight: 900;
    color: var(--product-primary);
}

.product-price-unit {
    font-size: 1rem;
    color: rgba(26, 22, 20, 0.5);
    font-weight: 500;
}

/* 
 * PREMIUM COLOR SELECTOR
 * Large visual swatches with smooth transitions
 * =============================================================================
 */

.color-selection-area {
    margin-bottom: 3rem;
}

.color-label {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(26, 22, 20, 0.6);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-selected-name {
    color: var(--product-primary);
    font-weight: 900;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    max-width: 500px;
}

.color-option {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    cursor: pointer;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
}

.color-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option:hover::before {
    opacity: 1;
}

.color-option:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(93, 64, 55, 0.2),
        0 0 0 3px rgba(93, 64, 55, 0.1);
}

.color-option.active {
    border-color: var(--product-primary);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(93, 64, 55, 0.3),
        0 0 0 4px var(--product-primary);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.color-option.active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Color name tooltip */
.color-tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(26, 22, 20, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
}

.color-option:hover .color-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 
 * FLOATING ACTION BAR
 * Sticky CTA buttons with glass morphism
 * =============================================================================
 */

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-add-cart {
    flex: 2;
    padding: 1.25rem 2rem;
    background: var(--product-primary);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-add-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(93, 64, 55, 0.4);
    background: #4d342d;
}

.btn-add-cart:active {
    transform: translateY(-1px);
}

.btn-favorite {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(93, 64, 55, 0.1);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--product-primary);
}

.btn-favorite:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.2);
}

.btn-favorite.active {
    background: var(--product-primary);
    color: white;
}

/* 
 * QUICK SPECS GRID
 * Elegant info cards
 * =============================================================================
 */

.quick-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.spec-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(93, 64, 55, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.spec-card:hover {
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.1);
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: rgba(93, 64, 55, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--product-primary);
}

.spec-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1614;
    margin-bottom: 0.25rem;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(26, 22, 20, 0.5);
    font-weight: 600;
}

/* 
 * IMMERSIVE DETAIL SECTIONS
 * Full-width storytelling blocks
 * =============================================================================
 */

.detail-section {
    padding: 6rem 0;
    position: relative;
}

.detail-section.alt-bg {
    background: linear-gradient(180deg, var(--product-light) 0%, white 100%);
}

.detail-split {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.detail-image-block {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.detail-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.detail-image-block:hover img {
    transform: scale(1.08);
}

.detail-content {
    max-width: 500px;
}

.detail-heading {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1a1614;
}

.detail-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(26, 22, 20, 0.7);
    margin-bottom: 2rem;
}

.detail-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(93, 64, 55, 0.05);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(93, 64, 55, 0.1);
    transform: translateX(8px);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: var(--product-primary);
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1a1614;
}

/* 
 * SPECIFICATIONS ACCORDION
 * Interactive expandable cards
 * =============================================================================
 */

.specs-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.spec-accordion {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.spec-item {
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.spec-header:hover {
    background: rgba(93, 64, 55, 0.03);
}

.spec-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1614;
}

.spec-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(93, 64, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--product-primary);
}

.spec-item.active .spec-toggle {
    background: var(--product-primary);
    color: white;
    transform: rotate(180deg);
}

.spec-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spec-item.active .spec-content {
    max-height: 500px;
}

.spec-content-inner {
    padding: 0 2rem 2rem 2rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.spec-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(26, 22, 20, 0.5);
}

.spec-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1614;
}

/* 
 * GALLERY SECTION
 * Masonry-style image showcase
 * =============================================================================
 */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Alternate heights for masonry effect */
.gallery-item:nth-child(3n+1) {
    grid-row: span 2;
}

/* 
 * RESPONSIVE DESIGN
 * =============================================================================
 */

@media (max-width: 1024px) {
    .product-hero {
        flex-direction: column;
        min-height: auto;
        padding: 4rem 2rem;
    }
    
    .product-showcase,
    .product-info-panel {
        width: 100%;
    }
    
    .product-showcase {
        height: 60vh;
        margin-bottom: 3rem;
    }
    
    .product-info-panel {
        padding: 0;
    }
    
    .product-name {
        font-size: 2.5rem;
    }
    
    .detail-split {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item:nth-child(3n+1) {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .product-name {
        font-size: 2rem;
    }
    
    .product-price-main {
        font-size: 2rem;
    }
    
    .color-palette {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .quick-specs {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-favorite {
        width: 100%;
        height: 60px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }
}

/* 
 * SCROLL ANIMATIONS
 * =============================================================================
 */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-on-scroll.visible {
    animation-play-state: running;
}

/* Stagger animation delays */
.animate-on-scroll:nth-child(1) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.4s; }