/* --- PALETA LUXURY REFINED --- */
:root {
    --gold: #d4af37;
    --gold-dark: #aa842c;
    --gold-gradient: linear-gradient(135deg, #e6c86e 0%, #bf953f 50%, #a2791d 100%);
    --white-bg: #ffffff;
    --text-dark: #111111;
    --text-soft: #444444;
    --font-title: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --red-offer: #b91c1c;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background: url('fondo.webp') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-dark);
    font-family: var(--font-body);
    overflow-x: hidden; 
}

.background-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.15); 
    z-index: -1;
}

h1, h2, h3, h4 { font-family: var(--font-title); margin: 0; }

/* HEADER */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 12px 5%;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.logo-wrapper { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 50px; border-radius: 50%; border: 2px solid var(--gold); padding: 1px; }
.brand { font-family: var(--font-title); font-weight: 700; color: var(--text-dark); font-size: 1.4rem; letter-spacing: 2px; }
.sub-brand { display: block; font-size: 0.65rem; letter-spacing: 4px; color: var(--gold-dark); text-align: center; margin-top: -2px; }

.menu-usuario { display: flex; gap: 15px; align-items: center; }

.btn-icon {
    background: white; border: 1px solid var(--gold);
    padding: 10px 20px; border-radius: 50px;
    font-size: 1rem; cursor: pointer; color: var(--text-dark);
    transition: all 0.3s ease; position: relative;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.btn-icon:hover {
    background: var(--gold); color: white;
    transform: translateY(-3px); box-shadow: 0 6px 12px rgba(212, 175, 55, 0.3);
    border-color: var(--gold);
}
.badge { position: absolute; top: -5px; right: -5px; background: #d33; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); border: 2px solid white; font-weight: bold; }
.btn-admin { background: none; border: none; font-size: 1.2rem; color: #999; cursor: pointer; transition: 0.3s; padding: 0 10px; }
.btn-admin:hover { color: var(--gold); }

/* HERO SECTION */
.hero-banner {
    height: 85vh; 
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 20px; position: relative;
}
.hero-content { max-width: 900px; animation: fadeInUp 1.5s ease-out; }
.adorno-flotante {
    font-size: 3rem; color: var(--gold-dark); margin-bottom: 10px;
    animation: float 3s ease-in-out infinite; text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.hero-subtitle {
    display: block; font-size: 0.9rem; letter-spacing: 6px; color: #000;
    margin-bottom: 15px; font-weight: 700; text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}
.hero-content h1 {
    font-size: 4.5rem; line-height: 1.1; color: #000;
    margin-bottom: 20px; text-shadow: 0 0 20px rgba(255,255,255, 1);
}
.hero-description {
    font-size: 1.3rem; color: #111; margin-bottom: 40px;
    font-weight: 500; text-shadow: 0 0 8px rgba(255,255,255,0.9);
    max-width: 600px; margin-left: auto; margin-right: auto;
}

.btn-gold-luxury {
    background: var(--gold-gradient); border: none; padding: 18px 50px;
    color: #3d2e00; font-weight: 700; font-size: 0.9rem; letter-spacing: 3px;
    text-transform: uppercase; cursor: pointer; font-family: var(--font-title);
    box-shadow: 0 10px 30px rgba(191, 149, 63, 0.3); transition: all 0.4s ease;
    position: relative; overflow: hidden;
}
.btn-gold-luxury:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(191, 149, 63, 0.5); }

/* CATÁLOGO */
.seccion-productos { padding: 60px 5%; background: rgba(255,255,255,0.6); backdrop-filter: blur(5px); }
.titulo-seccion {
    text-align: center; margin-bottom: 30px; display: flex;
    align-items: center; justify-content: center; gap: 20px;
}
.linea-lateral { height: 1px; width: 80px; background: var(--gold); }
.titulo-seccion h2 { font-size: 2.5rem; color: #111; letter-spacing: 2px; }

.buscador-container { display: flex; justify-content: center; margin-bottom: 50px; padding: 0 20px; }
.input-wrapper { position: relative; width: 100%; max-width: 500px; }
.input-wrapper input {
    width: 100%; padding: 15px 20px 15px 50px;
    border-radius: 50px; border: 1px solid var(--gold);
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body); font-size: 1rem; color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); outline: none; transition: 0.3s;
}
.input-wrapper input:focus { box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3); background: #fff; }
.icono-busqueda { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--gold-dark); }

.grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 40px; }

/* TARJETAS */
.producto-card {
    background: #fff; padding: 20px; text-align: center;
    transition: 0.4s ease; border: 1px solid #f0f0f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); position: relative; border-radius: 8px; overflow: hidden;
}
.producto-card:hover { border-color: var(--gold); box-shadow: 0 15px 40px rgba(0,0,0,0.1); transform: translateY(-5px); }
.producto-img { width: 100%; height: 250px; object-fit: contain; margin-bottom: 15px; transition: transform 0.5s ease; }
.producto-card:hover .producto-img { transform: scale(1.05); }

.producto-card h3 { font-size: 0.95rem; margin: 10px 0; font-weight: 600; letter-spacing: 1px; color: #222; height: 40px; display: flex; align-items: center; justify-content: center; }

/* PRECIOS */
.precio-contenedor { display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 10px; height: 50px; }
.precio { font-family: var(--font-title); font-size: 1.3rem; color: var(--text-dark); font-weight: bold; }
.precio-tachado { text-decoration: line-through; color: #999; font-size: 0.9rem; margin-bottom: 2px; }
.precio-oferta { font-family: var(--font-title); font-size: 1.4rem; color: var(--red-offer); font-weight: bold; }

/* ETIQUETA OFERTA */
.tag-oferta {
    position: absolute; top: 10px; right: 10px;
    background: linear-gradient(45deg, #b91c1c, #e74c3c); color: white;
    font-size: 0.7rem; padding: 5px 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 10;
}

.btn-add { width: 100%; padding: 12px; background: transparent; border: 1px solid #222; color: #222; cursor: pointer; transition: 0.3s; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 2px; font-weight: 600; }
.btn-add:hover:not(:disabled) { background: #222; color: var(--gold); }
.btn-add:disabled { border-color: #ccc; color: #ccc; cursor: not-allowed; }

/* MODALES */
.modal { display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); justify-content: center; align-items: center; }
.glass-effect { background: #fff; padding: 40px; width: 90%; max-width: 500px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); border: 1px solid var(--gold); }
.modal-header { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.modal-header h2 { font-size: 1.4rem; font-family: var(--font-title); }
.cerrar-modal { font-size: 1.5rem; cursor: pointer; color: #999; transition: 0.2s; }
.cerrar-modal:hover { color: var(--gold); transform: rotate(90deg); }
.carrito-scroll { max-height: 300px; overflow-y: auto; }
.item-carrito { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #f9f9f9; }
.resumen-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-family: var(--font-title); color: var(--gold-dark); border-top: 2px solid #eee; padding-top: 20px; margin-top: 10px; font-weight: bold; }
.input-group { display: flex; align-items: center; background: #f5f5f5; padding: 0 15px; margin-bottom: 20px; border: 1px solid #eee; }
.input-group input, .input-light { width: 100%; padding: 15px; background: transparent; border: none; outline: none; font-family: var(--font-body); }
.btn-whatsapp-full { width: 100%; background: #111; color: white; border: none; padding: 15px; font-weight: bold; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.btn-whatsapp-full:hover { background: var(--gold); color: #000; }

/* ADMIN */
.admin-nav { background: #fff; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-bottom: 1px solid #eee; }
.admin-brand { font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; letter-spacing: 1px; }
.btn-back { background: transparent; border: 1px solid #ddd; padding: 8px 20px; cursor: pointer; transition: 0.3s; }
.btn-back:hover { border-color: var(--gold); color: var(--gold); }
.admin-container { padding: 40px 5%; max-width: 1200px; margin: 0 auto; }
.admin-grid-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 25px; border-radius: 4px; display: flex; align-items: center; gap: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border-left: 3px solid transparent; }
.stat-card.warning { border-left-color: #f39c12; }
.stat-card.success { border-left-color: #27ae60; }
.stat-card.security-card { border-left-color: #333; }
.stat-icon { width: 50px; height: 50px; border-radius: 50%; background: #f4f4f4; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #555; }
.stat-info h3 { font-size: 0.8rem; text-transform: uppercase; color: #999; margin-bottom: 5px; }
.stat-info button { border: none; background: none; font-weight: bold; cursor: pointer; padding: 0; color: #333; }
.password-change-group { display: flex; gap: 5px; }
.password-change-group input { width: 100%; padding: 5px; border: 1px solid #ddd; font-size: 0.8rem; }
.btn-small { background: #333; color: white; border: none; padding: 5px 10px; cursor: pointer; font-size: 0.7rem; }
.glass-card-admin { background: rgba(255,255,255,0.9); padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #fff; }
.header-management { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.search-box { display: flex; align-items: center; background: #fff; border: 1px solid #eee; padding: 0 15px; border-radius: 50px; width: 300px; }
.search-box input { border: none; padding: 12px; width: 100%; outline: none; }
.add-product-form { background: #fcfcfc; padding: 20px; border: 1px dashed #ddd; margin-bottom: 30px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.form-row input { flex: 1; padding: 12px; border: 1px solid #eee; background: white; }
.btn-save { background: var(--gold); color: white; border: none; padding: 12px 30px; cursor: pointer; font-weight: bold; }
.table-container-luxury { overflow-x: auto; }
#tabla-stock { width: 100%; border-collapse: collapse; }
#tabla-stock th { text-align: left; padding: 15px; background: #f9f9f9; color: #777; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
#tabla-stock td { padding: 15px; border-bottom: 1px solid #f0f0f0; background: white; }
/* Botones de Acción Admin */
.action-btn { border: none; cursor: pointer; width: 30px; height: 30px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; margin: 0 2px; color: white; font-size: 0.8rem; }
.btn-edit-img { background-color: #3498db; }
.btn-offer { background-color: #9b59b6; }
.btn-plus { background-color: #2ecc71; }
.btn-minus { background-color: #e74c3c; }
.btn-del { background-color: #95a5a6; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.8rem; }
    .form-row { flex-direction: column; }
    .search-box { width: 100%; }
}
/* --- BOTÓN DE WHATSAPP FLOTANTE --- */
.btn-wsp-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Verde oficial WhatsApp */
    color: white;
    padding: 12px 25px;
    border-radius: 50px; /* Forma de píldora */
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Sombra para que flote */
    z-index: 1000; /* Para que esté siempre encima de todo */
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre icono y texto */
    transition: all 0.3s ease;
    border: 2px solid white; /* Borde blanco para resaltar */
}

.btn-wsp-flotante i {
    font-size: 1.3rem;
}

.btn-wsp-flotante:hover {
    background-color: #128C7E; /* Verde más oscuro al pasar el mouse */
    transform: translateY(-3px) scale(1.05); /* Efecto de elevación */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Ajuste para móviles (un poco más pequeño) */
@media (max-width: 600px) {
    .btn-wsp-flotante {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
/* --- ESTILOS DE LA VENTANA MODAL (LOGIN) --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000; /* Muy alto para que se vea encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro transparente */
    backdrop-filter: blur(5px); /* Efecto borroso de lujo */
    justify-content: center;
    align-items: center;
}

.contenido-modal {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 1px solid var(--gold);
    position: relative;
}

.cerrar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}
.cerrar-modal:hover { color: var(--red-offer); }
/* --- NOTIFICACIÓN TOAST (MENSAJE FLOTANTE) --- */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #111;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-size: 1rem;
    border: 1px solid var(--gold);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* LISTA DE AGOTADOS */
.agotado-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    justify-content: space-between;
}
.agotado-item strong { color: #b91c1c; }

/* MEJORA DE MODALES */
.contenido-modal { animation: zoomIn 0.3s ease; }
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* BOTÓN WHATSAPP */
.btn-wsp-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    border: 2px solid white;
}
.btn-wsp-flotante:hover {
    transform: translateY(-3px);
    background-color: #128C7E;
}