/* ========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ======================================== */
:root {
    --acento: #feb422;
    --negro: #0D0D0D;
    --blanco: #FFFFFF;
    --hueso: #F5F5DC;
    --dorado: #feb422;
    --gris-oscuro: #2a2a2a;
    --gris-claro: #ECEAE8;
    --borde-suave: rgba(0,0,0,0.08);

    --transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
    --sombra: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --sombra-hover: 0 8px 28px rgba(0,0,0,0.13);

    --header-height: 70px;
    --sidebar-width: 256px;

    --card-radius: 8px;
    --card-img-bg: #F7F6F4;
    --sidebar-bg: #111111;
    --sidebar-divider: rgba(255,255,255,0.07);
    --border-color: #E0DEDC;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ========================================
   2. LAYOUT PRINCIPAL
   ======================================== */

.maquinas-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
    background: var(--gris-claro);
    position: relative;
}

.catalog-content {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0;
}

#vista-catalogo, .marcas-main-area {
    padding: 28px 32px;
    width: 100%;
}

/* ========================================
   3. SIDEBAR — INDUSTRIAL PANEL
   ======================================== */

.filters-sidebar,
.marcas-sidebar-nav {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #fff;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    z-index: 90;
    scrollbar-width: thin;
    scrollbar-color: #2A2A2A transparent;
}

.filters-sidebar::-webkit-scrollbar,
.marcas-sidebar-nav::-webkit-scrollbar { width: 3px; }
.filters-sidebar::-webkit-scrollbar-track,
.marcas-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.filters-sidebar::-webkit-scrollbar-thumb,
.marcas-sidebar-nav::-webkit-scrollbar-thumb { background: #2A2A2A; border-radius: 3px; }
.filters-sidebar::-webkit-scrollbar-thumb:hover,
.marcas-sidebar-nav::-webkit-scrollbar-thumb:hover { background: #383838; }

/* Header del sidebar */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sidebar-divider);
}

.filters-header h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-header h3 i {
    color: var(--acento);
    font-size: 0.72rem;
}

.filter-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.clear-filters-btn,
.close-sidebar-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}
.clear-filters-btn:hover,
.close-sidebar-btn:hover {
    border-color: var(--acento);
    color: var(--acento);
    background: rgba(254,180,34,0.08);
}
.close-sidebar-btn { display: none; }

/* Secciones del sidebar */
.filter-section {
    padding: 14px 20px;
    border-bottom: 1px solid var(--sidebar-divider);
    margin-bottom: 0;
}

/* Etiquetas de sección */
.filter-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.62rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.filter-label i {
    font-size: 0.62rem;
    color: var(--acento);
}

/* Inputs */
.search-input,
.price-input,
.sort-select {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 5px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.2); }
.price-input::placeholder { color: rgba(255,255,255,0.2); }
.search-input:focus,
.price-input:focus,
.sort-select:focus {
    outline: none;
    border-color: var(--acento);
    background: rgba(255,255,255,0.09);
    box-shadow: 0 0 0 2px rgba(254,180,34,0.14);
}
.sort-select option { background: #1a1a1a; color: #fff; }

/* Filtro de Stock */
.stock-filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.04);
    padding: 10px 12px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0;
}
.stock-filter-wrapper .filter-label {
    margin-bottom: 0;
    font-size: 0.62rem;
}

/* Switch */
.switch-container {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.switch-container input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .28s;
    border-radius: 22px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: rgba(255,255,255,0.5);
    transition: .28s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--acento); }
input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #fff;
}
input:focus + .slider { box-shadow: 0 0 0 2px rgba(254,180,34,0.3); }

/* Acordeón de filtros */
.filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: color 0.18s;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.filter-toggle:hover { color: #fff; }
.filter-toggle.active { color: #fff; }

.filter-toggle span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-toggle span i {
    color: var(--acento);
    font-size: 0.7rem;
    width: 14px;
    text-align: center;
}
.filter-toggle .fa-chevron-down {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
    transition: transform 0.22s ease;
}
.filter-toggle.active .fa-chevron-down { transform: rotate(180deg); }

.filter-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease-out;
}
.filter-options.active {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 12px;
    scrollbar-width: thin;
    scrollbar-color: #2A2A2A transparent;
}

.filter-checkboxes { padding: 2px 0; }
.filter-checkbox {
    padding: 5px 2px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}
.filter-checkbox input {
    accent-color: var(--acento);
    transform: scale(1.05);
    cursor: pointer;
    flex-shrink: 0;
}
.filter-checkbox label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1.3;
}
.filter-checkbox:hover label { color: #fff; }

/* Filtro por cuotas */
.cuotas-filter-options { display: flex; gap: 6px; }
.cuotas-btn {
    flex: 1;
    padding: 7px 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 5px;
    color: rgba(255,255,255,0.55);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.cuotas-btn:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.cuotas-btn.active {
    background: rgba(254,180,34,0.12);
    border-color: var(--acento);
    color: var(--acento);
}

/* Rango de precio */
.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.price-range span { color: rgba(255,255,255,0.25); font-size: 0.8rem; }
.price-input { flex: 1; }

/* Menú de Marcas sidebar nav links */
.nav-rubro-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-left: 2px solid transparent;
}
.nav-rubro-link:hover,
.nav-rubro-link.active {
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-left-color: var(--acento);
}
.nav-rubro-link i {
    color: var(--acento);
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* Marcas sidebar header */
.marcas-sidebar-nav h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sidebar-divider);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fff;
    margin: 0;
}

/* Botón Flotante Móvil */
.mobile-filters-toggle {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--acento);
    color: #0D0D0D;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(254,180,34,0.38);
    z-index: 1000;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-family: inherit;
}
.mobile-filters-toggle:active { transform: translateX(-50%) scale(0.96); }

/* Overlay móvil */
.filter-overlay {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 9000;
    backdrop-filter: blur(3px);
}
.filter-overlay.active { display: block; }

/* ========================================
   4. GRILLAS DE PRODUCTOS
   ======================================== */

.products-grid, .marcas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
}

/* ========================================
   VISTA LISTA
   ======================================== */

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 10px;
}

.products-grid.list-view .product-card {
    border-radius: var(--card-radius);
    height: auto;
}

.products-grid.list-view .product-clickable-area {
    flex-direction: row;
    width: 100%;
    min-height: 130px;
}

.products-grid.list-view .product-image {
    width: 130px;
    min-width: 130px;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 14px;
    border-bottom: none;
    border-right: 1px solid #E8E6E4;
    background: var(--card-img-bg);
    object-fit: contain;
    transition: transform 0.28s ease;
}

.products-grid.list-view .product-info {
    padding: 14px 18px;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.products-grid.list-view .product-info-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.products-grid.list-view .product-name {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    min-height: auto;
    margin-bottom: 4px;
}

.products-grid.list-view .product-rubro { margin-bottom: 0; }

.products-grid.list-view .product-footer {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    padding-top: 0;
    border-top: none;
    min-width: 120px;
    flex-shrink: 0;
}

.products-grid.list-view .product-price {
    font-size: 1.4rem;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .products-grid.list-view .product-image {
        width: 100px;
        min-width: 100px;
    }
    .products-grid.list-view .product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }
    .products-grid.list-view .product-footer {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        min-width: unset;
    }
}

/* ========================================
   TARJETA DE PRODUCTO — INDUSTRIAL STYLE
   ======================================== */

.product-card {
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
    border-color: var(--acento);
}

.product-clickable-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Imagen sobre fondo oscuro */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 22px;
    background: var(--card-img-bg);
    border-bottom: none;
    transition: transform 0.28s ease;
}
.product-card:hover .product-image { transform: scale(1.04); }

/* Info block */
.product-info {
    padding: 11px 13px 13px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #E8E6E4;
}

.product-info-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Marca */
.product-marca {
    font-size: 0.6rem;
    color: #966700;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nombre */
.product-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0D0D0D;
    line-height: 1.4;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

/* Rubro */
.product-rubro {
    font-size: 0.63rem;
    color: #767676;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* SKU */
.product-sku {
    font-size: 0.59rem;
    color: #767676;
    font-family: monospace;
    letter-spacing: 0.03em;
    margin-bottom: 0;
}

/* Footer: precio + botón */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #F0EEEC;
}

.product-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.product-price {
    font-size: 1.28rem;
    font-weight: 800;
    color: #0D0D0D;
    line-height: 1;
    letter-spacing: -0.02em;
}

.product-cuotas {
    font-size: 0.62rem;
    font-weight: 600;
    color: #966700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   5. TARJETA MARCA
   ======================================== */
.marca-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    height: 200px;
    border: 1px solid var(--border-color);
}
.marca-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
    border-color: var(--acento);
}
.marca-logo {
    width: 100%; height: 140px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; padding: 20px;
}
.marca-logo img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.28s ease; }
.marca-card:hover .marca-logo img { transform: scale(1.06); }
.marca-nombre {
    padding: 10px; text-align: center;
    font-size: 0.76rem; font-weight: 700;
    color: #0D0D0D; background: #F8F7F6;
    border-top: 1px solid #ECEAE8;
    flex-grow: 1; display: flex; align-items: center; justify-content: center;
    text-transform: uppercase; letter-spacing: 0.06em;
}

/* ========================================
   6. PESTAÑAS DE NAVEGACIÓN
   ======================================== */

.nav-tabs-container {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    border-bottom: 2px solid #DDDBD9;
    margin-bottom: 22px;
}
.nav-tab {
    background: none;
    border: none;
    padding: 11px 22px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #767676;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: inherit;
}
.nav-tab.active { color: var(--negro); border-bottom-color: var(--acento); }
.nav-tab:hover:not(.active) { color: #555; }

/* Titles sección Marcas */
.rubro-title-bar {
    font-size: 1.35rem; font-weight: 800; color: var(--negro);
    margin-bottom: 18px; padding-bottom: 10px;
    border-bottom: 2px solid var(--acento);
    display: flex; align-items: center; gap: 12px;
    scroll-margin-top: 100px; letter-spacing: -0.01em;
}
.rubro-title-bar i { color: var(--acento); font-size: 1.1rem; }
.categoria-sub-title {
    font-size: 0.85rem; color: #444;
    margin-bottom: 16px; padding-left: 12px; margin-top: 20px;
    border-left: 3px solid var(--acento); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* Hero */
.hero-maquinas {
    position: relative; height: 150px; border-radius: var(--card-radius); overflow: hidden;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #0D0D0D 0%, #1C1C1C 100%);
    box-shadow: var(--sombra);
    display: flex; align-items: center; padding: 0 32px; color: white;
}
.hero-icon { font-size: 2.4rem; color: var(--acento); margin-right: 22px; }
.hero-title { font-size: 1.75rem; margin-bottom: 4px; font-weight: 800; letter-spacing: -0.02em; }

/* ========================================
   7. RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .maquinas-container, #vista-marcas {
        flex-direction: column;
        display: block;
    }

    .filters-sidebar,
    .marcas-sidebar-nav {
        position: fixed !important;
        top: 0; left: -100%;
        width: 280px; height: 100vh;
        z-index: 9999;
        background: var(--sidebar-bg);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }

    .filters-sidebar.active,
    .marcas-sidebar-nav.active { left: 0 !important; }

    .close-sidebar-btn { display: flex !important; }

    .mobile-filters-toggle { display: flex; }

    #vista-catalogo, .marcas-main-area { padding: 16px; }

    .nav-tab { padding: 10px 14px; font-size: 0.72rem; }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .marcas-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }

    .marca-card { height: 130px; }
    .marca-logo { height: 80px; padding: 10px; }
    .marca-nombre { font-size: 0.72rem; padding: 5px; height: 40px; }

    .hero-maquinas {
        height: auto; padding: 20px; flex-direction: column; text-align: center;
    }
    .hero-icon { margin: 0 0 10px 0; font-size: 2rem; }
    .hero-content { flex-direction: column; padding: 0; }
    .hero-title { font-size: 1.3rem; padding: 0; }
    .hero-description { padding: 0; }
}

@media (max-width: 380px) {
    .marcas-grid, .products-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-tab span { display: none; }
}

/* ========================================
   SECCIÓN AYUDA / WHATSAPP
   ======================================== */
.ayuda-no-encontrado-section {
    padding: 20px 0;
    margin-bottom: 26px;
}
.ayuda-no-encontrado-container {
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--acento);
    border-radius: var(--card-radius);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--sombra);
}
.texto-ayuda { flex: 1; min-width: 250px; }
.texto-ayuda h2 { font-size: 1.25rem; margin-bottom: 5px; color: var(--negro); font-weight: 800; }
.texto-ayuda p { color: #666; margin: 0; font-size: 0.88rem; }
.consulta-whatsapp-input { display: flex; gap: 10px; flex: 1; min-width: 250px; }
.consulta-whatsapp-input input {
    flex: 1; padding: 11px 14px;
    border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; font-family: inherit;
}
.btn-whatsapp-consulta {
    background-color: #25D366; color: white; border: none;
    padding: 0 20px; border-radius: 6px; font-weight: 700;
    font-size: 0.88rem; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: var(--transition); white-space: nowrap;
}
.btn-whatsapp-consulta:hover {
    background-color: #1ebc57;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37,211,102,0.3);
}

/* ========================================
   BOTÓN AGREGAR MINI
   ======================================== */
.btn-add-cart-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background-color: var(--acento);
    color: #0D0D0D;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(254,180,34,0.22);
    flex-shrink: 0;
}
.btn-add-cart-mini:hover {
    background-color: #d99200;
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 4px 12px rgba(254,180,34,0.35);
}
.btn-add-cart-mini:active {
    transform: scale(0.94);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.btn-add-cart-mini i { pointer-events: none; }
.btn-add-cart-mini.in-cart {
    width: auto;
    padding: 0 10px;
    gap: 5px;
    background-color: #2ecc71;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(46,204,113,0.25);
}
.btn-add-cart-mini.in-cart:hover {
    background-color: #27ae60;
    transform: translateY(-1px) scale(1.04);
}
.card-in-cart { outline: 2px solid rgba(46,204,113,0.25); outline-offset: -2px; }

/* ========================================
   HEADER DEL CATÁLOGO
   ======================================== */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 11px 18px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.results-info {
    font-size: 0.76rem;
    color: #666;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.view-toggle {
    display: flex;
    gap: 3px;
    background: #F0EEEC;
    padding: 3px;
    border-radius: 5px;
}
.view-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
    color: #BBB;
    font-size: 0.95rem;
}
.view-btn:hover { color: #555; background: rgba(0,0,0,0.04); }
.view-btn.active {
    background: var(--acento);
    color: #0D0D0D;
    box-shadow: 0 2px 6px rgba(254,180,34,0.28);
}

@media (max-width: 480px) {
    .catalog-header { flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
    .view-toggle { justify-content: center; }
    .results-info { justify-content: center; }
}

/* ========================================
   PAGINADOR
   ======================================== */
.products-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin: 32px 0 16px; flex-wrap: wrap;
}
.pager-btn {
    min-width: 38px; height: 38px; padding: 0 10px;
    border: 1px solid var(--border-color); border-radius: 8px;
    background: #fff; cursor: pointer; font-weight: 600; font-size: 0.9rem;
    color: #333; transition: var(--transition);
}
.pager-btn:hover:not(:disabled) { background: rgba(0,0,0,0.04); border-color: var(--acento); }
.pager-btn.active { background: var(--acento); border-color: var(--acento); color: #0D0D0D; }
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-ellipsis { padding: 0 4px; color: #999; }

/* ========================================
   STOCK BADGES
   ======================================== */
.stock-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    margin-bottom: 6px;
    width: fit-content;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.stock-mini-badge.available {
    color: #166534;
    background: #DCFCE7;
    border: 1px solid #BBF7D0;
}
.stock-mini-badge.available i { color: #16A34A; }
.stock-mini-badge.unavailable {
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
}
.stock-mini-badge.unavailable i { color: #D97706; }

/* ========================================
   CHIPS DE FILTROS ACTIVOS
   ======================================== */
.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(254,180,34,0.08);
    border: 1px solid rgba(254,180,34,0.22);
    color: var(--acento);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.filter-chip:hover { background: rgba(254,180,34,0.15); border-color: var(--acento); }
.filter-chip i { font-size: 0.62rem; }

/* ========================================
   CARRITO FLOTANTE Y PANEL
   ======================================== */
.cart-float {
    position: fixed;
    right: 20px;
    bottom: 30px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.cart-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--acento);
    color: #0D0D0D;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(254,180,34,0.38);
    font-size: 1.45rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-toggle:hover {
    transform: scale(1.08) translateY(-4px);
    background: #d99200;
    box-shadow: 0 8px 24px rgba(254,180,34,0.42);
}
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #0D0D0D;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    border: 2px solid var(--gris-claro);
}
.cart-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 375px;
    max-height: 0;
    opacity: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
    transform: scale(0.92);
    visibility: hidden;
}
.cart-panel.active {
    max-height: 560px;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}
.cart-header {
    padding: 16px 20px;
    background: var(--negro);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cart-header h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.cart-header h3 i { color: var(--acento); }
.close-cart {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.55);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.18s; font-size: 0.75rem;
}
.close-cart:hover { background: rgba(255,255,255,0.14); color: #fff; }
.cart-items {
    flex: 1; overflow-y: auto;
    padding: 16px; background: #fff;
    max-height: 370px;
}
.cart-item {
    display: flex; gap: 12px;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid #F0EEEC; transition: 0.18s;
}
.cart-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cart-item-image {
    width: 60px; height: 60px;
    object-fit: contain; border-radius: 5px;
    border: 1px solid #eee; padding: 5px; background: #F8F7F6;
}
.cart-item-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cart-item-marca { font-size: 0.6rem; color: #966700; text-transform: uppercase; font-weight: 800; letter-spacing: 0.09em; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; color: var(--negro); margin-bottom: 4px; line-height: 1.25; }
.cart-item-price { font-size: 0.92rem; font-weight: 700; color: var(--negro); }
.cart-item-controls { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty-btn {
    width: 24px; height: 24px;
    border: 1px solid var(--border-color);
    background: white; border-radius: 4px;
    cursor: pointer; font-weight: 700; color: #555; transition: 0.15s; font-size: 0.8rem;
}
.qty-btn:hover { border-color: var(--acento); color: var(--acento); }
.cart-item-qty { font-weight: 700; font-size: 0.82rem; width: 18px; text-align: center; }
.remove-item-btn {
    margin-left: auto; background: rgba(220,38,38,0.08); color: #DC2626;
    border: none; width: 24px; height: 24px; border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; transition: 0.15s;
}
.remove-item-btn:hover { background: #DC2626; color: white; }

/* ========================================
   MODALES
   ======================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.82);
    z-index: 2000;
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: white; border-radius: 10px;
    width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-header {
    background: var(--negro); color: white;
    padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-top-left-radius: 10px; border-top-right-radius: 10px;
}
.modal-header h3 {
    margin: 0; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.1em;
    display: flex; gap: 10px; align-items: center; color: #fff;
}
.modal-header h3 i { color: var(--acento); }
.checkout-form { padding: 22px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #333; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 13px;
    border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.95rem;
    font-family: inherit; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--acento);
    box-shadow: 0 0 0 2px rgba(254,180,34,0.12);
}
#mapa-sucursales {
    width: 100%; height: 270px;
    border-radius: 6px; border: 1px solid var(--border-color); margin-top: 10px;
}
.order-summary-modal {
    background: #F8F7F6; padding: 16px; border-radius: 6px;
    margin-bottom: 16px; border: 1px solid var(--border-color);
}
.submit-order-btn {
    width: 100%; padding: 13px;
    background: var(--acento); color: #0D0D0D; border: none;
    border-radius: 6px; font-size: 0.9rem; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    display: flex; justify-content: center; align-items: center; gap: 10px;
    text-transform: uppercase; letter-spacing: 0.08em; font-family: inherit;
}
.submit-order-btn:hover {
    background: #d99200;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(254,180,34,0.3);
}

/* ========================================
   CARRITO RESPONSIVE MÓVIL
   ======================================== */
@media (max-width: 480px) {
    .cart-float { bottom: 90px !important; right: 20px; }
    .cart-toggle { width: 52px; height: 52px; font-size: 1.3rem; }
    .cart-panel {
        position: fixed; bottom: 0; right: 0; left: 0;
        width: 100%; max-height: 85vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        opacity: 1; visibility: visible;
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        z-index: 2100; border: none;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.25);
    }
    .cart-panel.active { transform: translateY(0); }
    .cart-header { padding: 14px 18px; border-radius: 20px 20px 0 0; }
    .cart-items { padding: 14px; max-height: calc(85vh - 180px); }
    .cart-footer { padding: 18px; background: white; box-shadow: 0 -4px 16px rgba(0,0,0,0.04); }
    .ayuda-no-encontrado-container { flex-direction: column; text-align: center; padding: 16px; }
    .consulta-whatsapp-input { flex-direction: column; width: 100%; }
    .btn-whatsapp-consulta, .consulta-whatsapp-input input { width: 100%; justify-content: center; }
}

/* ========================================
   MODAL QUICK-VIEW PRODUCTO
   ======================================== */
.product-modal-content {
    background: #fff;
    border: 1px solid var(--border-color);
    max-width: 840px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    position: relative;
    border-radius: var(--card-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.product-modal-content .modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    color: #999; font-size: 0.78rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 10; transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.product-modal-content .modal-close:hover {
    background: rgba(254,180,34,0.12); color: var(--acento); border-color: var(--acento);
}
.product-modal-gallery {
    background: var(--card-img-bg);
    display: flex; align-items: center; justify-content: center;
    padding: 36px 26px; min-height: 330px;
    border-right: 1px solid var(--border-color);
}
.gallery-main-image {
    width: 100%; display: flex; align-items: center; justify-content: center;
}
.gallery-main-image img {
    max-width: 100%; max-height: 270px; object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.12));
    transition: transform 0.28s ease;
}
.gallery-main-image img:hover { transform: scale(1.04); }
.gallery-controls { display: none; }
.product-modal-info {
    padding: 34px 30px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}
.product-modal-name {
    color: var(--negro); font-size: 1.15rem; font-weight: 800;
    line-height: 1.4; margin: 0 0 6px;
}
.product-modal-name::after {
    content: ''; display: block; width: 28px; height: 2px;
    background: var(--acento); margin-top: 10px; border-radius: 2px;
}
.product-modal-description {
    color: #999; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.07em; margin: 14px 0 16px;
}
.brand-price-wrapper {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 12px;
}
.product-modal-brand {
    background: rgba(254,180,34,0.12); color: var(--acento);
    padding: 4px 10px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 800;
    letter-spacing: 0.09em; text-transform: uppercase;
    border: 1px solid var(--acento);
}
.product-modal-price {
    font-size: 1.65rem; font-weight: 800;
    color: var(--negro); letter-spacing: -0.02em;
}
#modalStockBadge { margin-bottom: 16px; }
#modalStockBadge .stock-mini-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 4px;
    font-size: 0.76rem; font-weight: 700;
    width: 100%; justify-content: center;
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
#modalAddToCartBtn {
    width: 100% !important; height: auto !important;
    padding: 12px 10px !important; margin-top: 0 !important;
    font-size: 0.82rem !important; border-radius: 6px !important;
    color: #0D0D0D !important;
}
.btn-view-detail {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 12px 10px;
    border: 1.5px solid var(--acento); border-radius: 6px;
    color: var(--acento); text-decoration: none; font-weight: 600;
    font-size: 0.82rem; transition: var(--transition);
    background: transparent; cursor: pointer; text-align: center;
}
.btn-view-detail:hover { background: var(--acento); color: #0D0D0D; }

@media (max-width: 640px) {
    .product-modal-content { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
    .product-modal-gallery { min-height: 200px; padding: 22px 18px; border-right: none; border-bottom: 1px solid var(--border-color); }
    .product-modal-info { padding: 22px 18px; }
    .product-modal-name { font-size: 1rem; }
    .product-modal-price { font-size: 1.4rem; }
    .modal-actions { grid-template-columns: 1fr; }
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px; color: #999; gap: 16px;
}
.spinner {
    width: 34px; height: 34px;
    border: 3px solid #E0DEDC;
    border-top-color: var(--acento);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
    text-align: center; padding: 60px 20px; color: #999;
}
.empty-state i { font-size: 2.8rem; margin-bottom: 14px; color: #DDD; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: #555; margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.06em; }
.empty-state p { font-size: 0.88rem; margin-bottom: 20px; }
.btn-primary {
    background: var(--acento); color: #0D0D0D; border: none;
    padding: 10px 22px; border-radius: 5px; font-weight: 700;
    font-size: 0.78rem; cursor: pointer; transition: var(--transition);
    text-transform: uppercase; letter-spacing: 0.08em; font-family: inherit;
}

/* ========================================
   BANNER PLAN CANJE ROWA
   ======================================== */
.rowa-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    background: #2c9338;
    color: #fff;
    border-radius: var(--card-radius);
    padding: 18px 52px 18px 22px;
    margin: 0 0 20px;
}
.rowa-banner-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.rowa-banner-logo {
    height: 34px;
    width: auto;
    background: #fff;
    border-radius: 4px;
    padding: 3px 6px;
}
.rowa-banner-canje-img {
    height: 44px;
    width: auto;
}
.rowa-banner-bron-logo {
    height: 30px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}
.rowa-banner-text {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}
.rowa-banner-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
    color: #2c9338;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: var(--transition);
}
.rowa-banner-cta:hover { background: #d4f0d8; }
.rowa-banner-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.rowa-banner-close:hover { color: #fff; }

@media (max-width: 900px) {
    .rowa-banner { flex-wrap: wrap; padding: 20px 44px 20px 20px; }
    .rowa-banner-text { flex-basis: 100%; order: 3; }
    .rowa-banner-cta { order: 4; margin-left: auto; }
}
@media (max-width: 560px) {
    .rowa-banner { flex-direction: column; align-items: flex-start; text-align: left; }
    .rowa-banner-bron-logo { height: 22px; order: 2; }
    .rowa-banner-cta { width: 100%; justify-content: center; order: 4; }
}
.btn-primary:hover { background: #d99200; transform: translateY(-1px); }
