:root {
    /* Nueva Paleta: Boutique de Lujo Moderno */
    --bg-main: #FAFAF7; /* Crema muy suave */
    --bg-secondary: #F0EBE1; /* Beige cálido */
    --emerald: #0A3A2A; /* Verde Esmeralda oscuro */
    --emerald-light: #165c45;
    --gold: #C5A059; /* Oro sofisticado */
    --gold-light: #e0c286;
    --text-dark: #1A1A1A;
    --text-light: #FFFFFF;
    --text-muted: #666666;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(10, 58, 42, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .serif {
    font-family: 'Playfair Display', serif;
}

/* HEADER Y NAVEGACIÓN */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background: rgba(250, 250, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--emerald);
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.nav::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.nav a, .nav button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dark);
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.nav a:hover, .nav a.active, .nav button:hover, .nav button.active {
    background: var(--emerald);
    color: var(--text-light);
    border-color: var(--emerald);
}

/* CART & ICONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--emerald);
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--gold);
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--gold);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    height: 20px;
    min-width: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background-color: var(--emerald);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Oscurece un poco para leer el texto */
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    color: var(--text-light);
    animation: slideUp 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-tag {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 15px;
    display: inline-block;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

.btn-primary {
    background: var(--gold);
    color: var(--text-light);
    border: none;
    padding: 15px 35px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--emerald);
    border: 2px solid var(--emerald);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--emerald);
    color: var(--text-light);
}

/* CATALOG GRID */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--emerald);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
}

.catalog-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #fff;
    padding: 30px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    font-size: 1.2rem;
    color: var(--emerald);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bg-secondary);
    padding-bottom: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.filter-label:hover {
    color: var(--emerald);
}

.filter-label input[type="checkbox"] {
    accent-color: var(--emerald);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* PRODUCT CARDS (DUAL IMAGE) */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-img-wrapper {
    position: relative;
    padding-top: 120%; /* Aspect ratio más elegante */
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.8s ease;
}

.card-img-lifestyle {
    opacity: 0;
}

/* Hover efect: muestra la foto lifestyle si existe */
.card:hover .has-lifestyle .card-img-iso {
    opacity: 0;
}
.card:hover .has-lifestyle .card-img-lifestyle {
    opacity: 1;
    transform: scale(1.05); /* Zoom sutil */
}
.card:hover .card-img-iso {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 2;
}

.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price {
    color: var(--emerald);
    font-weight: 600;
    font-size: 1.3rem;
}

.price-retail {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.9rem;
    display: none; /* Se muestra si es mayorista para ver el ahorro */
}

body.is-mayorista .price-retail {
    display: inline;
}

.stock {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.stock .s {
    font-weight: 600;
    color: var(--emerald);
}

.card-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.qty {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 20px;
    border: 1px solid #EAEAEA;
    padding: 2px;
}

.qty button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty button:hover {
    background: var(--bg-secondary);
}

.qty .q {
    width: 30px;
    text-align: center;
    font-weight: 500;
}

.btn-add {
    background: var(--emerald);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    flex-grow: 1;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--emerald-light);
}

/* MAYORISTA SECTION (Rediseñada) */
.mayorista-banner {
    background: var(--emerald);
    color: var(--text-light);
    border-radius: var(--radius-md);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 40px auto;
    max-width: 1000px;
}

.mayorista-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.mayorista-content {
    position: relative;
    z-index: 1;
}

.mayorista-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.mayorista-banner p {
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 30px;
}

.login {
    display: flex;
    gap: 15px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.login input {
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    flex: 1;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: var(--transition);
}

.login input::placeholder {
    color: rgba(255,255,255,0.6);
}

.login input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.15);
}

.login .btn {
    background: var(--gold);
    color: var(--text-light);
    border: none;
    padding: 0 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.login .btn:hover {
    background: var(--gold-light);
}

.mayorista-success {
    display: none;
    background: rgba(197, 160, 89, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    font-weight: 500;
}

body.is-mayorista .login {
    display: none;
}
body.is-mayorista .mayorista-success {
    display: block;
}

/* CARRITO DRAWER */
.panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.panel-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 400px;
    max-width: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.panel.open {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bg-secondary);
}

.panel-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--emerald);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-dark);
}

.list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.list::-webkit-scrollbar {
    width: 6px;
}
.list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.item {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: block;
}

.item-price-calc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.item-remove {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: var(--transition);
}

.item-remove:hover {
    opacity: 1;
}

.footerBar {
    padding-top: 20px;
    border-top: 2px solid var(--bg-main);
    background: #fff;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.total-row span:last-child {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--emerald);
}

.cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.btn-whatsapp:hover {
    background: #1EBE5D;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

/* FAB WHATSAPP */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    z-index: 900;
    transition: var(--transition);
}

.whatsapp-fab svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.whatsapp-fab:hover {
    transform: scale(1.1) rotate(-10deg);
}

/* ANIMACIONES */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FOOTER */
footer {
    background: var(--emerald);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

footer p {
    margin-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero {
        min-height: 400px;
        height: 60vh;
    }
    
    header {
        padding: 15px 20px;
    }
    
    .panel {
        width: 100%;
    }
    
    .mayorista-banner {
        padding: 40px 20px;
        margin: 40px 20px;
    }
    
    .login {
        flex-direction: column;
    }
}