:root {
    --ml-yellow: #ffe600;
    --ml-blue: #2d3277;
    --ml-bg: #ebebeb;
    --ml-text: #333333;
    --ml-light-text: #666666;
    --ml-white: #ffffff;
    --ml-green: #00a650;
    --ml-border: #e6e6e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Proxima Nova', -apple-system, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
}

body {
    background-color: var(--ml-bg);
    color: var(--ml-text);
}

/* Header */
header {
    background-color: var(--ml-yellow);
    padding: 10px 0;
    box-shadow: 0 1px 0 0 rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 15px;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--ml-blue);
    text-decoration: none;
    line-height: 1;
}

.logo span {
    font-size: 14px;
    display: block;
    font-weight: 400;
    color: var(--ml-text);
}

.search-bar {
    flex-grow: 1;
    display: flex;
    background: var(--ml-white);
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
    height: 40px;
}

.search-bar input {
    flex-grow: 1;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 2px 0 0 2px;
    outline: none;
}

.search-bar button {
    background: var(--ml-white);
    border: none;
    padding: 0 15px;
    cursor: pointer;
    border-left: 1px solid var(--ml-border);
    border-radius: 0 2px 2px 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    width: 100%;
}
.nav-links a {
    color: var(--ml-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}
.nav-links a:hover {
    color: var(--ml-blue);
}

/* Hero Section */
.hero {
    background-color: var(--ml-blue);
    position: relative;
    overflow: hidden;
    height: 350px;
    display: flex;
    align-items: center;
}

.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: var(--ml-white);
    text-align: center;
    width: 100%;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ml-blue);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* Store Layout */
.store-container {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    flex: 0 0 250px;
}

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--ml-text);
}

.category-filter details {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--ml-border);
    padding-bottom: 10px;
}

.category-filter summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ml-text);
    list-style: none;
    position: relative;
    padding-right: 20px;
}

.category-filter summary::-webkit-details-marker {
    display: none;
}

.category-filter summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--ml-blue);
}

.category-filter details[open] summary::after {
    content: '-';
}

.category-filter ul {
    list-style: none;
    margin-top: 10px;
    padding-left: 10px;
}

.category-filter li {
    margin-bottom: 8px;
}

.category-filter a {
    text-decoration: none;
    color: var(--ml-light-text);
    font-size: 13px;
    display: block;
}

.category-filter a:hover {
    color: var(--ml-blue);
}

/* Main Content */
.main-content {
    flex: 1;
}

.section-title {
    font-size: 24px;
    color: var(--ml-light-text);
    font-weight: 300;
    margin-bottom: 20px;
}

.category-title {
    grid-column: 1 / -1;
    font-size: 20px;
    color: var(--ml-text);
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--ml-yellow);
    padding-bottom: 5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--ml-white);
    border-radius: 4px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
    overflow: hidden;
    transition: box-shadow .2s ease-out;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 7px 16px 0 rgba(0,0,0,.2), 0 1px 3px 0 rgba(0,0,0,.1);
}

.product-image-container {
    height: 200px;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--ml-border);
}

.product-image-container img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.image-disclaimer {
    font-size: 10px;
    color: #999;
    text-align: center;
    padding: 2px;
    background: #f7f7f7;
}

.product-info {
    padding: 20px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-price {
    font-size: 28px;
    color: var(--ml-text);
    font-weight: 600;
    margin-bottom: 4px;
}

.product-shipping {
    color: var(--ml-green);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 20px; /* To keep alignment even if empty */
}

.product-title {
    font-size: 17px;
    color: var(--ml-text);
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    display: block;
}

.product-details {
    margin-top: auto;
    font-size: 12px;
    color: var(--ml-light-text);
    display: flex;
    justify-content: space-between;
}

.btn-buy {
    background-color: #3483fa;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: background-color .2s ease-in;
}

.btn-buy:hover {
    background-color: #2968c8;
}

/* No results */
.no-results {
    text-align: center;
    padding: 50px;
    color: var(--ml-light-text);
    font-size: 18px;
    grid-column: 1 / -1;
    display: none;
}

/* Footer */
footer {
    background: var(--ml-white);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: var(--ml-light-text);
    font-size: 14px;
    border-top: 1px solid var(--ml-border);
}

@media (max-width: 768px) {
    /* --- Encabezado: logo + buscador en una fila, menú en otra --- */
    header {
        padding: 8px 0;
    }
    .header-container {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 12px;
    }
    .logo {
        flex: 0 0 auto;
    }
    .logo-img {
        height: 36px;
    }
    .search-bar {
        flex: 1 1 55%;
        min-width: 0;
        height: 36px;
    }
    .search-bar input {
        font-size: 14px;
        padding: 8px 10px;
    }
    .search-bar button {
        padding: 0 10px;
    }
    .nav-links {
        flex: 1 1 100%;
        margin-top: 4px;
        gap: 14px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-links a {
        font-size: 13px;
        white-space: nowrap;
    }
    /* En celular el WhatsApp va en el botón flotante verde, no en el menú */
    .nav-links a.solo-escritorio {
        display: none;
    }

    /* --- Portada --- */
    .hero {
        height: auto;
        min-height: 190px;
        padding: 26px 0;
    }
    .hero-content {
        padding: 0 16px;
    }
    .hero-content h1 {
        font-size: 23px;
        margin-bottom: 10px;
    }
    .hero-content p {
        font-size: 15px;
        margin-bottom: 6px;
    }
    .trust-badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
    }
    .badge {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* --- Los productos primero; las categorías y los avisos después --- */
    .store-container {
        flex-direction: column;
        margin: 20px auto;
        padding: 0 12px;
        gap: 20px;
    }
    .main-content {
        order: 1;
    }
    .sidebar {
        flex: none;
        width: 100%;
        order: 2;
    }
    .sidebar-info p {
        font-size: 13px;
    }
    .sidebar-info .chico {
        font-size: 12px;
    }
    .category-filter a {
        font-size: 14px;
        padding: 6px 0;
    }
    .category-filter summary {
        font-size: 15px;
        padding: 6px 0;
    }

    /* --- Catálogo: dos columnas, como en el celular --- */
    .section-title {
        font-size: 19px;
        margin-bottom: 12px;
    }
    .price-legend {
        font-size: 12.5px;
        margin-bottom: 14px;
    }
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .category-title {
        font-size: 16px;
        margin-top: 16px;
    }
    .product-image-container {
        height: 130px;
    }
    .product-info {
        padding: 12px 10px;
    }
    .product-title {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    .product-price {
        font-size: 22px;
        margin-bottom: 4px;
    }
    .product-shipping {
        font-size: 12.5px;
    }
    .product-cuotas,
    .product-descuento {
        font-size: 12px;
    }
    .product-details {
        font-size: 11px;
    }
    .image-disclaimer {
        font-size: 10px;
    }
    .btn-buy {
        padding: 10px;
        font-size: 14px;
        margin-top: 10px;
    }
    .product-consultar {
        font-size: 18px;
    }

    /* --- Secciones de información --- */
    .info-section {
        padding: 30px 14px;
        margin-top: 26px;
    }
    .info-section h2 {
        font-size: 22px;
    }
    .info-section p {
        font-size: 14px;
    }

    /* --- Que el botón de WhatsApp no tape el contenido --- */
    body {
        padding-bottom: 74px;
    }
    .whatsapp-float {
        right: 14px;
        bottom: 14px;
        padding: 13px;
        border-radius: 50%;
    }
    .whatsapp-float-text {
        display: none;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* ------------------------------------------------------------------
   Logo en imagen (igual que la página principal)
------------------------------------------------------------------ */
.logo {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 54px;
    width: auto;
    display: block;
    border-radius: 4px;
}
.footer-logo {
    height: 60px;
    width: auto;
    display: block;
    margin: 0 auto 15px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------
   Precios, lista y cuotas en cada producto
------------------------------------------------------------------ */
.price-legend {
    font-size: 13px;
    color: var(--ml-light-text);
    margin-bottom: 20px;
    line-height: 1.5;
}

.product-price-label {
    font-size: 11px;
    color: var(--ml-light-text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-lista {
    font-size: 13px;
    color: var(--ml-text);
    margin-bottom: 6px;
}

.product-cuotas {
    font-size: 13px;
    color: var(--ml-green);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.product-descuento {
    display: inline-block;
    font-size: 12px;
    color: #0b7a3b;
    background: #e6f7ee;
    border: 1px solid #b7e6c9;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 8px;
    line-height: 1.35;
}
.product-descuento strong {
    font-weight: 700;
}

.product-consultar {
    font-size: 22px;
    font-weight: 700;
    color: var(--ml-blue);
    margin-bottom: 5px;
}

.product-shipping.vacio {
    visibility: hidden;
}

/* ------------------------------------------------------------------
   Sidebar: bloques informativos
------------------------------------------------------------------ */
.sidebar-info {
    background: var(--ml-white);
    border: 1px solid var(--ml-border);
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}
.sidebar-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
}
.sidebar-info p {
    font-size: 12px;
    color: var(--ml-light-text);
    line-height: 1.5;
    margin-bottom: 8px;
}
.sidebar-info .chico {
    font-size: 11px;
    font-style: italic;
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
   Secciones: Sobre Nosotros y Contacto
------------------------------------------------------------------ */
.info-section {
    background: var(--ml-white);
    margin-top: 40px;
    padding: 45px 15px;
    border-top: 1px solid var(--ml-border);
}
.info-section.contacto {
    background: #f7f7f7;
}
.info-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.info-section h2 {
    font-size: 28px;
    color: var(--ml-blue);
    margin-bottom: 20px;
}
.info-section p {
    font-size: 15px;
    color: var(--ml-text);
    line-height: 1.7;
    margin-bottom: 14px;
}
.info-section .chico {
    font-size: 13px;
    color: var(--ml-light-text);
    font-style: italic;
}
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 20px;
    margin-top: 25px;
}
.info-card {
    background: #f7f7f7;
    border: 1px solid var(--ml-border);
    border-radius: 6px;
    padding: 18px;
}
.info-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--ml-blue);
}
.info-card p {
    font-size: 13px;
    margin-bottom: 0;
}
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 30px;
    align-items: start;
}
.contacto-datos a {
    color: var(--ml-blue);
    text-decoration: none;
    font-weight: 600;
}
.contacto-datos a:hover {
    text-decoration: underline;
}
.btn-whatsapp {
    display: inline-block;
    background: #25d366;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 6px;
    margin-top: 8px;
}
.btn-whatsapp:hover {
    background: #1eb356;
}
.map-container {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--ml-border);
}

/* ------------------------------------------------------------------
   Ficha de producto: precios, lista y cuotas
------------------------------------------------------------------ */
.detalle-precio-label {
    font-size: 12px;
    color: var(--ml-light-text);
    margin-bottom: 12px;
}
.detalle-lista {
    font-size: 15px;
    color: var(--ml-text);
    margin-bottom: 14px;
}
.detalle-descuento {
    display: inline-block;
    font-size: 15px;
    color: #0b7a3b;
    background: #e6f7ee;
    border: 1px solid #b7e6c9;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 18px;
    line-height: 1.4;
}
.detalle-descuento strong {
    font-weight: 700;
}
.detalle-cuotas {
    background: #f7f7f7;
    border: 1px solid var(--ml-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
}
.detalle-cuotas-titulo {
    font-size: 13px;
    font-weight: 700;
    color: var(--ml-blue);
    margin-bottom: 8px;
}
.detalle-cuotas ul {
    list-style: none;
    margin: 0 0 8px;
}
.detalle-cuotas li {
    font-size: 15px;
    color: var(--ml-green);
    margin-bottom: 4px;
}
.detalle-cuotas-nota {
    font-size: 11px;
    color: var(--ml-light-text);
    font-style: italic;
}
.product-consultar-detalle {
    font-size: 32px;
    font-weight: 700;
    color: var(--ml-blue);
    margin-bottom: 8px;
}

/* ------------------------------------------------------------------
   Ficha de producto: bloque de venta (formas de pago)
------------------------------------------------------------------ */
.venta-box {
    background: #f7f7f7;
    border: 1px solid var(--ml-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 18px;
}
.venta-box h3 {
    font-size: 16px;
    color: var(--ml-blue);
    margin-bottom: 10px;
}
.venta-lista {
    list-style: none;
    margin: 0 0 8px;
}
.venta-lista li {
    font-size: 14px;
    color: var(--ml-text);
    line-height: 1.6;
    margin-bottom: 4px;
}
.venta-lista li.venta-descuento {
    display: inline-block;
    font-size: 14px;
    color: #0b7a3b;
    background: #e6f7ee;
    border: 1px solid #b7e6c9;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 6px;
}
.venta-nota {
    font-size: 11px;
    color: var(--ml-light-text);
    font-style: italic;
    margin: 0;
}
.venta-box p {
    font-size: 14px;
    color: var(--ml-text);
    line-height: 1.5;
    margin: 0;
}

/* ------------------------------------------------------------------
   Menú de categorías para celular (compacto, arriba del catálogo)
------------------------------------------------------------------ */
.categorias-movil {
    display: none; /* en computadora las categorías van en la barra lateral */
}

@media (max-width: 768px) {
    .categorias-movil {
        display: block;
        background: var(--ml-white);
        border: 1px solid var(--ml-border);
        border-radius: 6px;
        margin-bottom: 14px;
        overflow: hidden;
    }
    .categorias-movil summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 14px;
        font-size: 15px;
        font-weight: 700;
        color: var(--ml-blue);
    }
    .categorias-movil summary::-webkit-details-marker {
        display: none;
    }
    .categorias-movil summary .flecha {
        font-size: 11px;
        color: var(--ml-light-text);
        transition: transform .2s ease;
    }
    .categorias-movil[open] summary .flecha {
        transform: rotate(180deg);
    }
    .categorias-movil-lista {
        padding: 0 14px 10px;
        border-top: 1px solid var(--ml-border);
    }
    .categorias-movil-lista a.ver-todos {
        display: block;
        padding: 12px 0;
        font-size: 14px;
        font-weight: 700;
        color: var(--ml-blue);
        text-decoration: none;
        border-bottom: 1px solid var(--ml-border);
    }
    .categorias-movil-lista .category-filter details {
        border-bottom: 1px solid var(--ml-border);
        padding-bottom: 6px;
        margin-bottom: 6px;
    }
    .categorias-movil-lista .category-filter summary {
        padding: 10px 0;
        font-size: 15px;
        font-weight: 600;
        color: var(--ml-text);
    }
    .categorias-movil-lista .category-filter ul {
        margin-top: 6px;
        padding-left: 12px;
    }
    .categorias-movil-lista .category-filter a {
        font-size: 14px;
        padding: 8px 0;
        display: block;
        color: var(--ml-light-text);
    }

    /* En celular las categorías ya están arriba: no repetirlas abajo */
    .sidebar > h3,
    .sidebar > a,
    .sidebar .category-filter {
        display: none;
    }
}


/* ------------------------------------------------------------------
   Botón flotante de WhatsApp
------------------------------------------------------------------ */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.whatsapp-float:hover {
    background: #1eb356;
}
.whatsapp-float-text {
    font-size: 15px;
}
@media (max-width: 480px) {
    .whatsapp-float-text {
        display: none;
    }
    .whatsapp-float {
        padding: 14px;
        border-radius: 50%;
    }
}
