:root {
    --negro: #0a0a0a;
    --rosa: #ff4081;
    --rosa-claro: #ff80ab;
    --blanco: #ffffff;
    --gris-fondo: #f5f5f5;
    --sombra-suave: 0 8px 20px rgba(0,0,0,0.08);
    --transicion: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    --bg-card: #ffffff;
    --texto: #0a0a0a;
    --texto-claro: #555;
    --borde: #eee;
    --header-bg: rgba(10, 10, 10, 0.95);
    --carrito-bg: rgba(255, 255, 255, 0.9);
}

body.dark {
    --negro: #1e1e1e;          /* 👈 oscuro para botones */
    --rosa: #ff80ab;
    --gris-fondo: #121212;
    --bg-card: #1e1e1e;
    --texto: #f5f5f5;
    --texto-claro: #aaa;
    --borde: #333;
    --header-bg: rgba(30, 30, 30, 0.95);
    --carrito-bg: rgba(30, 30, 30, 0.9);
    --sombra-suave: 0 8px 20px rgba(255,255,255,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--gris-fondo);
    color: var(--texto);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ========== HEADER ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-toggle {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transicion);
    padding: 5px;
    border-radius: 50%;
}
.dark-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--rosa);
}

.logo h2 {
    font-weight: 600;
    font-size: 1.3em;
}

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

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transicion);
}

nav a:hover {
    color: var(--rosa);
}

/* MENÚS DESPLEGABLES */
.menu-productos,
.menu-contacto {
    position: relative;
    cursor: pointer;
}

.submenu,
.submenu-contacto {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: var(--bg-card);
    min-width: 170px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    z-index: 2000;
    overflow: hidden;
}

.submenu a,
.submenu-contacto a {
    display: block;
    padding: 12px 20px;
    color: var(--texto);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.submenu a:hover,
.submenu-contacto a:hover {
    background: var(--gris-fondo);
    color: var(--rosa);
}

.submenu.show,
.submenu-contacto.show {
    display: block;
    animation: fadeInDown 0.25s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BUSCADOR */
.buscador {
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    width: 220px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    outline: none;
    transition: var(--transicion);
}
.buscador::placeholder { color: #ccc; }
.buscador:focus {
    background: rgba(255, 255, 255, 0.25);
    width: 250px;
}

/* CARRITO ICONO */
.carrito {
    font-size: 26px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}
.carrito:hover { transform: scale(1.1); }

#contador {
    background: var(--rosa);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 12px;
    position: absolute;
    top: -8px;
    right: -12px;
    font-weight: 600;
    transition: var(--transicion);
}
#contador.pulse {
    animation: pop 0.4s ease;
}
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); background: #ff80ab; }
    100% { transform: scale(1); }
}

/* ========== PRODUCTOS (GRID) ========== */
.productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 40px;
    max-width: 1300px;
    margin: auto;
}

/* Esqueleto de carga */
.skeleton-card {
    background: var(--bg-card);
    border-radius: 20px;
    height: 380px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
}
.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(128,128,128,0.1), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    100% { left: 100%; }
}

/* Tarjeta real */
.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--sombra-suave);
    text-align: center;
    transition: var(--transicion);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s;
}
.card.visible {
    opacity: 1;
    transform: translateY(0);
}
.card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transicion);
}
.card:hover img { transform: scale(1.03); }
.card h3 {
    margin: 12px 0 5px;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--texto);
}
.card p {
    font-size: 20px;
    font-weight: 700;
    color: var(--rosa);
    margin: 5px 0 12px;
}
.card button {
    background: var(--negro);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    position: relative;
    overflow: hidden;
}
.card button:hover {
    background: var(--rosa);
    box-shadow: 0 8px 20px rgba(255,64,129,0.4);
}
/* Efecto onda */
.card button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.card button:active::after {
    width: 300px;
    height: 300px;
}
.ver-detalle {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--texto-claro);
    text-decoration: none;
    font-weight: 500;
}
.ver-detalle:hover { color: var(--rosa); }

/* INSIGNIAS */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--rosa);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ========== CARRITO PANEL ========== */
#carrito-panel {
    position: fixed;
    right: 20px;
    top: 90px;
    background: var(--carrito-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
#lista-carrito {
    list-style: none;
    margin: 15px 0;
}
#lista-carrito li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--borde);
    color: var(--texto);
}
#lista-carrito button {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}
#lista-carrito button:hover { background: #cc0000; }

/* ========== VISOR IMAGEN ========== */
#visor-imagen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
#imagen-grande {
    max-width: 85%;
    max-height: 85%;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}
#cerrar-visor {
    position: absolute;
    top: 25px; right: 35px;
    font-size: 45px;
    color: white;
    cursor: pointer;
    font-weight: 300;
}
#cerrar-visor:hover { color: var(--rosa); transform: scale(1.2); }

/* ========== PERSONALIZADAS ========== */
.personalizadas-section {
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-card);
    margin: 40px;
    border-radius: 20px;
    box-shadow: var(--sombra-suave);
}
.personalizadas-section h2 { font-size: 2em; color: var(--texto); }
.personalizadas-section p { margin-top: 15px; font-size: 18px; color: var(--texto-claro); }
.btn-whatsapp {
    margin-top: 25px;
    width: 260px;
    background: var(--negro);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
}
.btn-whatsapp:hover { background: var(--rosa); }

/* ========== BOTÓN VOLVER ARRIBA ========== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--rosa);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transicion);
    z-index: 998;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background: #e0306b; transform: translateY(-3px); }

/* ========== WHATSAPP FLOTANTE ========== */
.whatsapp-flotante {
    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;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transicion);
    text-decoration: none;
}
.whatsapp-flotante:hover { transform: scale(1.1) rotate(10deg); }

/* ========== FOOTER ========== */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ccc;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}
.redes a { color: white; margin: 0 12px; text-decoration: none; font-weight: 600; }
.redes a:hover { color: var(--rosa); }

/* BANNER */
.banner-img {
    width: 100%;
    background: black;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}
.banner-img img {
    width: 100%;
    max-width: 1200px;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s;
}
.banner-img:hover img { transform: scale(1.01); }

/* ========== PÁGINA DE DETALLE ========== */
.header-detalle {
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.header-detalle .volver { color: var(--rosa); text-decoration: none; font-weight: 600; }
.detalle-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; }
.producto-detalle {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    align-items: center;
}
.imagen-detalle { flex: 1 1 300px; max-width: 350px; margin: 0 auto; }
.imagen-detalle img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; background: #fafafa; }
.info-detalle { flex: 1 1 280px; display: flex; flex-direction: column; gap: 15px; color: var(--texto); }
.info-detalle h2 { font-size: 26px; font-weight: 600; }
.precio { font-size: 26px; font-weight: 700; color: var(--rosa); }
.btn-agregar-detalle {
    background: var(--negro);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    width: fit-content;
    position: relative;
    overflow: hidden;
}
.btn-agregar-detalle:hover { background: var(--rosa); box-shadow: 0 8px 20px rgba(255,64,129,0.4); }
.btn-agregar-detalle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn-agregar-detalle:active::after { width: 300px; height: 300px; }
.descripcion { font-size: 15px; line-height: 1.6; color: var(--texto-claro); }
.medios-pago { background: var(--gris-fondo); padding: 15px; border-radius: 12px; }
.medios-pago h3 { margin-bottom: 10px; color: var(--texto); }
.medios-pago ul { list-style: none; padding: 0; }
.medios-pago li { margin-bottom: 8px; font-size: 14px; color: var(--texto-claro); }
.whatsapp-detalle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 14px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: var(--transicion);
    width: fit-content;
}
.whatsapp-detalle:hover { background: #1ebe5b; transform: translateY(-2px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 15px 20px; }
    nav { order: 2; width: 100%; justify-content: center; flex-wrap: wrap; }
    .buscador { order: 3; width: 90%; }
    .carrito { order: 4; }
    .productos { padding: 20px; gap: 15px; }
    #carrito-panel { width: 90%; right: 5%; left: 5%; }
    .personalizadas-section { margin: 20px; padding: 40px 20px; }
    .whatsapp-flotante { width: 55px; height: 55px; font-size: 24px; bottom: 20px; right: 20px; }
    .back-to-top { bottom: 80px; right: 20px; }
    .producto-detalle { flex-direction: column; padding: 20px; gap: 20px; align-items: center; }
    .imagen-detalle { max-width: 250px; }
    .imagen-detalle img { max-height: 250px; }
    .info-detalle h2 { font-size: 22px; }
    .whatsapp-detalle { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .productos { grid-template-columns: 1fr; }
    .imagen-detalle { max-width: 200px; }
    .imagen-detalle img { max-height: 200px; }
}