:root {
    /* Paleta Premium Femenina & Vibrante */
    --primary: #f4a6b9;          /* Rosa Mate Vibrante */
    --primary-hover: #e88d9f;
    --primary-light: #fff0f3;
    --primary-dark: #d66d86;
    --secondary: #88c991;        /* Verde Complementario */
    --bg-color: #fdfafb;
    --card-bg: #ffffff;
    --text-color: #3d2c2c;
    --text-muted: #9e8a8d;
    --border-color: #fcebf0;
    --shadow: 0 10px 40px rgba(244, 166, 185, 0.2);
    --shadow-sm: 0 4px 15px rgba(244, 166, 185, 0.1);
    --radius: 24px;
    --radius-sm: 12px;
    --font-heading: "Playfair Display", serif;
    --font-body: "Outfit", sans-serif;
}
*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    transition:background .3s,color .3s;
}
a, button{
    cursor: pointer;
}
.product-card{
    backdrop-filter: blur(10px);
}
.product-card:hover{
    transform:translateY(-8px) scale(1.02);
}
/* Botones Boutique Layout */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}
.product-actions .btn {
    width: 100%;
    border: none; /* Quitamos borde negro */
}

.btn-secondary {
    background: #f7f7f7;
    color: var(--text-color);
    border: none; /* Quitamos borde negro */
}
.btn-secondary:hover { background: var(--primary-light); }

/* Carrito Estilo Boutique */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.cart-items-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-badge {
    background: var(--danger) !important; /* Rojo vibrante */
    color: white !important;
}

body { font-family: var(--font-body); background-color: var(--bg-color); color: var(--text-color); }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-color); }
.product-title {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.8rem;
}

.btn {
    border-radius: var(--radius);
    padding: 12px 28px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
}

/* Hero Section Premium con animaciones */
/* Hero Slider Premium - Animado */
.hero-slider {
    position: relative;
    height: 500px;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 60px;
    background: #fdfafb;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    padding: 60px;
    animation: fadeSlider 25s infinite;
}

.hero-slide img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 500px;
    backdrop-filter: blur(10px);
}
.hero-slide{
    position:absolute;
    inset:0;
    opacity:0;
    transition:opacity 1s;
    pointer-events:none;
}

.hero-slide.active{
    opacity:1;
    pointer-events:auto;
}
/* Animación de cada slide con retrasos diferentes 
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.hero-slide:nth-child(4) { animation-delay: 15s; }
.hero-slide:nth-child(5) { animation-delay: 20s; }

@keyframes fadeSlider {
    0%, 20%, 100% { opacity: 0; }
    5%, 19% { opacity: 1; }
}
*/

/* Layout General */
.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }

/* Productos Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-img-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info { padding: 20px; }

/* Tarjetas de Producto Boutique */
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid #f0f0f0; /* Borde más claro por defecto */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Sombra suave por defecto */
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.product-img-container {
    position: relative;
    height: 300px; /* Reducido de 350px para mejor proporción */
    overflow: hidden;
    padding: 10px; /* Padding interno para que la imagen se vea "dentro" */
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px; /* Bordes redondeados de la imagen */
    transition: transform 0.5s ease;
}

.product-card .product-info {
    padding: 15px; /* Padding ajustado */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px; /* Espaciado muy estrecho para agrupar */
}

.product-card .product-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 5px 0;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 5px;
}

.product-price-secondary {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

/* Header Sticky y Estructura */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    width: 95%; /* Cambio a porcentaje para fluidez */
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0; /* Padding horizontal 0 porque el width 95% ya da margen */
}

.nav-controls { display: flex; align-items: center; gap: 20px; }

/* Botones y Estados Hover */
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }

.btn-secondary { background: white; color: var(--text-color); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--primary-light); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }

/* Menú de Usuario */
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary); }

/* Status Badges */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-pendiente { background: #fff3cd; color: #856404; }
.status-aprobado { background: #d4edda; color: #155724; }
.status-cancelado { background: #f8d7da; color: #721c24; }

/* Carrito Boutique Mejorado */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
}

.cart-items-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-details { flex-grow: 1; }

.cart-item-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-dark);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--primary-light);
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.cart-item-remove {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    color: var(--text-muted);
}
.cart-item-remove:hover { color: var(--danger); }

/* Mejoras formularios en Carrito */
.checkout-card .form-control {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 12px;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

.checkout-card .btn-primary {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 1rem;
    border: none; /* Elimina borde negro */
    background: var(--primary);
    color: white;
}
.checkout-card .btn-primary:hover {
    background: var(--primary-hover);
}

/* Estilo para inputs de archivo y selects */
input[type="file"].form-control {
    padding: 8px;
    background: #fcfcfc;
}

select.form-control {
    appearance: none;
    background: white;
    cursor: pointer;
}

/* Icono de Carrito */
.cart-icon-wrapper {
    position: relative; /* CRÍTICO: Necesario para que el hijo absoluto se posicione respecto a este */
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

/* Corrección forzada para el badge del carrito */
.cart-badge {
    position: absolute !important; /* CRÍTICO: Posición absoluta respecto a su padre */
    top: -5px !important;
    right: -5px !important;
    background: #e27c7c !important; /* Rojo vibrante */
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Selector de Moneda y Usuario */
.currency-selector {
    display: flex;
    background: white;
    border-radius: 30px;
    padding: 3px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.currency-btn {
    border: none;
    background: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: var(--text-muted);
}
.currency-btn.active {
    background: var(--primary);
    color: white;
}

.user-menu { display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }


.btn-danger {
    background: #e27c7c !important;
    color: white !important;
    border: none !important;
}

/* Ajustes responsivos (hasta 700px) */
.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Utilidades */
.responsive-table {
    overflow-x: auto;
    width: 100%;
}

@media (max-width: 768px) {
    
    .user-actions { display:  !important; flex-direction: column; }
    .currency-selector { flex-direction: column; }

    .product-details-container {
        grid-template-columns: 1fr;
        padding: 5px !important;
    }
    .product-title { font-size: 1.3rem; }
    .section-title { font-size: 20px !important; }
    
    /* Header ajustes */
    .header-container { padding: 5px; }
    
    /* Ocultar texto largo del logo */
    .logo span { display: none !important; } 
    
    /* Ocultar nombre de usuario para ahorrar espacio */
    .user-name { display: none !important; }
    /* .user-actions { display: none !important; }*/
    
    /* Ocultar título del producto en el slider de la portada */
    .hero-content h2 { display: none !important; }
    
    /* Posicionar el contenido del slider en la parte inferior para dispositivos móviles */
    .hero-slide { align-items: flex-end !important; padding-bottom: 20px !important; }
    .hero-content { background: rgba(255, 255, 255, 0.7) !important; padding: 10px !important; }
    
    .nav-controls { gap: 5px; }
    .btn { padding: 5px 8px !important; font-size: 11px !important; }
}

/* Ajustes adicionales para productos en móvil */
@media (max-width: 650px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        flex-direction: column;
        height: auto;
        border: 1px solid #f0f0f0; /* Borde más claro */
        box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Sombra suave para separar */
    }
    
    .product-img-container {
        width: 100%;
        height: 250px;
        padding: 10px;
    }
    
    .product-img {
        border-radius: 10px;
    }
    
    .product-info {
        padding: 20px;
        text-align: center;
    }
}

/* Auth Pages Premium */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle, #fffefd 0%, #fdfafb 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: var(--primary-light);
    border-radius: 50%;
    filter: blur(100px);
    top: -50px;
    left: -50px;
    z-index: 0;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: #eef9f0;
    border-radius: 50%;
    filter: blur(120px);
    bottom: -80px;
    right: -50px;
    z-index: 0;
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 45px 35px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 25px 60px rgba(244, 166, 185, 0.25);
    transform: translateY(-2px);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-branding {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.logo-branding:hover {
    transform: scale(1.04);
}

.logo-branding .logo-emoji {
    font-size: 1.8rem;
}

.logo-branding .logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--primary-dark);
    text-align: center;
    letter-spacing: 1.2px;
}

.google-btn-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.whatsapp-btn-container {
    margin-top: 20px;
    width: 100%;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white !important;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    padding: 13px 24px;
    width: 100%;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.25);
}

.whatsapp-icon {
    width: 18px;
    height: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-4px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }

/* Form Elements para Auth */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fdfafb;
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(244, 166, 185, 0.15);
}

/* Alert Styles */
.auth-alert {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    animation: shake 0.5s ease;
}

/* Stock Badges */
.stock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}
.stock-in {
    background: var(--secondary);
    color: white;
}
.stock-out {
    background: #e27c7c;
    color: white;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
