:root{
  --ml-yellow:#FFE600;
  --ml-blue:#3483FA;
  --ml-green:#2ABF6F;
  --accent-gradient: linear-gradient(90deg,var(--ml-blue),var(--ml-green));
  --primary:var(--ml-blue);
  --muted:#6c757d;
  --text:#0b1720;
  --card-radius:10px;
  --shadow:0 8px 30px rgba(15,23,42,0.06);
  --shadow-hover:0 14px 40px rgba(15,23,42,0.09);
  --bg:#f6f8fb;
  --footer-bg:#0b0f14;
  font-family:'Inter',system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
}

html,body{height:100%}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ===== NAVBAR ===== */
.ml-header{
  background:#fff;
  border-bottom:1px solid rgba(13,17,23,0.04);
}

.brand-title{
  font-weight:800;
  color:var(--ml-blue);
  letter-spacing:.2px;
}

.brand-link{display:inline-flex;align-items:center}
.brand-logo{height:40px;display:block}

/* ===== CONTAINER ===== */
.container-max{
  max-width:1200px;
  margin:0 auto;
  padding:18px;
}

/* ===== HERO ===== */
.hero{
  background:#fff;
  border-radius:12px;
  padding:18px;
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.hero h1{font-size:1.2rem;margin:0}
.hero .muted{color:var(--muted)}

/* ===== SECTION CARD BASE ===== */
.section-card{
  background:#fff;
  border-radius:12px;
  padding:16px;
  box-shadow:var(--shadow);
}

/* ===== LAYOUT ===== */
.layout{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  margin-top:16px;
}

@media(min-width:992px){
  .layout{grid-template-columns:260px 1fr}
}

/* ===== SIDEBAR ===== */
.catalog-sidebar{
  background:#fff;
  border-radius:10px;
  padding:14px;
  box-shadow:var(--shadow);
}

.catalog-sidebar h6{
  font-size:.95rem;
  margin-bottom:.6rem;
  font-weight:600;
}

.filters-scroll{
  max-height:420px;
  overflow:auto;
  padding-right:6px;
}

/* ===== PRODUCTS GRID ===== */
.products{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

@media(min-width:576px){
  .products{grid-template-columns:repeat(3,1fr)}
}

@media(min-width:1200px){
  .products{grid-template-columns:repeat(4,1fr)}
}

/* ===== PRODUCT CARD ===== */
.card-product{
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 10px 30px rgba(2,6,23,0.04);
  transition:transform .16s ease,box-shadow .16s ease;
}

.card-product:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-hover);
}

.card-thumb{
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
}

.card-thumb img{
  max-height:150px;
  max-width:100%;
  object-fit:contain;
}

.card-body{padding:12px}

.p-title{
  font-size:.95rem;
  font-weight:600;
  margin:0 0 6px;
}

.p-price{
  font-weight:800;
  color:var(--ml-green);
  font-size:1.05rem;
  margin-bottom:6px;
}

.p-desc{
  color:#57606a;
  font-size:.88rem;
  margin:0;
}

/* ===== BUTTON ===== */
.btn-ml{
  background:var(--ml-yellow);
  color:#111;
  border:none;
  font-weight:700;
  border-radius:8px;
  padding:.4rem .6rem;
}

.btn-ml:hover{filter:brightness(.98)}

.pagination{margin-top:18px}

/* ===== MOBILE FILTER BTN ===== */
.mobile-filters-btn{
  position:fixed;
  right:16px;
  bottom:18px;
  border-radius:999px;
  z-index:1050;
}

/* =========================================================
   CATEGORÍAS SOBRE FONDO OSCURO (IGUAL AL FOOTER)
========================================================= */

section.categories-grid.section-card{
  background:var(--footer-bg);
  color:#ffffff;
  border:none;
  box-shadow:none;
}

/* Cards */
section.categories-grid.section-card .cat-card{
  display:block;
  text-decoration:none;
  border-radius:10px;
  padding:8px;
  background:#ffffff;
  color:#0b1720;
  box-shadow:0 10px 26px rgba(0,0,0,0.35);
  transition:transform .15s ease,box-shadow .15s ease;
}

section.categories-grid.section-card .cat-card:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 34px rgba(0,0,0,0.45);
}

/* Imágenes */
.cat-thumb-wrap{
  height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  background:rgba(255,255,255,0.95);
}

.cat-thumb{
  width:100%;
  height:100px;
  object-fit:cover;
  border-radius:6px;
}

/* Textos */
.cat-name{
  font-weight:600;
  margin-top:8px;
  font-size:.95rem;
}

.cat-count{
  color:#6c757d;
  font-size:.85rem;
}

/* Título sección */
section.categories-grid.section-card h2,
section.categories-grid.section-card .muted{
  color:#ffffff;
}

/* Indicador */
section.categories-grid.section-card .cat-card::after{
  content:"Explorar categoría →";
  display:block;
  margin-top:6px;
  font-size:.75rem;
  color:var(--ml-blue);
  font-weight:600;
}

/* ===== FOOTER ===== */
.footer-pro{
  background:var(--footer-bg);
  color:#f1f1f1;
  padding:40px 20px 20px;
  margin-top:40px;
  border-top:4px solid #1a73e8;
}

.footer-container{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:30px;
  max-width:1200px;
  margin:auto;
}

.footer-logo{width:160px;margin-bottom:10px}

.footer-desc{
  font-size:.9rem;
  color:#bbbbbb;
  line-height:1.4;
}

.footer-section h4{
  font-size:1rem;
  margin-bottom:12px;
  color:#fff;
  font-weight:600;
  border-left:4px solid #1a73e8;
  padding-left:8px;
}

.footer-section p,
.footer-section a{
  font-size:.9rem;
  color:#d9d9d9;
  text-decoration:none;
}

.footer-links{list-style:none;padding:0;margin:0}
.footer-links li{margin-bottom:7px}

.footer-links a:hover{color:#1a73e8}

.wa-link{color:#25D366;font-weight:600}

.footer-bottom{
  text-align:center;
  margin-top:25px;
  color:#aaaaaa;
  font-size:.8rem;
  padding-top:10px;
  border-top:1px solid #222;
}

/* ===== MOBILE ===== */
@media(max-width:576px){
  .cat-thumb{height:90px}
  .container-max{padding:12px}
}
/* Corrige texto "Mostrando X–Y de Z categorías" en fondo oscuro */
section.categories-grid.section-card .text-muted{
  color: rgba(255,255,255,0.75);
}
/* Override Bootstrap muted color SOLO en categorías */
section.categories-grid.section-card{
  --bs-secondary-color: rgba(255,255,255,0.75);
}
/* ===== CTA "VER TODAS CATEGORÍAS" ===== */
section.categories-grid.section-card .btn-view-all{
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: none;
  box-shadow: 0 6px 18px rgba(52,131,250,.45);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}

/* Hover */
section.categories-grid.section-card .btn-view-all:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(52,131,250,.55);
  filter: brightness(1.05);
  color:#fff;
}

/* Variante secundaria: "Ver paginado" */
section.categories-grid.section-card .btn-view-all.secondary{
  background: transparent;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

section.categories-grid.section-card .btn-view-all.secondary:hover{
  background: rgba(255,255,255,.12);
}

