/**
 * ============================================================
 * ESTILOS PRINCIPALES - AROMASYVELAS.CL
 * ============================================================
 *
 * Paleta de colores (Cálido y Acogedor):
 * - Primario: #C4A484 (Beige cálido)
 * - Secundario: #8B7355 (Marrón suave)
 * - Acento: #D4AF37 (Dorado apagado)
 * - Fondo: #FDF8F3 (Blanco crema)
 * - Texto: #3D3D3D (Gris oscuro)
 *
 * Tipografía:
 * - Títulos: Playfair Display
 * - Cuerpo: Source Sans 3
 */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Colores */
    --color-primary: #C4A484;
    --color-primary-dark: #A88B6C;
    --color-secondary: #8B7355;
    --color-accent: #D4AF37;
    --color-bg: #FDF8F3;
    --color-bg-alt: #F5F0EB;
    --color-text: #3D3D3D;
    --color-text-light: #6B6B6B;
    --color-white: #FFFFFF;
    --color-black: #1A1A1A;
    --color-border: #E8E0D8;
    --color-success: #4CAF50;
    --color-error: #DC3545;
    --color-warning: #FFC107;

    /* Tipografía */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

    /* Tamaños */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Bordes */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --container-max: 1200px;
    --header-height: 70px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-black);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-16) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-10);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: var(--space-4) auto 0;
}

.section-footer {
    text-align: center;
    margin-top: var(--space-10);
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--color-black);
}

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

.btn-outline:hover {
    background: var(--color-secondary);
    color: var(--color-white);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

/* ============================================================
   HEADER
   ============================================================ */
/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 12px 0;
}

.header-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
}

/* Nav */
.nav-main {
    display: none;
}

.nav-menu-main {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu-main > li {
    display: inline-block;
    position: relative;
}

.nav-menu-main > li > a {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 8px 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-menu-main > li > a:hover {
    color: var(--color-primary);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    display: block !important;
    flex-direction: column !important;
}

.dropdown-menu li {
    display: block !important;
    width: 100%;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #555;
    transition: background 0.15s;
}

.dropdown-menu li a:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

.dropdown-all a {
    font-weight: 600;
    color: var(--color-primary) !important;
}

/* Header Right */
.header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
}

.header-tel {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-right: 8px;
    transition: color 0.2s;
    white-space: nowrap;
}

.header-tel:hover {
    color: var(--color-primary);
}

.header-tel svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.header-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #555;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-btn:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

.header-cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-menu {
    display: inline-flex !important;
}

@media (min-width: 768px) {
    .header-tel {
        display: inline-flex !important;
    }
}

@media (min-width: 1024px) {
    .nav-main {
        display: block;
    }
    .header-menu {
        display: none !important;
    }
}

/* ============================================================
   SEARCH MODAL
   ============================================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-form {
    display: flex;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: var(--space-5) var(--space-6);
    font-size: var(--text-lg);
    border: none;
    outline: none;
}

.search-form button {
    padding: var(--space-4) var(--space-6);
    background: var(--color-primary);
    color: var(--color-white);
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: var(--color-white);
    padding: var(--space-2);
}

/* ============================================================
   HERO / SLIDER
   ============================================================ */
.hero-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    color: var(--color-white);
}

.slide-content .container {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
    text-align: center;
}

.slide-content h2 {
    font-size: 42px;
    color: var(--color-white);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-content .btn {
    display: inline-block;
}

.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-4);
    pointer-events: none;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    font-size: var(--text-2xl);
    color: var(--color-secondary);
    pointer-events: auto;
    transition: all var(--transition-fast);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--color-white);
    transform: scale(1.1);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
}

.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active,
.dot:hover {
    background: var(--color-white);
    transform: scale(1.2);
}

/* Responsive Slider */
@media (max-width: 768px) {
    .slider-container {
        height: 350px;
    }

    .slide-content h2 {
        font-size: 28px;
    }

    .slide-content p {
        font-size: 16px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .slider-arrow.prev { left: 10px; }
    .slider-arrow.next { right: 10px; }
}

@media (max-width: 480px) {
    .slider-container {
        height: 280px;
    }

    .slide-content h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .slide-content .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .slider-arrow {
        display: none;
    }

    .slider-dots {
        bottom: 15px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

.category-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

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

.category-image {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-4);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card h3 {
    font-size: var(--text-lg);
    color: var(--color-secondary);
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-6);
}

.products-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

@media (min-width: 1024px) {
    .products-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

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

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius);
}

.badge-sale {
    background: var(--color-error);
    color: var(--color-white);
}

.badge-new {
    background: var(--color-accent);
    color: var(--color-black);
}

.product-info {
    padding: var(--space-4);
}

.product-category {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
}

.product-name {
    font-size: var(--text-base);
    font-weight: 500;
    margin: var(--space-2) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.price-current {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-secondary);
}

.price-old {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    text-decoration: line-through;
}

.btn-add-cart {
    display: block;
    width: calc(100% - var(--space-8));
    margin: 0 var(--space-4) var(--space-4);
    padding: var(--space-3);
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-add-cart:hover {
    background: var(--color-primary);
}

/* ============================================================
   ABOUT BRIEF
   ============================================================ */
.about-brief {
    background: var(--color-bg-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2 {
    margin-bottom: var(--space-4);
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

.footer-col h4 {
    color: var(--color-white);
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
}

.footer-col p {
    opacity: 0.9;
    font-size: var(--text-sm);
}

.footer-col ul li {
    margin-bottom: var(--space-2);
}

.footer-col ul li a {
    opacity: 0.9;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
    opacity: 1;
    padding-left: var(--space-2);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    opacity: 0.9;
}

.contact-info li svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: var(--text-sm);
    opacity: 0.8;
    margin: 0;
}

.footer-credits {
    margin-top: 8px !important;
    font-size: 12px;
    opacity: 0.7;
}

.footer-credits a {
    color: #D4A574;
    text-decoration: none;
    font-weight: 500;
}

.footer-credits a:hover {
    text-decoration: underline;
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast);
    background: var(--color-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-control::placeholder {
    color: var(--color-text-light);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }

    .section {
        padding: var(--space-10) 0;
    }
}
