:root {
    --bg-dark: #050508;
    --orange-glow: #ff6a00;
    --pink-glow: #ff1f5a;
    
    /* EL SECRETO DEL CRISTAL: Blanco ultra-transparente, cero negros */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 100%);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --danger: #ff453a;
    --success: #34c759;
}

/* ======== ESTRUCTURA GENERAL ======== */
.container { 
    max-width: 1200px; /* Asegura que el contenido no se extienda infinitamente en pantallas grandes */
    margin: 0 auto;    /* Centra el contenedor en la pantalla */
    padding: 0 20px; 
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; }

body {
    background-color: var(--bg-dark);
    /* Patrón de puntos para la textura del fondo */
    background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 0 0 60px 0; /* Removido el padding lateral aquí */
    line-height: 1.5;
}

/* ======== CONTENEDORES ======== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== ESFERAS NEÓN (Optimizadas: 0 lag, 60fps) ======== */
.bg-blobs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; pointer-events: none;
}
.blob {
    position: absolute; 
    border-radius: 50%; 
    opacity: 0.65;
    /* ELIMINAMOS filter: blur() QUE CAUSABA EL LAG */
    animation: float 25s ease-in-out infinite alternate;
    will-change: transform; 
}
/* Simulamos el desenfoque usando gradientes suaves hacia transparente */
.blob-1 { 
    width: 60vw; height: 60vw; 
    background: radial-gradient(circle, rgba(255, 106, 0, 0.45) 0%, rgba(255, 106, 0, 0.15) 40%, transparent 70%);
    top: -20%; left: -20%; 
}
.blob-2 { 
    width: 70vw; height: 70vw; 
    background: radial-gradient(circle, rgba(255, 31, 90, 0.45) 0%, rgba(255, 31, 90, 0.15) 40%, transparent 70%);
    bottom: -20%; right: -20%; 
    animation-delay: -5s; 
}
.blob-3 { 
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(0, 158, 227, 0.3) 0%, rgba(0, 158, 227, 0.1) 40%, transparent 70%);
    top: 20%; left: 25%;
    animation-delay: -9s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5vw, -5vw) scale(1.05); }
}

/* ======== VERDADERO APPLE LIQUID GLASS ======== */
.glass-card {
    background: var(--glass-bg);
    /* El "saturate" aviva los colores de las esferas que están detrás */
    backdrop-filter: blur(24px) saturate(180%); 
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    
    border: 1px solid var(--glass-border);
    /* Reflejo de luz duro en el borde superior e izquierdo (Simula grosor del vidrio) */
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    
    border-radius: 24px; 
    padding: 30px; 
    margin-bottom: 25px;
    
    /* Sombra profunda exterior + Brillo interno general */
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5), 
        inset 0 0 20px rgba(255, 255, 255, 0.02);
    
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Capa de reflejo de luz superior dentro del cristal */
.glass-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 120px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
    pointer-events: none; z-index: 0;
}
.glass-card > * { position: relative; z-index: 1; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.5px; margin-bottom: 15px; color: #fff; }
h1 { background: linear-gradient(135deg, #ffffff, #a1a1aa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ======== NAVEGACIÓN Y LOGO ======== */
.nav-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 40px;
}
.nav-logo {
    font-size: 24px; font-weight: 800; color: #fff; text-decoration: none;
    display: flex; align-items: center; gap: 12px; letter-spacing: -1px;
}
.nav-logo-img { height: 36px; width: auto; filter: drop-shadow(0 0 12px rgba(255, 106, 0, 0.6)); transition: transform 0.3s ease; }
.nav-logo:hover .nav-logo-img { transform: scale(1.05); filter: drop-shadow(0 0 18px rgba(255, 31, 90, 0.8)); }
.nav-actions { display: flex; align-items: center; gap: 15px; }

/* ======== SELECTOR DE MONEDA (Diseño Píldora Premium) ======== */
select.glass-select { 
    width: auto !important; /* Evita que se estire gigante en el checkout */
    min-width: 90px;
    background: rgba(0,0,0,0.4); 
    border: 1px solid rgba(255,255,255,0.15); 
    color: white; 
    padding: 8px 35px 8px 16px !important; 
    border-radius: 20px !important; /* Aspecto de píldora moderna */
    outline: none; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 600; 
    transition: 0.3s; 
    appearance: none; 
    -webkit-appearance: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    /* Flecha personalizada blanca en lugar de la gris por defecto */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
select.glass-select:hover, select.glass-select:focus { 
    background-color: rgba(255,255,255,0.1); 
    border-color: var(--orange-glow); 
}
select.glass-select option { color: black; }

/* ======== BOTONES ======== */
.btn {
    background: linear-gradient(135deg, var(--orange-glow), var(--pink-glow));
    color: white; border: none; padding: 10px 20px; border-radius: 8px; /* Ajustado el padding y border-radius */
    font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; box-shadow: 0 4px 15px rgba(255, 31, 90, 0.2); /* Sombra más sutil */
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 31, 90, 0.35); }

.btn-secondary { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); box-shadow: inset 0 1px 2px rgba(255,255,255,0.05); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.btn-danger { background: rgba(255, 59, 48, 0.15); color: #ff453a; border: 1px solid rgba(255, 59, 48, 0.3); }
.btn-danger:hover { background: #ff3b30; color: #fff; box-shadow: 0 5px 15px rgba(255, 59, 48, 0.3); }

/* ======== INPUTS DE FORMULARIO VIDRIOSOS ======== */
.grid { display: grid; grid-template-columns: 1fr 2fr; gap: 25px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }

input, textarea {
    width: 100%; 
    background: rgba(0, 0, 0, 0.25); 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(0,0,0,0.6); /* Sombra interna para hundir el input */
    border-radius: 14px; padding: 14px 16px; color: #fff; outline: none; transition: all 0.3s ease;
    font-size: 14px; box-shadow: inset 0 4px 8px rgba(0,0,0,0.5);
}
input:focus, textarea:focus { 
    border-color: var(--orange-glow); 
    background: rgba(0, 0, 0, 0.4); 
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.2), inset 0 4px 8px rgba(0,0,0,0.5); 
}

/* ======== TABLAS ======== */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 15px; font-size: 14px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; background: rgba(0,0,0,0.2); }
th:first-child { border-top-left-radius: 10px; } th:last-child { border-top-right-radius: 10px; }

/* ======== GRID DE PRODUCTOS (TIENDA) ======== */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%); 
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    
    border-radius: 20px; padding: 16px; 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; flex-direction: column; position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.02);
}
.product-card:hover {
    transform: translateY(-8px); 
    border-color: rgba(255, 106, 0, 0.5);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 25px rgba(255, 106, 0, 0.2);
}

.product-image-wrapper { width: 100%; height: 200px; border-radius: 14px; overflow: hidden; position: relative; margin-bottom: 18px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05); }
.product-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.product-card:hover .product-image-wrapper img { transform: scale(1.08); }

.badge-category {
    position: absolute; top: 12px; left: 12px; 
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 6px 14px; border-radius: 20px; 
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.product-info { display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.product-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.08); }
.product-price { font-size: 18px; font-weight: 800; color: #fff; }

.btn-buy { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: white; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; transition: 0.3s; }
.product-card:hover .btn-buy { background: linear-gradient(135deg, var(--orange-glow), var(--pink-glow)); border-color: transparent; }

.cart-badge { background: var(--pink-glow); color: white; border-radius: 50%; padding: 2px 6px; font-size: 11px; font-weight: bold; margin-left: 5px; box-shadow: 0 0 10px rgba(255,31,90,0.5); }