:root {
    --primary-color: #ffffff;
    --secondary-color: #ffffff;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.8);
    --navbar-bg: linear-gradient(90deg, rgba(121, 5, 203, 0.85), rgba(255, 0, 0, 0.85));
    --input-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(15px);
    --transition-speed: 0.3s;
    --surface-bg: #f8f9fa;
    --feedback-loading-bg: #e3f2fd;
    --feedback-success-bg: #e8f5e9;
    --feedback-error-bg: #fdecea;
    --state-deleted-bg: #ffebee;
    --state-deleted-text: #c62828;
    --state-comprado-bg: #e3f2fd;
    --state-comprado-text: #1565c0;
    --state-completado-bg: #f1f8e9;
    --state-completado-text: #2e7d32;
    --state-manual-bg: #fffdf0;
    --state-reposicion-bg: #fff5f5;
    --product-name-color: #111111;
    --product-price-color: #1a7a2e;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.7);
    --navbar-bg: linear-gradient(90deg, rgba(76, 5, 135, 0.85), rgba(153, 0, 0, 0.85));
    --input-bg: rgba(30, 41, 59, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(15, 23, 42, 0.8);
    --surface-bg: #1e293b;
    --feedback-loading-bg: #1e3a8a;
    --feedback-success-bg: #064e3b;
    --feedback-error-bg: #450a0a;
    --state-deleted-bg: #451a1a;
    --state-deleted-text: #fecaca;
    --state-comprado-bg: #1e3a8a;
    --state-comprado-text: #dbeafe;
    --state-completado-bg: #064e3b;
    --state-completado-text: #d1fae5;
    --state-manual-bg: #422006;
    --state-reposicion-bg: #450a0a;
    --product-name-color: #cbd5e1;
    --product-price-color: #4ade80;
}

[data-theme="eye-care"] {
    --bg-color: #fcf5e5;
    --text-color: #433422;
    --card-bg: rgba(250, 240, 225, 0.85);
    --navbar-bg: linear-gradient(90deg, rgba(205, 133, 63, 0.9), rgba(210, 105, 30, 0.9));
    --input-bg: rgba(255, 250, 240, 0.9);
    --border-color: rgba(139, 69, 19, 0.15);
    --card-shadow: 0 10px 25px -5px rgba(139, 69, 19, 0.1), 0 8px 10px -6px rgba(139, 69, 19, 0.05);
    --glass-bg: rgba(252, 245, 229, 0.8);
    --surface-bg: #f4e8d3;
    --feedback-loading-bg: #f5deb3;
    --feedback-success-bg: #dcedc8;
    --feedback-error-bg: #ffccbc;
    --state-deleted-bg: #ffccbc;
    --state-deleted-text: #bf360c;
    --state-comprado-bg: #bbdefb;
    --state-comprado-text: #0d47a1;
    --state-completado-bg: #c8e6c9;
    --state-completado-text: #1b5e20;
    --state-manual-bg: #ffecb3;
    --state-reposicion-bg: #ffe0b2;
    --product-name-color: #111111;
    --product-price-color: #1a7a2e;
}

[data-theme="eye-care"] img:not(.logo img) {
    mix-blend-mode: multiply;
    filter: sepia(0.2) contrast(0.95);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Evitar scroll horizontal del documento (p. ej. las flechas del teclado)
   sin romper position: sticky ni el scroll horizontal interno (carrusel, drawers). */
html,
body {
    overflow-x: clip;
}
@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

.main-header {
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid var(--border-color);
}

#topBar {
    margin-top: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px 2px 20px;
    font-size: 0.85em;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10001 !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
    background: var(--navbar-bg);
    color: white;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1 !important;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.mov-ingreso {
    background: #e8f5e9;
    color: #2e7d32;
}

.mov-egreso {
    background: #ffebee;
    color: #c62828;
}

.mov-credito {
    background: #e3f2fd;
    color: #1565c0;
}

.text-ingreso {
    color: #2e7d32;
}

.text-egreso {
    color: #c62828;
}

.text-credito {
    color: #1565c0;
}

.mov-transferencia {
    background: #f0f2f5;
    color: #607d8b;
}

.text-transferencia {
    color: #607d8b;
}

.contenedor-buscar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-bottom: 0px;
}

.form-buscar {
    display: flex;
    gap: 10px;
    background-color: hsla(0, 0%, 79%, 0.91);
    align-items: center;
    padding: 5px 10px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.select-buscar {
    padding: 5px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.select-buscar:focus,
.input-buscar:focus {
    border-color: #777;
}

.input-buscar {
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
    width: 100%;
}

/* Autocomplete Search suggestions */
.input-buscar-container {
    position: relative;
    flex-grow: 1;
    display: flex;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2100;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    margin-top: -5px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    color: var(--text-color);
}

.suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.suggestion-item:hover {
    background-color: rgba(106, 13, 173, 0.1);
}

.suggestion-name {
    font-weight: 500;
}

.suggestion-cat {
    font-size: 0.75em;
    color: #6a0dad;
    background: rgba(106, 13, 173, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.button-buscar {
    background-color: #333;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-buscar:hover {
    background-color: #555;
    transform: scale(1.1);
}

.contenedor-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

@media (min-width: 1200px) {
    .contenedor-productos {
        grid-template-columns: repeat(8, 1fr);
    }
}

.producto-card {
    border: 1px solid var(--border-color);
    padding: 0 0 12px 0;
    text-align: center;
    box-shadow: var(--card-shadow);
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    overflow: hidden;
    /* Ensure image doesn't overflow corners */
}

.producto-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
    z-index: 20;
    overflow: visible;
}

.producto-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 0;
    /* Removed margin */
    background-color: transparent;
    /* Ensure consistent background */
}

/* Suavizar el brillo de las imágenes en modo oscuro para que los fondos blancos no molesten */
[data-theme="dark"] .producto-card img {
    filter: brightness(0.85) contrast(1.05);
}

.producto-card .product-image-container {
    width: 100%;
    margin: 0;
}

.producto-card h3,
.producto-card .precios,
.producto-card .actions {
    padding: 0 15px;
}

.producto-card h3 {
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.producto-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #10b981;
    margin-right: 6px;
    vertical-align: middle;
    box-sizing: border-box;
    flex-shrink: 0;
}

.producto-stock-badge.badge-azul { background: #1a73e8; }
.producto-stock-badge.badge-amarillo { background: #f59e0b; color: #1e293b; }
.producto-stock-badge.badge-rojo { background: #dc2626; }

.producto-nombre {
    overflow-wrap: anywhere;
}

.producto-card .precios {
    margin-bottom: 15px;
}

.overlay-agregar {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #28a745;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: none;
    /* Oculto por defecto, se muestra al hacer hover */
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.2s ease-out;
}

.producto-card:hover .overlay-agregar {
    display: flex;
    animation: popIn 0.2s ease-out;
}

.overlay-agregar.en-carrito {
    background-color: #dc3545;
}

.status-circle {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: block;
    /* Siempre visible si existe en el DOM */
    z-index: 15;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

/* Eliminamos la dependencia de .activa para el status-circle en admin */
.producto-card .status-circle {
    display: block;
}

.status-circle.disponible {
    background-color: #28a745;
}

.status-circle.no-disponible {
    background-color: #dc3545;
}

.producto-card.agotado {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.producto-card.admin-agotado {
    border: 1px dashed #dc3545;
    background-color: #fffafb;
}

.producto-card.admin-agotado img {
    filter: sepia(0.3);
    /* Un toque sutil para diferenciar sin ocultar */
}

.producto-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: var(--product-name-color, var(--text-color));
}

/* === Tarjeta activa (seleccionada) === */
.producto-card.activa {
    z-index: 20;
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.22), 0 6px 16px -4px rgba(0, 0, 0, 0.10);
    border-color: var(--primary-color);
}

/* Cuando una tarjeta está activa, las demás NO reaccionan al hover */
#index-catalog-grid:has(.activa) .producto-card:not(.activa):hover {
    transform: none;
    box-shadow: var(--card-shadow);
    border-color: var(--border-color);
}

/* Precios ocultos por defecto, solo visibles al clickear la tarjeta */
#index-catalog-grid .precios {
    display: none;
}

/* Activada por clic (móvil) — precios inline */
#index-catalog-grid .producto-card.activa .precios {
    display: flex;
    animation: preciosReveal 0.3s ease-out;
}

/* Desktop hover — precios inline expandiendo la tarjeta */
@media (hover: hover) {
    #index-catalog-grid .producto-card:hover .precios {
        display: flex;
        animation: preciosReveal 0.2s ease-out;
    }
    #index-catalog-grid .producto-card:hover .precios p {
        font-size: 0.82em;
    }
    #index-catalog-grid .producto-card:hover .precios p:first-child {
        font-size: 0.92em;
    }
}

/* Móvil / táctil sin hover — precios siempre visibles */
@media (hover: none) {
    #index-catalog-grid .precios {
        display: flex;
    }
    /* Tipografía compacta para la cuadrícula de 2 columnas */
    #index-catalog-grid .precios p {
        font-size: 0.82em;
    }
    #index-catalog-grid .precios p:first-child {
        font-size: 0.92em;
    }
}
@keyframes preciosReveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === DISEÑO PREMIUM DE PRECIOS === */
.precios {
    padding: 0 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Cada fila de precio: flex con badge + valor */
.precios p {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 10px;
    background: rgba(26, 122, 46, 0.07);
    color: var(--product-price-color, #1a7a2e);
    font-size: 0.87em;
    font-weight: 600;
    line-height: 1.4;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

@media (hover: hover) {
    .precios p:hover {
        background: rgba(26, 122, 46, 0.18);
        transform: scale(1.01);
    }
}

/* La primera fila (Detal) es la principal, más destacada */
.precios p:first-child {
    font-size: 1em;
    font-weight: 700;
    background: rgba(26, 122, 46, 0.13);
}

/* Badge del tipo de unidad ("DETAL", "DISPLAY", etc.) */
.precios p strong {
    color: var(--product-name-color, #111111);
    font-weight: 700;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Modo oscuro: ajuste de fondos */
[data-theme="dark"] .precios p {
    background: rgba(74, 222, 128, 0.07);
}
@media (hover: hover) {
    [data-theme="dark"] .precios p:hover {
        background: rgba(74, 222, 128, 0.18);
    }
}
[data-theme="dark"] .precios p:first-child {
    background: rgba(74, 222, 128, 0.13);
}
[data-theme="dark"] .precios p strong {
    background: rgba(255, 255, 255, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(0);
}

/* Estilos Barra de Navegación Administrador (Dropdown) */
.dropdown {
    position: relative;
    display: inline-block;
}

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

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 12px;
    overflow-x: hidden;
    margin-top: 2px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    z-index: 1001;
    animation: fadeInScale 0.2s ease-out;
    width: max-content;
    min-width: 220px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--surface-bg);
    color: #7905cb;
}

.dropdown-content.show {
    display: block;
}

/* Accordion Styles for Admin Menu */
.accordion-group {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    background: var(--surface-bg);
    padding: 10px 16px;
    font-size: 0.8em;
    font-weight: bold;
    color: var(--text-color);
    opacity: 0.8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.accordion-header:hover {
    background: var(--bg-color);
    opacity: 1;
}

.accordion-header .arrow {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.accordion-group.active .accordion-header .arrow {
    transform: rotate(90deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.01);
}

.accordion-group.active .accordion-body {
    max-height: 500px;
    /* Suficiente para el contenido */
    transition: max-height 0.5s ease-in;
}

.accordion-body a {
    padding-left: 28px !important;
}

.special-group .accordion-header {
    border-top: 2px solid #000;
}

/* Estilos de Login en Navbar */
.contenedor-login {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f0f7ff;
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #d0e7ff;
}

.form-login {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.span-login {
    font-size: 0.85em;
    color: #0056b3;
    font-weight: bold;
    white-space: nowrap;
}

.input-grupo-login {
    display: flex;
    gap: 5px;
    align-items: center;
}

.input-login {
    width: 130px;
    padding: 4px 10px;
    border-radius: 15px;
    border: 1px solid #b8daff;
    font-size: 0.85em;
    outline: none;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.85em;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-ingresar {
    background: #007bff;
    color: white;
}

.btn-registro {
    background: #28a745;
    color: white;
}

.btn-logout {
    background: #dc3545;
    color: white;
}

@media (max-width: 600px) {
    .contenedor-login {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 8px 10px;
        border-radius: 10px;
        gap: 8px;
    }

    .form-login {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }

    .span-login {
        white-space: normal;
        text-align: center;
    }

    .input-grupo-login {
        width: 100%;
        justify-content: center;
    }

    .input-login {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .btn-registro {
        width: auto;
        text-align: center;
    }

    .dropdown {
        width: 100%;
        margin-right: 0;
        margin-top: 5px;
    }

    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        width: 100%;
        border-radius: 10px;
        margin-top: 5px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .dropdown-content.show {
        display: block;
    }

    .dropdown-content a {
        color: #333;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        text-align: left;
        padding-left: 20px;
    }

    .accordion-header {
        background: rgba(0, 0, 0, 0.03);
        color: #444;
    }

    .accordion-body {
        background: rgba(0, 0, 0, 0.01);
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
}

.fa-whatsapp {
    font-size: 22px;
}

/* ── UI Toggle Button (Legacy cleanup) ── */
.btn-ui-toggle { display: none !important; }

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 32px;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-color);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.form-container h1 {
    text-align: center;
    background: var(--navbar-bg);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 2em;
    margin-bottom: 30px;
}

.form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-container .input-buscar,
.form-container .form-buscar {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
    display: block;
}

.form-container hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px solid #eee;
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .logo {
        display: none;
    }

    .contenedor-buscar {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-buscar {
        width: 100%;
        min-width: 0;
    }

    .input-buscar {
        width: 100%;
        min-width: 0;
    }

    .select-buscar {
        width: 80px;
        padding: 5px;
    }

    .navbar>a.btn {
        margin-top: 5px;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .contenedor-productos {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .producto-card h3 {
        font-size: 0.9em;
    }

    .producto-card img {
        height: 100px;
    }

    .form-container {
        margin: 10px;
        padding: 15px;
    }

    .hide-on-mobile {
        display: none !important;
    }
}

/* Order Progress Bar */
.order-progress-container {
    width: 100%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 10px;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
    position: relative;
}

.icon-circle {
    width: 35px;
    height: 35px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
    z-index: 2;
}

.step.active .icon-circle {
    background-color: #6a0dad;
    border-color: #6a0dad;
    color: white;
}

.step-label {
    font-size: 0.75em;
    margin-top: 5px;
    color: var(--text-color);
    transition: all 0.3s;
}

.step.active .step-label {
    color: #6a0dad;
    font-weight: bold;
}

.progress-track {
    position: relative;
    top: -28px;
    left: 12.5%;
    width: 75%;
    height: 4px;
    background-color: var(--border-color);
    z-index: 0;
}

.progress-bar-fill {
    height: 100%;
    background-color: #6a0dad;
    transition: width 0.5s ease;
}

/* ========================================================
   Estilos migrados desde templates/components/styles.html
   (bloques sin variables Jinja2)
   ======================================================== */

/* Removed redundant button styles (now in standardized section) */

/* Modal de rutina diaria */
.modal-rutina {
    display: none;
    position: fixed;
    bottom: 150px;
    left: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border: 1px solid #ddd;
    animation: slideUpRoutine 0.3s ease-out;
}

@keyframes slideUpRoutine {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rutina-header {
    padding: 12px 15px;
    background: #6a0dad;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rutina-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.rutina-step {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.rutina-step input[type="checkbox"] {
    margin-top: 4px;
}

.rutina-step label {
    font-size: 0.9em;
    cursor: pointer;
    color: #333;
    line-height: 1.4;
}

.rutina-step.done label {
    text-decoration: line-through;
    color: #999;
}

/* Loader de pantalla completa */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* .loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
} */

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 400px;
}

.loader-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.1, 0.5, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.loader-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loader-shine 1.5s infinite;
}

.loader-text {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes loader-shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Toast notifications - Premium Glassmorphism */
.toast-notification {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a202c;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .toast-notification {
    background: rgba(26, 32, 44, 0.85);
    color: #f7fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #cbd5e0;
}

.toast-success::before { background: linear-gradient(to bottom, #48bb78, #2f855a); }
.toast-error::before { background: linear-gradient(to bottom, #f56565, #c53030); }
.toast-info::before { background: linear-gradient(to bottom, #4299e1, #2b6cb0); }
.toast-warning::before { background: linear-gradient(to bottom, #ed8936, #c05621); }

.toast-notification i {
    font-size: 1.25rem;
}

.toast-success i { color: #48bb78; }
.toast-error i { color: #f56565; }
.toast-info i { color: #4299e1; }
.toast-warning i { color: #ed8936; }

.toast-notification.fade-out {
    animation: toastFadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
}

/* ── Notification History Panel (Navbar) ── */
.nav-notifications {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10001;
}

.notifications-bell {
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-bell:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

[data-theme="dark"] .notifications-bell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #f56565;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none; /* Shown via JS */
    align-items: center;
    justify-content: center;
    border: 2px solid var(--navbar-bg);
}

.notifications-panel {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    width: 350px;
    max-height: 500px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    display: none; /* Toggled via JS */
    flex-direction: column;
    overflow: hidden;
    z-index: 99999 !important;
    animation: panelAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelAppear {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notifications-panel.show {
    display: flex;
}

.notifications-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
}

.notifications-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.btn-clear-notifications {
    font-size: 0.8rem;
    color: #4299e1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-clear-notifications:hover {
    background: rgba(66, 153, 225, 0.1);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.notification-item {
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: relative;
}

[data-theme="dark"] .notification-item {
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #4299e1;
    border-radius: 50%;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.notif-success { background: rgba(72, 187, 120, 0.1); color: #48bb78; }
.notif-error { background: rgba(245, 101, 101, 0.1); color: #f56565; }
.notif-info { background: rgba(66, 153, 225, 0.1); color: #4299e1; }
.notif-warning { background: rgba(237, 137, 54, 0.1); color: #ed8936; }

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.85rem;
}

.notification-msg {
    color: var(--text-color);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #a0aec0;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: #a0aec0;
}

.notifications-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.3;
}

.badge-anuncios {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #dc2626;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
}

/* ── Anuncio Card en Catálogo ── */
.anuncio-catalog-card {
    text-align: center;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    padding: 15px;
    border-radius: 16px;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.anuncio-catalog-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
    object-fit: cover;
    max-height: 180px;
}
.anuncio-catalog-icon {
    font-size: 2em;
    margin: 10px 0;
}
.anuncio-catalog-card h4 {
    margin: 5px 0 3px;
    color: #333;
    font-size: 0.95em;
}
.anuncio-catalog-card p {
    margin: 0;
    color: #666;
    font-size: 0.82em;
    line-height: 1.4;
}

/* ── Negocio Promocionado Card ── */
.negocio-ad-card {
    text-align: center;
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 15px;
    border-radius: 16px;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.negocio-ad-card .negocio-ad-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #3b82f6;
}
.negocio-ad-card .negocio-ad-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    margin-bottom: 8px;
}
.negocio-ad-card h4 {
    margin: 5px 0 3px;
    color: #1e3a5f;
    font-size: 0.95em;
}
.negocio-ad-card p {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 0.8em;
    line-height: 1.3;
}
.negocio-ad-card .btn-visitar {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.negocio-ad-card .btn-visitar:hover {
    background: #2563eb;
}

/* ── Modal Anuncios ── */
.modal-anuncios-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-anuncios-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}
.modal-anuncios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
    border-radius: 16px 16px 0 0;
}
.modal-anuncios-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--text-color);
}
.modal-anuncios-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0 4px;
}
.modal-anuncios-body {
    padding: 16px 20px 20px;
}
.modal-anuncios-section-toggle {
    width: 100%;
    text-align: left;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.modal-anuncios-section-toggle:hover {
    background: var(--hover-bg, #f5f5f5);
}
.modal-anuncios-section-toggle .arrow {
    transition: transform 0.2s;
}
.modal-anuncios-section-toggle.active .arrow {
    transform: rotate(90deg);
}
.modal-anuncios-section {
    display: none;
    margin-bottom: 16px;
}
.modal-anuncios-section.active {
    display: block;
}
.modal-anuncios-section .form-group {
    margin-bottom: 12px;
}
.modal-anuncios-section label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.modal-anuncios-section input[type="text"],
.modal-anuncios-section textarea,
.modal-anuncios-section select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9em;
    background: var(--card-bg);
    color: var(--text-color);
    box-sizing: border-box;
}
.modal-anuncios-section textarea {
    resize: vertical;
    min-height: 60px;
}
.btn-guardar-anuncios {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #f59e0b;
    color: white;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.btn-guardar-anuncios:hover {
    background: #d97706;
}
.btn-guardar-negocios {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: white;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.btn-guardar-negocios:hover {
    background: #2563eb;
}
.anuncio-existente-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.85em;
}
.anuncio-existente-item .anuncio-emoji {
    font-size: 1.3em;
}
.anuncio-existente-item .anuncio-info {
    flex: 1;
    overflow: hidden;
}
.anuncio-existente-item .anuncio-info strong {
    display: block;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.anuncio-existente-item .anuncio-info span {
    color: var(--text-secondary);
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.anuncio-existente-item .btn-del {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1em;
    padding: 2px 6px;
}
.negocio-seleccionado-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.85em;
}
.negocio-seleccionado-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.negocio-seleccionado-item .negocio-placeholder-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    flex-shrink: 0;
}
.negocio-seleccionado-item span {
    flex: 1;
    color: var(--text-color);
}
.negocio-seleccionado-item .btn-quitar {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1em;
    padding: 2px 6px;
}
.anuncios-empty-msg {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
    padding: 15px;
    font-style: italic;
}

/* ── Skeleton Loading ── */
.skeleton-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 15px;
    height: 350px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    height: 180px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-title {
    width: 80%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    width: 40%;
    height: 15px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-button {
    width: 100%;
    height: 40px;
    background: #e2e8f0;
    border-radius: 12px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer-anim 1.5s infinite;
}

@keyframes shimmer-anim {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

[data-theme="dark"] .skeleton-img,
[data-theme="dark"] .skeleton-title,
[data-theme="dark"] .skeleton-text,
[data-theme="dark"] .skeleton-button {
    background: #334155;
}

/* ── Filtros Navbar Button ── */
.btn-filtros-navbar {
    background: none;
    border: none;
    color: white;
    padding: 6px 4px 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.2s;
    font-size: 1.05em;
    flex-shrink: 0;
}
.btn-filtros-navbar:hover {
    opacity: 1;
    transform: scale(1.1);
}
@media (max-width: 768px) {
    .btn-filtros-navbar {
        display: none;
    }
}

/* ── Voice Search ── */
.btn-voice-search {
    background: none;
    border: none;
    color: white; /* Match Navbar text */
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.2s;
}

.btn-voice-search:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-voice-search.recording {
    background-color: #ff4d4d !important;
    color: white !important;
    border-radius: 4px;
    animation: pulse-red 1.5s infinite;
    opacity: 1;
    padding: 8px;
    z-index: 10000;
}

.btn-voice-search.clear-mode {
    color: #ef4444;
    opacity: 0.7;
}

.btn-voice-search.clear-mode:hover {
    opacity: 1;
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ── Floating WhatsApp Button ── */
.btn-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(37, 211, 102, 0.4);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9990;
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-whatsapp:hover {
    transform: scale(1.1);
    background-color: rgba(37, 211, 102, 0.7);
}

/* ── Floating Cart Button ── */
.btn-carrito {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.4);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9990;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-carrito:hover {
    transform: scale(1.1);
    background-color: rgba(0, 123, 255, 0.7);
}
.badge-carrito {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}
.total-flotante-carrito {
    position: fixed;
    bottom: 30px;
    left: 74px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9990;
    pointer-events: none;
    display: none;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Hide floaters when modal is open */
body.modal-open .btn-whatsapp,
body.swal2-shown .btn-whatsapp,
body.modal-open .btn-carrito,
body.swal2-shown .btn-carrito,
body.modal-open #carrito-total-flotante,
body.swal2-shown #carrito-total-flotante {
    display: none !important;
}

/* Hide floaters when scrolling down */
body.hide-floaters .btn-whatsapp,
body.hide-floaters .btn-carrito,
body.hide-floaters #carrito-total-flotante,
body.hide-floaters #btnSubirArriba {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(30px) !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
}
