/**
 * TOK·TOC — Importaciones y Exportaciones
 * Paleta Oficial de Marca:
 * - Azul Marino: #0D1B3D
 * - Verde Energía: #4CAF50
 * - Gris Claro: #E6E6E6
 * - Tipografía: Poppins
 */

:root, [data-theme="light"] {
    /* Tema Claro: Blanco / Gris Suave & Azul Marino con Verde Energía */
    --bg-body: #F4F6F9;
    --bg-card: #FFFFFF;
    --bg-card-hover: #EAEFF5;
    --bg-glass: rgba(255, 255, 255, 0.94);
    --bg-dark: rgba(13, 27, 61, 0.95);
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    
    /* Texto - Azul Marino Profundo de alto contraste */
    --text-main: #0D1B3D;
    --text-muted: #4B5563;
    --text-dark: #0D1B3D;
    
    /* Botones Hover */
    --btn-hover-bg: rgba(13, 27, 61, 0.08);
    
    /* Acentos TOC·TOC (Verde Energía & Azul Marino) */
    --accent-1: #4CAF50;
    --accent-2: #43A047;
    --accent-3: #0D1B3D;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #0D1B3D 0%, #15264F 50%, #4CAF50 100%);
    --gradient-glow: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(13, 27, 61, 0.2));
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(13, 27, 61, 0.06);
    --shadow-md: 0 6px 18px rgba(13, 27, 61, 0.09);
    --shadow-lg: 0 12px 36px rgba(13, 27, 61, 0.12);
    --shadow-glow: 0 0 20px rgba(76, 175, 80, 0.3);
    
    /* Layout */
    --container-w: 1280px;
    --nav-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #060B18;
    --bg-card: #0D1B3D;
    --bg-card-hover: #14244D;
    --bg-glass: rgba(13, 27, 61, 0.90);
    --bg-dark: rgba(9, 16, 36, 0.97);
    --border: #1C3063;
    --border-light: #274182;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dark: #0D1B3D;
    
    --btn-hover-bg: rgba(255, 255, 255, 0.1);
    
    --accent-1: #4CAF50;
    --accent-2: #66BB6A;
    --accent-3: #2E7D32;
    
    --gradient-primary: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    --gradient-glow: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(13, 27, 61, 0.6));
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 20px rgba(76, 175, 80, 0.35);
}

/* ==========================================================================
   RESET & TIPOGRAFÍA OFICIAL POPPINS
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Poppins', 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Controles de Formulario Modernos */
select, .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-card);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 2.25rem 0.6rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}
select:focus, .form-select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}
select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], textarea {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}
input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="date"]:focus, textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    background-color: var(--bg-card);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: var(--transition);
}
input[type="checkbox"]:checked {
    background-color: var(--accent-1);
    border-color: var(--accent-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

.folio-badge, [data-folio] {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* ==========================================
   SELECTOR DE CANTIDAD (+ / -)
   ========================================== */
.qty-selector {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.5rem;
    box-shadow: var(--shadow-sm);
    user-select: none;
    gap: 0.25rem;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 700;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1;
    padding: 0;
}

.qty-btn:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.12);
    color: var(--accent-1);
    transform: scale(1.08);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
    text-align: center !important;
    width: 65px !important;
    min-width: 65px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    font-family: 'Outfit', 'Poppins', sans-serif !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    font-weight: 700;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilidades Textos */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}
.text-center { text-align: center; }
.texto-muted { color: var(--text-muted); }

/* ==========================================================================
   NAVBAR (GLASSMORPHISM)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--bg-glass);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    z-index: 1001;
}

.logo-img {
    height: 48px;
    max-width: 260px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
    display: block;
}

.footer-logo .logo-img {
    height: 54px;
    max-width: 280px;
}

.logo:hover .logo-img {
    transform: scale(1.03);
}

/* Control del logo según tema */
[data-theme="light"] .logo-light-img { display: block; }
[data-theme="light"] .logo-dark-img { display: none; }

[data-theme="dark"] .logo-light-img { display: none; }
[data-theme="dark"] .logo-dark-img { display: block; }

.logo-icon {
    width: 36px; 
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0%; height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover { background: var(--btn-hover-bg); }

.cart-btn { position: relative; }

.cart-badge {
    position: absolute;
    top: 4px; right: 2px;
    background: var(--accent-3);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}

.menu-toggle { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; padding: 0.5rem; border-radius: var(--radius-sm); }
.menu-toggle:hover { background: var(--btn-hover-bg); }

/* Search Overlay */
.search-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
}

.search-overlay.active {
    transform: translateY(0);
    opacity: 1;
}

.search-form { display: flex; width: 100%; align-items: center; gap: 1rem; }

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    outline: none;
}

.search-submit {
    background: transparent; border: none;
    color: var(--accent-1); font-weight: 600; cursor: pointer;
}

.search-close {
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 1.25rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.main-content {
    min-height: calc(100vh - var(--nav-height));
    padding-top: var(--nav-height);
}

.hero {
    position: relative;
    padding: 6rem 0 8rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
}

.glow-1 {
    width: 500px; height: 500px;
    background: var(--accent-1);
    top: -100px; right: -100px;
    animation: float 10s ease-in-out infinite;
}

.glow-2 {
    width: 400px; height: 400px;
    background: var(--accent-2);
    bottom: -100px; left: -100px;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 30px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

.hero-content {
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
}

.badge-premium {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero-badge-tag {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-1);
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.35);
    padding: 0.45rem 1.25rem;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-subtitle-small {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; }

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-store {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.875rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600; font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-store {
    background: var(--accent-1);
    color: #FFFFFF !important;
    border: 1px solid var(--accent-1);
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35);
}

.btn-primary-store:hover {
    background: var(--accent-2);
    color: #FFFFFF !important;
    border-color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(76, 175, 80, 0.5);
    opacity: 1;
}

.btn-outline-store {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-outline-store:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(76, 175, 80, 0.08);
    transform: translateY(-2px);
}

/* ==========================================================================
   SECCIONES Y GRID PRODUCTOS
   ========================================================================== */
.section { padding: 4rem 0; }

.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 2.5rem;
}

.section-title { font-size: 2.25rem; }

.link-arrow {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--accent-1); font-weight: 500; font-size: 0.9375rem;
}

.link-arrow:hover { gap: 0.75rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Tarjeta Producto */
.product-card {
    position: relative;
}

.product-image-wrap {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    margin-bottom: 1.25rem;
}

.product-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.product-img.secondary {
    position: absolute; top: 0; left: 0; opacity: 0;
}

.product-image-wrap:hover .product-img.primary { opacity: 0; transform: scale(1.05); }
.product-image-wrap:hover .product-img.secondary { opacity: 1; transform: scale(1.05); }

.product-badge {
    position: absolute; top: 1rem; left: 1rem;
    padding: 0.25rem 0.75rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    z-index: 2;
}

.product-badge.new { background: white; color: black; }
.product-badge.sale { background: var(--accent-3); color: white; }

.btn-quick-add {
    position: absolute; bottom: 1rem; right: 1rem;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(19, 21, 31, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; transform: translateY(10px);
    transition: var(--transition);
    z-index: 2;
}

.product-image-wrap:hover .btn-quick-add { opacity: 1; transform: translateY(0); }
.btn-quick-add:hover { background: var(--text-main); color: var(--bg-body); }

.product-info { padding: 0 0.25rem; }

.product-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem; font-weight: 500;
    margin-bottom: 0.5rem;
}

.product-name a { color: var(--text-main); }
.product-name a:hover { color: var(--accent-1); }

.product-price-row { display: flex; align-items: center; gap: 0.75rem; }
.product-price { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.125rem; }
.product-price-old { color: var(--text-muted); text-decoration: line-through; font-size: 0.875rem; }

/* ==========================================================================
   GRID CATEGORÍAS (ESTÉTICO & ADAPTABLE A MODO CLARO/OSCURO)
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex; 
    align-items: flex-end; 
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(197, 160, 89, 0.7);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.25);
}

.category-card.item-1 { 
    grid-column: span 2; 
    grid-row: span 2; 
    height: 100%; 
    min-height: 340px; 
}

.category-bg {
    position: absolute; 
    inset: 0; 
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Overlay adaptativo sobre la imagen de fondo */
.category-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.45) 100%);
    transition: background 0.35s ease;
}

.category-card:hover .category-bg { 
    transform: scale(1.06); 
}

.category-card:hover .category-bg::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.grad-1 { background: linear-gradient(135deg, #1e1b4b, #312e81, #4338ca); }
.grad-2 { background: linear-gradient(135deg, #0f172a, #1e293b, #334155); }
.grad-3 { background: linear-gradient(135deg, #18181b, #27272a, #3f3f46); }
.grad-4 { background: linear-gradient(135deg, #1e293b, #0f172a, #020617); }

/* Contenedor del nombre y botón (Modo Claro por defecto) */
.category-content { 
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(230, 225, 211, 0.95);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover .category-content {
    background: #FFFFFF;
    border-color: rgba(197, 160, 89, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.category-title { 
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem; 
    font-weight: 700;
    color: #0F172A !important;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.category-link { 
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #856113;
    background: rgba(197, 160, 89, 0.16);
    border: 1px solid rgba(197, 160, 89, 0.45);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    width: fit-content;
    box-shadow: 0 2px 6px rgba(197, 160, 89, 0.15);
    transition: all 0.25s ease;
}

.category-card:hover .category-link { 
    background: var(--accent-1); 
    color: #FFFFFF;
    border-color: var(--accent-1);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.45);
}

/* ==========================================================================
   TEMA OSCURO - TARJETAS DE CATEGORÍAS
   ========================================================================== */
[data-theme="dark"] .category-bg::after {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
}

[data-theme="dark"] .category-card:hover .category-bg::after {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.92) 100%);
}

[data-theme="dark"] .category-content {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .category-card:hover .category-content {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .category-title {
    color: #FFFFFF !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .category-link {
    color: #F8FAFC;
    background: rgba(197, 160, 89, 0.24);
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .category-card:hover .category-link {
    background: var(--accent-1);
    color: #0F172A;
    border-color: var(--accent-1);
}

/* ==========================================================================
   DESCRIPCIÓN DE PRODUCTO Y ENLACES
   ========================================================================== */
.product-description {
    line-height: 1.8;
    color: var(--text-muted);
}
.product-description p { margin-bottom: 0.85rem; }
.product-description a, .link-descripcion-producto {
    color: var(--accent-1);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.product-description a:hover, .link-descripcion-producto:hover {
    color: var(--accent-2);
    text-decoration-thickness: 2px;
}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.newsletter-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}

.glow-3 {
    width: 300px; height: 300px;
    background: var(--accent-1);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    opacity: 0.15;
}

.newsletter-content { position: relative; z-index: 1; max-width: 500px; margin: 0 auto; }
.newsletter-content h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.newsletter-content p { color: var(--text-muted); margin-bottom: 2rem; }

.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0 1rem; color: white;
    outline: none;
}
.newsletter-form input:focus { border-color: var(--accent-1); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-desc { color: var(--text-muted); margin-top: 1rem; font-size: 0.875rem; max-width: 300px; }
.footer-title { font-size: 1.125rem; margin-bottom: 1.5rem; }
.footer-link, .footer-contact {
    display: block; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.75rem;
}
.footer-link:hover { color: var(--text-main); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   CATÁLOGO Y VISTAS DE CATEGORÍAS (RESPONSIVE & MOBILE-FIRST)
   ========================================================================== */
.catalog-header {
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.catalog-header-con-bg {
    color: #FFFFFF;
}
.catalog-header-con-bg .catalog-page-title {
    color: #FFFFFF !important;
}
.catalog-header-con-bg .catalog-page-desc {
    color: rgba(255, 255, 255, 0.85) !important;
}
.catalog-header-con-bg .catalog-breadcrumb {
    color: rgba(255, 255, 255, 0.7);
}
.catalog-header-con-bg .catalog-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
}

.catalog-header-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.catalog-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.catalog-breadcrumb a:hover {
    color: var(--accent-1);
}

.catalog-breadcrumb-active {
    color: var(--accent-1);
    font-weight: 600;
}

.catalog-page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--text-main);
}

.catalog-page-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 650px;
}

/* Barra horizontal de píldoras de categorías para Móvil/Tablet */
.catalog-pills-bar {
    display: none;
    padding: 0.85rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.catalog-pills-bar::-webkit-scrollbar { display: none; }

.catalog-pills-track {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
    padding: 0.25rem 0.25rem;
}

.catalog-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.catalog-pill:hover, .catalog-pill.active {
    background: var(--accent-1);
    color: #FFFFFF !important;
    border-color: var(--accent-1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

/* Layout del Catálogo */
.catalog-layout {
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem 0 4rem;
}

.catalog-sidebar {
    width: 270px;
    flex-shrink: 0;
}

.catalog-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
    box-shadow: var(--shadow-sm);
}

.catalog-sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-category-item {
    margin-bottom: 0.35rem;
}

.catalog-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.catalog-category-link:hover {
    background: rgba(76, 175, 80, 0.08);
    color: var(--accent-1);
    padding-left: 1rem;
}

.catalog-category-link.active {
    background: var(--accent-1);
    color: #FFFFFF !important;
    font-weight: 600;
}

.catalog-main {
    flex: 1;
    min-width: 0;
}

.catalog-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    gap: 1rem;
}

.catalog-count-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.catalog-sort-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-sort-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.catalog-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.catalog-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.catalog-empty-icon {
    width: 72px;
    height: 72px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--accent-1);
}

.catalog-pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 3.5rem;
    flex-wrap: wrap;
}

.catalog-page-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    transition: var(--transition);
}

.catalog-page-btn:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}

.catalog-page-btn.active {
    background: var(--accent-1);
    color: #FFFFFF !important;
    border-color: var(--accent-1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .catalog-layout {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem 0 3rem;
    }

    .catalog-sidebar {
        display: none; /* En tablet y móvil se utiliza la barra de píldoras horizontal */
    }

    .catalog-pills-bar {
        display: block;
    }

    .catalog-header {
        padding: 2.5rem 0 2rem;
    }

    .category-grid { grid-template-columns: 1fr 1fr; }
    .category-card.item-1 { grid-column: span 1; grid-row: span 1; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 5rem;
    }

    .hero-title { font-size: 2.35rem; }
    .hero-subtitle-small { font-size: 0.875rem; }
    
    .nav-links {
        position: fixed; top: var(--nav-height); left: 0; right: 0;
        background: var(--bg-card); flex-direction: column; padding: 2rem;
        gap: 1.5rem; transform: translateY(-100%); opacity: 0; pointer-events: none;
        transition: var(--transition); border-bottom: 1px solid var(--border);
    }
    .nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .menu-toggle { display: block; }
    
    .category-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form input { padding: 1rem; }

    /* Adaptación Catálogo y Categorías en Móvil */
    .catalog-header {
        padding: 1.75rem 0 1.25rem;
    }

    .catalog-page-title {
        font-size: 1.75rem;
    }

    .catalog-page-desc {
        font-size: 0.875rem;
    }

    .catalog-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.75rem 0.85rem;
    }

    .catalog-sort-form {
        width: 100%;
        justify-content: space-between;
    }

    .catalog-sort-form select {
        flex: 1;
    }

    /* Grilla de 2 columnas en teléfonos (UX tipo app nativa) */
    .catalog-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-image-wrap {
        border-radius: var(--radius-md);
        margin-bottom: 0.75rem;
    }

    .product-name {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.35rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.2em;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .product-price-old {
        font-size: 0.75rem;
    }

    .product-badge {
        top: 0.5rem;
        left: 0.5rem;
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .btn-quick-add {
        opacity: 1;
        transform: translateY(0);
        width: 34px;
        height: 34px;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .btn-quick-add svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .catalog-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 0.85rem;
    }
}

/* ==========================================
   TOAST SYSTEM GLOBAL
   ========================================== */
#rt-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 2rem);
}
#rt-toast-container > * {
    pointer-events: auto;
}

/* ==========================================================================
   POPUP / ANUNCIO FLOTANTE PERSONALIZABLE (TOK·TOC)
   ========================================================================== */
.tok-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 24, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.tok-popup-backdrop.activo {
    opacity: 1;
    pointer-events: auto;
}

.tok-popup-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tok-popup-container.activo {
    opacity: 1;
    pointer-events: auto;
}

/* Tarjeta Base del Popup */
.tok-popup-card {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(76, 175, 80, 0.15);
    padding: 1.75rem;
    position: relative;
    max-width: 440px;
    width: calc(100vw - 32px);
    box-sizing: border-box;
}

.tok-popup-header {
    margin-bottom: 0.75rem;
    padding-right: 2rem;
}

.tok-popup-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.tok-popup-body {
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Botón de Cierre */
.tok-popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(13, 27, 61, 0.08);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

[data-theme="dark"] .tok-popup-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

.tok-popup-close-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.08);
}

/* ==========================================
   POSICIONAMIENTO EN DESKTOP (PC)
   ========================================== */
@media (min-width: 769px) {
    /* Modal Centro */
    .pos-desktop-centro {
        position: relative;
    }

    /* Flotante Abajo-Derecha */
    .pos-desktop-abajo_derecha {
        bottom: 25px;
        right: 25px;
    }

    /* Flotante Abajo-Izquierda */
    .pos-desktop-abajo_izquierda {
        bottom: 25px;
        left: 25px;
    }

    /* Barra Superior */
    .pos-desktop-arriba_barra {
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
    }
    .pos-desktop-arriba_barra .tok-popup-card {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 0.85rem 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    /* Barra Inferior */
    .pos-desktop-abajo_barra {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
    }
    .pos-desktop-abajo_barra .tok-popup-card {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 0.85rem 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================
   POSICIONAMIENTO EN MÓVIL (CELULAR)
   ========================================== */
@media (max-width: 768px) {
    /* Modal Centro */
    .pos-mobile-centro {
        position: relative;
    }

    /* Tarjeta Inferior (Bottom Sheet) */
    .pos-mobile-abajo_drawer {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
    .pos-mobile-abajo_drawer .tok-popup-card {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
        padding: 1.5rem 1.25rem 2rem 1.25rem;
    }

    /* Barra Superior */
    .pos-mobile-arriba_barra {
        top: 0;
        left: 0;
        width: 100%;
    }
    .pos-mobile-arriba_barra .tok-popup-card {
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        padding: 0.75rem 1rem;
    }
}

/* ==========================================
   ANIMACIONES DE ENTRADA Y SALIDA
   ========================================== */
/* Slide */
.anim-slide {
    transform: translateY(40px);
}
.anim-slide.activo {
    transform: translateY(0);
}

/* Fade */
.anim-fade {
    transform: translateY(0);
}

/* Zoom */
.anim-zoom {
    transform: scale(0.85);
}
.anim-zoom.activo {
    transform: scale(1);
}

/* ==========================================
   SELECTOR DE CANTIDAD (+ / -) ELEGANTE & EXPANDIDO
   ========================================== */
.qty-selector {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card, #ffffff);
    border: 1.5px solid var(--border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    padding: 0.35rem 0.5rem;
    gap: 0.35rem;
    min-width: 140px;
    height: 52px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qty-selector:focus-within {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.qty-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border: none;
    background: var(--bg-main, #f3f4f6);
    color: var(--text-main, #1f2937);
    border-radius: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    padding: 0;
}

[data-theme="dark"] .qty-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
}

.qty-btn:hover:not(:disabled) {
    background: var(--accent-1, #c5a059);
    color: #ffffff;
    transform: scale(1.05);
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qty-input {
    width: 55px !important;
    min-width: 55px !important;
    max-width: 70px !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: center !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: var(--text-main, #111827) !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

