/* =======================================================
   VARIABLES Y UTILIDADES
======================================================= */
:root {
  --rosa: #ef2f60;
  --azul: #0b2340;
  --negro: #111;
  --muted: #f6f7f8;
  --line: #e5e7eb;
  --container: 1600px;

  /* escalas */
  --fz-menu: 1rem;
  --fz-chip: 0.95rem;
  --logo-h: 46px;
  --search-max: 520px;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}


.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* =======================================================
   HEADER GLOBAL
======================================================= */
.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
}

/* anuncio */
.header-announce {
  background: var(--azul);
  color: #cfd8e3;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 6px 0;
}

/* barra principal */
.header-top {
  background: var(--rosa);
  color: #fff;
}
.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  flex-wrap: nowrap;
}

/* botón hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  gap: 4px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
}
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* logo único */
.site-header .custom-logo {
  height: var(--logo-h);
  width: auto;
  max-height: var(--logo-h);
}
.logo-text {
  color: #fff;
  font-weight: 800;
  font-size: 1.8rem;
  text-decoration: none;
}

/* buscador */
.header-center {
  flex: 1;
  display: flex;
  justify-content: left;
}
.header-center form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: var(--search-max);
}
.header-center input[type="search"] {
  flex: 1;
  border: none;
  border-radius: 999px 0 0 999px;
  padding: 12px 14px;
  font-size: 0.95rem;
}
.header-center button {
  border: none;
  background: #081a33;
  color: #fff;
  padding: 0 16px;
  border-radius: 0 999px 999px 0;
  font-weight: 600;
  cursor: pointer;
}

/* iconos */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  cursor: pointer;
}
.header-icon:hover {
  background: rgba(255, 255, 255, 0.22);
}


/* Contenedor relativo para poder posicionar la burbuja */
.cart-contents {
    position: relative;
    text-decoration: none; /* Quitar subrayado si lo tiene */
}

/* La burbuja roja */
.cart-count-bubble {
    position: absolute;
    top: -8px;    /* Ajustá esto para subir/bajar la burbuja */
    right: -10px; /* Ajustá esto para moverla izq/der */
    
    background-color: #e91e63; /* Tu color rosa/rojo de la marca */
    color: #fff;
    
    font-size: 11px;
    font-weight: bold;
    font-family: sans-serif;
    
    /* Forma redonda perfecta */
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    
    /* Centrar el número */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Un pequeño borde blanco para separarlo del icono */
    border: 2px solid #fff; 
    box-sizing: content-box; /* Para que el borde no achique el número */
}

/* =======================================================
   CHIPS
======================================================= */
.header-chips {
  background: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  justify-content: center;
}
.chips li a {
  display: block;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--negro);
  text-decoration: none;
  font-size: var(--fz-chip);
  transition: transform 0.3s ease;
}

.chips li a:hover {
  background-color: var(--rosa);
  color: #fff;
  transform: scale(0.95); /* Reduce el tamaño un 5% */
}

/* =======================================================
   MENÚ DE CATEGORÍAS (desktop)
======================================================= */
.header-cats-bar {
  background: #e9e9e9;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1200;
}
.header-cats-bar .container {
  display: flex;
  justify-content: center;
}

.header-cats,
.header-cats ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-cats {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: var(--fz-menu);
}
.header-cats > li {
  position: static;
}
.header-cats > li > a {
  display: inline-block;
  padding: 14px 10px;
  font-weight: 800;
  color: #222;
  text-decoration: none;
}

/* submenú base oculto (desktop) */
.site-header .header-cats li .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, var(--container));
  max-width: var(--container);
  display: none;
  background: #fff;
  padding: 24px 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  z-index: 1300;
}

/* mostrar solo el activo */
.site-header .header-cats > li:hover > .sub-menu,
.site-header .header-cats > li:focus-within > .sub-menu {
  display: block;
}

/* mega 3 columnas */
.site-header .header-cats > li.mega-3cols:hover > .sub-menu,
.site-header .header-cats > li.mega-3cols:focus-within > .sub-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 40px;
  text-align: left;
}
.header-cats > li.mega-3cols > .sub-menu > li > a {
  display: block;
  font-weight: 700;
  margin: 0 0 10px;
  color: #222;
  text-decoration: none;
  pointer-events: none;
}
.header-cats > li.mega-3cols > .sub-menu li li a {
  display: block;
  padding: 4px 0;
  font-weight: 400;
  color: #333;
  text-decoration: none;
}
.header-cats > li.mega-3cols > .sub-menu li li a:hover {
  color: #000;
  text-decoration: underline;
}

/* mega grid de usos */
.site-header .header-cats > li.mega-grid:hover > .sub-menu,
.site-header .header-cats > li.mega-grid:focus-within > .sub-menu {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px 20px;
  text-align: left;
}
.header-cats > li.mega-grid > .sub-menu > li > a {
  display: block;
  padding: 6px 0;
  color: #222;
  text-decoration: none;
  font-weight: 600;
}
.header-cats > li.mega-grid > .sub-menu > li > a:hover {
  color: #000;
  text-decoration: underline;
}

/* grid de marcas */
.site-header .header-cats > li:hover > .sub-menu.brands-grid,
.site-header .header-cats > li:focus-within > .sub-menu.brands-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 16px;
  padding: 24px 30px;
  background: #fff;
  border-top: 2px solid #000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.brands-grid .brand-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.brands-grid img {
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.2s;
}
.brands-grid a:hover img {
  filter: none;
}
.brands-grid .brand-text {
  font-weight: 700;
  color: #222;
}

/* =======================================================
   OFFCANVAS (mobile)
======================================================= */
.offcanvas {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 9999;
}
.offcanvas.open {
  display: block;
}
.drawer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 86%;
  max-width: 360px;
  background: #fff;
  padding: 18px 16px 24px;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  overflow: auto;
}
.drawer-close {
  border: 0;
  background: #f3f4f6;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
}

/* menú del drawer (acordeón) */
.drawer-menu,
.drawer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.drawer-menu > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 6px;
  border-bottom: 1px solid #f0f0f0;
  color: #111;
  text-decoration: none;
  font-weight: 700;
}
.drawer-menu .menu-item-has-children > a::after {
  content: "›";
  transform: rotate(0deg);
  transition: transform 0.2s;
  opacity: 0.6;
}
.drawer-menu li.open > .menu-item-has-children > a::after,
.drawer-menu .menu-item-has-children.open > a::after {
  transform: rotate(90deg);
}

.drawer-menu li ul {
  display: none;
  padding-left: 10px;
}
.drawer-menu li.open > ul {
  display: block;
}

/* grid de marcas dentro del drawer */
.drawer .brands-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 12px;
  padding: 12px 0;
}
.drawer .brands-grid .brand-item a {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
}
.drawer .brands-grid img {
  max-height: 40px;
}

/* =======================================================
   SLIDER
======================================================= */
.banner-swiper {
  position: relative;
  z-index: 1;
}

/* =======================================================
   RESPONSIVE
======================================================= */

/* Tablet (entre 990 y 1349px) */
@media (max-width: 1349px) {
  :root {
    --fz-menu: 0.95rem;
    --fz-chip: 0.9rem;
    --logo-h: 40px;
    --search-max: 440px;
  }
  .header-cats {
    gap: 18px;
  }
  .header-cats > li > a {
    padding: 12px 8px;
  }
}

/* Mobile (<989px) */
@media (max-width: 989px) {
  :root {
    --logo-h: 38px;
    --search-max: 100%;
  }

  /* orden: hamburger (izq) – logo (centro) – iconos (der) */
  .header-top .container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .menu-toggle {
    display: flex;
    order: 1;
  }
  .site-logo {
    order: 2;
    margin: 0 auto;
  }
  .header-right {
    order: 3;
  }
  .header-center {
    order: 4;
    width: 100%;
  }
  .header-center form {
    max-width: 100%;
  }

  /* la barra de categorías NO se muestra en mobile */
  .header-cats-bar {
    display: none;
  }
}

/* ===========================
   FOOTER
   =========================== */

.samom-footer {
  background: var(--rosa);
  color: #f1f1f1;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.samom-footer a {
  color: #f1f1f1;
  text-decoration: none;
}
.samom-footer a:hover {
  color: #f1f1f1;
  text-decoration: none;
  opacity: 0.85;
}

.samom-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px;
}

.samom-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #ffffff;
}

.footer-email {
  font-size: 16px;
  font-weight: 500;
  word-break: break-all;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.footer-social .icon {
  width: 22px;
  height: 22px;
  fill: #f1f1f1;
  display: block;
}
.social-link {
  display: inline-flex;
  align-items: center;
}

.footer-col--menu .footer-nav {
  margin-top: 4px;
}
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.footer-menu li a {
  font-size: 15px;
  opacity: 0.95;
}

.footer-col--brand{
  align-items: end;
}

.footer-col--brand .footer-logo img,
.footer-col--brand .custom-logo {
  width: 160px;
  height: auto;
  display: block;
  filter: brightness(1) contrast(1.05);
}

/* Bottom strip */
.samom-footer__bottom {
  background: var(--azul);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.copy {
  margin: 0;
  font-size: 13px;
  color: #e0e0e0;
}
.legal-link {
  font-size: 13px;
  color: #e0e0e0;
}

/* --- Footer menu en 2 columnas en desktop --- */
@media (min-width: 901px) {
  .footer-col--menu .footer-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 6px 40px; /* espacio entre filas y columnas */
  }
}

/* --- Mobile/Tablet --- */
@media (max-width: 900px) {
  .samom-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-col--brand{
    align-items: start;
  }

}
@media (max-width: 640px) {
  .samom-footer__inner {
    grid-template-columns: 1fr;
  }
  .footer-col--brand {
    order: -1;
  } /* logo arriba en mobile */
  .footer-col--menu {
    order: 2;
  }
  .footer-col--contact {
    order: 1;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Footer menu toggle en mobile --- */
.footer-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  width: fit-content;
}
.footer-menu-toggle__icon {
  margin-left: 6px;
  transform: translateY(-1px);
  display: inline-block;
}

@media (max-width: 640px) {
  .footer-menu-toggle {
    display: inline-flex;
  }
  .footer-nav {
    width: 100%;
  }
  .footer-nav .footer-menu {
    display: none;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
  }
  .footer-nav .footer-menu.is-open {
    display: grid;
  }
}
