/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #0B0B0B;
    --color-secondary: #C9A24A; /* Brand Gold */
    --color-accent: #00A89E;    /* Brand Teal/Cyan */
    --color-whatsapp: #25D366;
    --color-bg-light: #f9f9f9;
    --color-bg-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* FX */
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg-white);
    overflow-x: hidden; /* Prevent horizontal scroll/zoom issues */
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-secondary);
    border-radius: 2px; /* Smoother gold line */
}

.section-title.no-line {
    padding-bottom: 0;
}

.section-title.no-line::after {
    display: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg-white);
}

.btn-primary:hover {
    background-color: #008f86; /* Slightly darker teal for hover */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: var(--spacing-sm) 0;
    z-index: 100;
    transition: var(--transition);
    background-color: var(--color-primary); /* Dark by default to match footer */
    color: var(--color-bg-white);
    border-top: 3px solid var(--color-accent); /* Brand Teal Line */
}

.navbar.solid-nav, .navbar.scrolled {
    position: fixed;
    background-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: var(--color-bg-white);
    font-weight: 500;
    margin-left: var(--spacing-lg);
}

.nav-links a:hover {
    color: var(--color-secondary);
}

/* ==========================================================================
   Hero Section: Split Layout
   ========================================================================== */

.hero {
    position: relative;
    padding: 140px 0 80px; /* Space for fixed nav */
    background-color: var(--color-bg-white);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--color-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.hero p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: rgba(0,0,0,0.02);
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-avatars {
    display: flex;
}

.trust-avatars img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--color-secondary);
    margin-left: -12px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: block;
}

.trust-avatars img:first-child {
    margin-left: 0;
}

.hero-trust p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: normal;
    display: flex;
    align-items: center;
    height: 38px; /* Exact match to avatar height */
}

/* Hero Right Side: Visual Carousel */
.hero-visual {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/5;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.hero-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 6s ease-out;
    transform: scale(1.05); /* Slight initial zoom for ken burns effect */
}

.hero-carousel img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

/* Decorators behind carousel */
.hero-carousel-decorator {
    position: absolute;
    border-radius: 20px;
    z-index: 1;
}

.shape-1 {
    width: 100%;
    height: 100%;
    background-color: var(--color-secondary);
    top: 20px;
    right: -20px;
    opacity: 0.2;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background-image: radial-gradient(var(--color-primary) 2px, transparent 2px);
    background-size: 15px 15px;
    bottom: -30px;
    left: -30px;
    opacity: 0.1;
}

/* Update Nav text colors since background is now white */
.logo {
    color: var(--color-primary);
}
.nav-links a {
    color: var(--color-text);
}
.nav-links a:hover {
    color: var(--color-secondary);
}

/* ==========================================================================
   Features / Por Qué Elegir Us
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.feature-card {
    background: var(--color-bg-white);
    border-radius: var(--radius);
    padding: 35px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column; /* Vertical Layout */
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border-top: 2px solid transparent;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-top-color: var(--color-accent);
}

.feature-icon {
    color: var(--color-accent); /* Vibrant Teal Icons */
    font-size: 2.2rem;
    margin-bottom: 20px;
    width: 70px;
    height: 70px;
    background: rgba(0, 168, 158, 0.08); /* Subtle Teal Wash */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card p {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   Product Grid
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* Tighter spacing for 2-column mobile */
    }
    
    .product-info h3 {
        font-size: 0.95rem; /* Smaller text for 2-col mobile */
    }
    
    .product-info p {
        font-size: 0.8rem;
    }
}

.product-card {
    background: var(--color-bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image {
    position: relative;
    padding-top: 120%; /* Aspect ratio */
    overflow: hidden;
    background-color: var(--color-bg-light);
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    object-fit: cover;
    box-shadow: var(--shadow-lg); /* Gives the painting depth */
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Badge Style */
.badge-best-seller {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #e63946;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-info {
    padding: var(--spacing-md);
    text-align: center;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.product-info p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* ==========================================================================
   How to Buy Steps
   ========================================================================== */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.step-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--color-bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--color-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    margin: 0 auto var(--spacing-md);
}

.step-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   Testimonios Reales
   ========================================================================== */

.testimonials-carousel-wrapper {
    position: relative;
    width: 100%;
}

.testimonials-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-md); /* space for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) var(--color-bg-light);
}

.testimonials-carousel::-webkit-scrollbar {
    height: 8px;
}

.testimonials-carousel::-webkit-scrollbar-track {
    background: var(--color-bg-light);
    border-radius: 4px;
}

.testimonials-carousel::-webkit-scrollbar-thumb {
    background-color: var(--color-secondary);
    border-radius: 4px;
}

.testimonial-card {
    background: var(--color-bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-width: 300px; /* fixed minimum width for carousel items */
    max-width: 350px;
    scroll-snap-align: start;
    flex: 0 0 auto; /* Prevent shrinking in flex container */
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.testimonial-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 2px solid var(--color-secondary);
}

.testimonial-content {
    padding: var(--spacing-md);
}

.testimonial-content .stars {
    color: var(--color-secondary);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.testimonial-content .quote {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 15px;
    line-height: 1.5;
}

.testimonial-content .author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ==========================================================================
   Product Page & Visualizer
   ========================================================================== */

.product-page {
    padding-top: 100px; /* Space for fixed nav */
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 900px) {
    .product-layout {
        grid-template-columns: 3fr 2fr;
    }
}

/* Visualizer container */
.product-visualizer-col {
    background-color: var(--color-bg-white);
    border-radius: var(--radius);
    padding: 10px; /* Reduced from var(--spacing-lg) */
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

/* The wall background */
.visualizer-container {
    position: relative;
    width: 100%;
    min-height: 480px; /* Increased from 400px */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 15px; /* Reduced from var(--spacing-lg) to maximize art */
    overflow: hidden;
}

/* The frame itself */
.frame-wrapper {
    position: relative;
    display: inline-block;
    max-width: 98% !important; /* Maximized to 98% */
    max-height: 98% !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.5s ease;
    
    /* Default Basic styling (will be overridden by JS) */
    border: 20px solid #3e2723;
}

/* The actual painting inside the frame */
.artwork-image {
    display: block;
    max-width: 100%;
    max-height: 75vh; /* Increased from 60vh to give more prominence */
    width: auto;
    height: auto;
    object-fit: contain;
    /* Optional: subtle inner shadow simulating canvas depth */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5); 
}

/* Glass reflection effect over the painting */
.frame-glass-reflection {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0.15) 0%, 
        rgba(255,255,255,0) 40%, 
        rgba(255,255,255,0) 100%
    );
    z-index: 5;
}

/* Form Controls */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.product-title {
    font-size: 2rem;
    margin-bottom: 4px;
}

.product-artist {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
}

.options-group {
    margin-bottom: var(--spacing-lg);
}

.options-group h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Size Radio Buttons */
.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-label {
    cursor: pointer;
}

.radio-label input {
    display: none;
}

.radio-btn {
    display: inline-block;
    padding: 10px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg-white);
    transition: var(--transition);
    font-weight: 500;
}

.radio-label input:checked + .radio-btn {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: white;
}

/* Frame Selection */
.frame-selector {
    display: flex;
    gap: 15px;
}

.frame-label {
    cursor: pointer;
    text-align: center;
    font-size: 0.85rem;
}

.frame-label input {
    display: none;
}

.frame-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.frame-label input:checked ~ .frame-swatch {
    border-color: var(--color-secondary);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--color-bg-white), 0 0 0 4px var(--color-secondary);
}

.payment-info {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0 0;
    border-top: 3px solid var(--color-accent); /* Brand Teal Line */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: var(--color-bg-white);
    margin-bottom: var(--spacing-sm);
    display: inline-block;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
}

.footer-social a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding: var(--spacing-md) 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.dl-1 { animation-delay: 0.2s; }
.dl-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--color-secondary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-content {
        justify-content: center;
    }
    
    .logo img {
        margin: 0 auto;
    }
    
    .nav-links {
        display: none; /* simple mobile nav for now */
    }
    
    .navbar {
        padding: 5px 0;
    }

    .hero {
        padding: 100px 0 100px; /* Increased bottom padding for better distribution */
        text-align: center;
    }

    .hero-content {
        min-width: 0;
        max-width: 100%;
        margin-bottom: 20px; /* Reduced space after removing trust section */
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 30px; /* More space below the first title */
    }

    .hero p {
        margin: 0 auto var(--spacing-lg);
    }

    .hero-buttons {
        justify-content: center;
        gap: 10px;
        margin-bottom: 0; 
    }

    .btn {
        padding: 12px 18px; /* Slightly smaller on mobile */
        font-size: 0.95rem;
    }

    .hero-trust {
        display: none; 
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-visual {
        min-width: 100%;
        margin-top: -20px; /* Lift the visualizer up further */
    }
}
