/* ============================================================
   Minimarket Digital — Sistema de estilos compartido
   Tipografía: Quicksand (titulares) + Nunito (cuerpo)
   Paleta naranja cálida: #f4a261 → #e76f51
   ============================================================ */

:root {
  /* Design tokens — colores de marca */
  --orange-1: #f4a261;
  --orange-2: #e76f51;
  --gradient-angle: 135deg;
  --accent: #e76f51;
  --accent-dark: #c25a3e;

  /* Neutros */
  --ink: #2b2522;
  --ink-soft: #5a514c;
  --ink-mute: #8a807a;
  --line: #ece6e1;
  --bg: #ffffff;
  --bg-soft: #faf6f2;
  --bg-card: #ffffff;
  --gray-text: #777777;

  /* Tipografía */
  --font-display: 'Quicksand', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  /* Tamaños / espaciado */
  --header-h: 5em;
  --header-h-mobile: 8em;     /* 2 × 4em */
  /* Ancho de la página: un porcentaje de la ventana con un tope para pantallas muy anchas. */
  --page-width: 94%;
  --page-max: 1800px;
  --container: min(var(--page-width), var(--page-max));
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(35, 25, 20, .06), 0 2px 6px rgba(35, 25, 20, .04);
  --shadow: 0 4px 14px rgba(35, 25, 20, .08), 0 10px 30px rgba(35, 25, 20, .06);
  --shadow-lg: 0 12px 40px rgba(35, 25, 20, .14);

  /* Easing */
  --ease: cubic-bezier(.4, 0, .2, 1);
}
/* En el teléfono y la tableta la página usa todo el ancho; el margen lo da el relleno del contenedor. */
@media (max-width: 860px) { :root { --container: 100%; } }

* { box-sizing: border-box; }

/* ===========================================================
   SCROLLBARS — finos y con la paleta de marca (global)
   =========================================================== */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
/* WebKit / Blink (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
/* A product without a price is shown locked (tpl/js/app.js, `priced`). */
.product-card.is-locked .product-img > img { filter: grayscale(1); opacity: .55; }
.product-card.is-locked .price { color: var(--ink-mute); font-size: .9rem; }
.product-card .lock {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .66rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
/* A product photo fills its box (the box keeps the soft background while it loads). */
.product-img > img, .thumb > img, .ph > img, .swatch > img, .plp-card .photo > img {
  width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
}
ul { list-style: none; padding: 0; margin: 0; }

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

/* ===========================================================
   HEADER
   =========================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(var(--gradient-angle), var(--orange-1) 0%, var(--orange-2) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(231, 111, 81, .18);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
  letter-spacing: -.01em;
}

/* Logotipos: URL del perfil de la marca en Syncs (logo_url, logo_mark_url) */

.brand-logo-full { height: 42px; width: auto; display: block; }
.brand-logo-mark { height: 38px; width: auto; display: none; }
.footer .brand-logo-full { height: 46px; }
@media (max-width: 720px) { .brand-logo-full { height: 34px; } }
/* The mark replaces the full logo on phones only when the brand publishes one. */
@media (max-width: 540px) {
  .header .brand.has-mark .brand-logo-full { display: none; }
  .header .brand-logo-mark { display: block; height: 32px; }
}

.search {
  flex: 1;
  position: relative;
  max-width: 560px;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 18px 0 46px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
  transition: box-shadow .2s var(--ease);
}
.search input:focus {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
}
.search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-dark);
  pointer-events: none;
}

.search-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  overflow: hidden;
  display: none;
  z-index: 90;
}
.search.open .search-suggest { display: block; }

.search-suggest a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: .92rem;
}
.search-suggest a:first-of-type { border-top: none; }
.search-suggest a:hover { background: var(--bg-soft); }
.search-suggest a .price { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }
/* Suggestions of the original design: the group, the photo or the box, the name and the price. */
.search-suggest .group-label {
  padding: 10px 16px 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  font-weight: 700;
}
.search-suggest a .swatch {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-soft); display: grid; place-items: center;
  color: var(--accent);
}
.search-suggest a .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest a.search-all { justify-content: center; font-weight: 700; color: var(--accent); }
.search-suggest p { margin: 0; padding: 14px 16px; color: var(--ink-mute); font-size: .9rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
/* A name without a logo gives way to the buttons on a narrow screen: cut, never pushed out of it. */
.header .brand { min-width: 0; }
.header .brand > span { overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .15); }
.country-select{ position:relative; display:inline-flex; }
.country-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:0 10px;height:34px;border-radius:999px;border:none;
  background:rgba(255,255,255,.16);color:#fff;
  font-family:var(--font-display);font-weight:700;font-size:.78rem;
  letter-spacing:.04em;cursor:pointer;user-select:none;
  transition:background .18s var(--ease);
}
.country-pill:hover{background:rgba(255,255,255,.26)}
.country-pill[aria-expanded="true"]{background:rgba(255,255,255,.3)}
.country-flag-img{border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);object-fit:cover;display:block}

.country-name{display:none;font-family:var(--font-display);font-weight:700;max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (min-width:1120px){.country-name{display:inline}.country-pill .country-code{display:none}}
.country-caret{font-size:.62rem;opacity:.85;transition:transform .2s var(--ease)}
.country-pill[aria-expanded="true"] .country-caret{transform:rotate(180deg)}

.country-pop{
  position:absolute; top:calc(100% + 8px); right:0;
  width:288px; background:var(--bg, #fff);
  border:1px solid var(--line, #ece6e1); border-radius:14px;
  box-shadow:var(--shadow-lg, 0 16px 40px rgba(0,0,0,.16));
  z-index:60; overflow:hidden; color:var(--ink, #2b2622);
  animation:country-pop .18s var(--ease);
}
@keyframes country-pop{ from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }
.country-pop-head{ padding:12px 14px 10px; border-bottom:1px solid var(--line,#ece6e1); }
.country-pop-head strong{ display:block; font-family:var(--font-display); font-size:.95rem; }
.country-pop-head small{ display:block; color:var(--ink-mute,#8a807a); font-size:.76rem; line-height:1.35; margin-top:2px; }
.country-search{ display:flex;align-items:center;gap:8px; padding:10px; border-bottom:1px solid var(--line,#ece6e1); background:var(--bg-soft,#faf7f4); }
.country-search i{ color:var(--ink-mute,#8a807a); font-size:.82rem; }
.country-search input{
  flex:1; height:34px; border:1.5px solid var(--line,#ece6e1); border-radius:8px;
  background:var(--bg,#fff); padding:0 10px; font:inherit; font-size:.86rem; color:inherit; outline:none;
}
.country-search input:focus{ border-color:var(--accent,#e76f51); box-shadow:0 0 0 3px rgba(231,111,81,.12); }
.country-list{ list-style:none; margin:0; padding:6px; max-height:300px; overflow-y:auto; }
.country-opt{
  display:flex;align-items:center;gap:10px; width:100%; padding:8px 10px;
  background:transparent;border:none;border-radius:9px;cursor:pointer;
  font:inherit;color:inherit;text-align:left;transition:background .12s var(--ease);
}
.country-opt:hover,.country-opt.is-active{ background:var(--bg-soft,#faf7f4); }
.country-opt.is-active{ box-shadow:inset 0 0 0 1.5px var(--accent,#e76f51); }
.country-opt[aria-selected="true"]{ background:#fdf0ea; }
.country-opt-flag{ border-radius:2px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); object-fit:cover; flex-shrink:0; }
.country-opt-name{ flex:1; font-family:var(--font-display); font-weight:600; font-size:.9rem; }
.country-opt-dial{ font-size:.78rem; color:var(--ink-mute,#8a807a); }
.country-opt-tag{ font-size:.6rem; letter-spacing:.08em; font-weight:700; color:var(--accent,#e76f51); background:#fdf0ea; padding:2px 6px; border-radius:4px; }
.country-empty{ padding:18px; text-align:center; color:var(--ink-mute,#8a807a); font-size:.88rem; }

@media (max-width:720px){
  .country-pill .country-code{display:none}
  .country-pill{padding:0 8px;height:32px}
  .country-pop{ position:fixed; left:12px; right:12px; top:auto; width:auto; }
}
.icon-btn:active { transform: scale(.94); }
.icon-btn .label {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  white-space: nowrap;
}
.icon-btn:hover .label { opacity: .9; }
.icon-btn .badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #fff;
  color: var(--accent-dark);
  font-size: .7rem;
  font-weight: 800;
  display: grid; place-items: center;
  font-family: var(--font-body);
}
/* When a product is added the count grows for a moment (app.js, `bump`). */
.icon-btn .badge.bump { animation: badge-bump .45s var(--ease); }
@keyframes badge-bump { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .icon-btn .badge.bump { animation: none; } }

/* Mobile header — 2 niveles de 4em */
.header-search-mobile { display: none; }
@media (max-width: 860px) {
  .header-row {
    height: 4em;
    padding: 0 14px;
  }
  .search { display: none; }
  .header-search-mobile {
    display: flex;
    height: 4em;
    align-items: center;
    padding: 0 14px;
    background: linear-gradient(var(--gradient-angle), var(--orange-1) 0%, var(--orange-2) 100%);
    border-top: 1px solid rgba(255, 255, 255, .18);
  }
  .header-search-mobile .search {
    display: block;
    flex: 1;
    max-width: none;
  }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn .label { display: none; }
  
}

/* ===========================================================
   HERO SLIDER
   =========================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 24 / 9;
  max-height: 560px;
  overflow: hidden;
  background: var(--bg-soft);
}
@media (max-width: 860px) {
  .hero-slider {
    aspect-ratio: auto;
    max-height: none;
    height: calc(100dvh - var(--header-h-mobile));
  }
}

.slides {
  display: flex;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .slides { scroll-behavior: auto; } }
.slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  user-select: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /* Visible while the image loads or when the banner has none: the brand's own colours. */
  background: linear-gradient(var(--gradient-angle), var(--accent-dark) 0%, var(--orange-2) 60%, var(--orange-1) 100%);
}
.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05);
}
.slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 60%, rgba(0, 0, 0, 0) 100%);
}
.slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  /* Aligned with the page container; never under the arrows. */
  padding: 0 max(96px, calc((100% - var(--container)) / 2 + 24px));
  color: #fff;
}
.slide-content h2, .slide-content p { max-width: 540px; }
.slide-content .eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.slide-content h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 16px;
  text-wrap: balance;
}
.slide-content p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin: 0 0 24px;
  opacity: .95;
  text-wrap: pretty;
}
.slide-content .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1rem;
  border: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}
.slide-content .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

@media (max-width: 860px) {
  .slide-content { padding: 0 28px; }
  .slide-content .eyebrow { margin-bottom: 12px; letter-spacing: .1em; }
  .slide-content h2 { font-size: 2rem; margin-bottom: 10px; }
  .slide-content p { margin-bottom: 18px; }
}

.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 5;
  display: flex;
  justify-content: center;
}
.slider-dots button {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 0;
  background: none;
}
.slider-dots button::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: width .25s var(--ease), background-color .25s var(--ease);
}
.slider-dots button[aria-current="true"]::before { width: 24px; background: #fff; }
.slider-dots button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: var(--radius-pill); }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
  z-index: 5;
  backdrop-filter: blur(6px);
}
.slider-arrow:hover { background: rgba(255, 255, 255, .9); }
.slider-arrow:active { transform: translateY(-50%) scale(.94); }
.slider-arrow.prev { left: 22px; }
.slider-arrow.next { right: 22px; }

@media (max-width: 860px) {
  .slider-arrow { display: none; }
}

/* ===========================================================
   CATEGORÍAS CIRCULARES
   =========================================================== */
.section {
  padding: 64px 0;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -.01em;
}
.section-head .sub {
  color: var(--ink-mute);
  font-size: .95rem;
  margin-top: 6px;
}
.section-head .head-link {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.section-head .head-link:hover { color: var(--accent-dark); }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 28px 22px;
}
@media (max-width: 1100px) { .cats-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 600px)  { .cats-grid { grid-template-columns: repeat(4, 1fr); gap: 18px 10px; } }
#categorias { scroll-margin-top: var(--header-h); }

/* Category: its image from Syncs, or its icon over a tint of the brand colour. */
.cat {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  text-align: center;
  color: var(--ink-soft);
}
.cat-ico {
  width: 100%;
  max-width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg)) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: clamp(1.35rem, 3.4vw, 2.4rem);
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.cat:hover .cat-ico, .cat:focus-visible .cat-ico {
  background-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.78rem, 1.05vw, .95rem);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  hyphens: auto;
  overflow-wrap: anywhere;
  transition: color .25s var(--ease);
}
.cat:hover .cat-name { color: var(--accent-dark); }

/* ===========================================================
   FRANJA: foto + carrusel productos
   =========================================================== */

.product-card {
  flex: 0 0 calc(50% - 9px);
  scroll-snap-align: start;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
@media (max-width: 600px) {
  
  /* Within the feature strip we want exactly 2 visible products on mobile (now full-width) */
  
  
  
  
  
}

.product-card .product-img {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
  position: relative;
}

.product-card .wish-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  border: none;
  color: var(--ink-soft);
  display: grid; place-items: center;
}
.product-card .wish-btn.active { color: var(--accent); }

.product-card .product-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card .product-cat {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  font-weight: 700;
}
.product-card .product-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-card .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.product-card .price-old {
  font-size: .85rem;
  color: var(--ink-mute);
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: 500;
}
.product-card .add-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: grid; place-items: center;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.product-card .add-btn:hover { background: var(--accent-dark); transform: scale(1.06); }

/* ===========================================================
   GRID PRODUCTOS (categoría)
   =========================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ===========================================================
   NEWSLETTER
   =========================================================== */

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  background: linear-gradient(var(--gradient-angle), var(--orange-2) 0%, var(--orange-1) 100%);
  color: #fff;
  padding: 56px 0 28px;
}
.footer-grid { display: flex; }
/* As many columns as Syncs publishes help sections: the brand and the contact keep more room than the lists. */
.footer-col {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 24px;
  border-left: 1.5px dotted rgba(255, 255, 255, .55);
}
.footer-col:first-child { flex-grow: 1.4; min-width: 240px; padding-left: 0; border-left: none; }
.footer-contact { flex-grow: 1.3; padding-right: 0; }
@media (max-width: 1100px) {
  .footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
  .footer-col, .footer-col:first-child { border-left: none; padding: 0; min-width: 0; }
}
/* Two columns on a phone: the lists side by side, the brand and the contact across. */
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .footer-col:first-child, .footer-contact { grid-column: 1 / -1; }
}
@media (max-width: 340px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer h4 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  letter-spacing: .01em;
}
.footer ul li {
  margin-bottom: 10px;
  opacity: .92;
}
.footer ul li a:hover { text-decoration: underline; }

.footer .brand {
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.footer .copyright {
  font-size: .85rem;
  opacity: .85;
  line-height: 1.6;
}

/* CTA proveedores — tarjeta sólida que resalta sobre el naranja */
.footer-cta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: #fff;
  border-radius: var(--radius);
  color: var(--orange-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  max-width: 280px;
}
.footer-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.footer-cta .footer-cta-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(var(--gradient-angle), var(--orange-1) 0%, var(--orange-2) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .95rem;
}
.footer-cta .footer-cta-body { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.footer-cta .footer-cta-body strong { font-family: var(--font-display); font-weight: 700; font-size: .92rem; }
.footer-cta .footer-cta-body small { font-family: var(--font-body); font-size: .76rem; color: var(--gray-text); opacity: .9; }

.libro-reclamaciones {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-display);
}
.libro-reclamaciones:hover { background: rgba(255, 255, 255, .22); }

.footer-contact { container-type: inline-size; }
.footer-contact h4 { text-align: center; }
/* One line, as large as its column allows. */
.footer .phone {
  display: block;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 11cqi, 2.1rem);
  margin: 0 0 22px;
  color: #fff;
  letter-spacing: -.01em;
}
.footer .social-label { text-align: center; font-size: .85rem; margin-bottom: 12px; opacity: .92; }
.footer .socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.footer .socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .35);
  display: grid; place-items: center;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.footer .socials a:hover { background: rgba(255, 255, 255, .3); transform: translateY(-2px); }
.footer-contact .libro-reclamaciones { display: flex; justify-content: center; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1.5px dotted rgba(255, 255, 255, .5);
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  opacity: .9;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { text-decoration: underline; }

/* ===========================================================
   OVERLAY + DRAWER (menú lateral & carrito)
   =========================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 8, 0);
  z-index: 9000;
  pointer-events: none;
  transition: background .3s var(--ease);
}
.overlay.show {
  background: rgba(15, 10, 8, .55);
  pointer-events: auto;
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 92vw);
  height: 100dvh;
  background: #fff;
  z-index: 9001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  /* Closed, it is out of the tab order and of the accessibility tree, not only out of sight. */
  visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
}
.drawer.show { transform: translateX(0); visibility: visible; transition: transform .35s var(--ease); }
.drawer-left { right: auto; left: 0; transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0, 0, 0, .15); }

.drawer-head {
  height: 4em;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(var(--gradient-angle), var(--orange-1) 0%, var(--orange-2) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.drawer-head h2 { font: inherit; margin: 0; }
.drawer-head .close {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: none;
  color: #fff;
  display: grid; place-items: center;
}
.drawer-head .close:hover { background: rgba(255, 255, 255, .3); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.cart-empty { text-align: center; padding: 40px 20px; color: var(--ink-mute); }
.cart-empty .ic {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  color: var(--accent);
}
.cart-empty .ic > i { font-size: 32px; }
.cart-empty h4 { font-size: 1.1rem; margin: 0 0 6px; color: var(--ink); }
.drawer-foot .btn-ghost { display: flex; width: 100%; margin-top: 10px; }
.drawer-foot .btn-ghost:first-child { margin-top: 0; }
.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 18px 20px 22px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

/* Menú acordeón */
.acc-menu, .acc-menu ul {
  list-style: none; padding: 0; margin: 0;
}
.acc-menu li { border-bottom: 1px solid var(--line); }
.acc-menu li > a, .acc-menu .acc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.acc-menu ul {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
  padding-left: 18px;
}
.acc-menu li.open > ul { max-height: none; }
/* A category with subcategories: the whole row opens and closes its branch. */
.acc-menu .acc-head:hover, .acc-menu .acc-head:focus-visible, .acc-menu li > a:hover { color: var(--accent); }
.acc-menu .acc-head i { margin-left: auto; color: var(--ink-mute); transition: transform .2s var(--ease); }
.acc-menu li.open > .acc-head { color: var(--accent); }
.acc-menu li.open > .acc-head i { transform: rotate(180deg); color: var(--accent); }
.acc-menu li.acc-all > a { color: var(--accent-dark); }
.acc-menu ul li { border-bottom: none; border-top: 1px dashed var(--line); }
.acc-menu ul li > a, .acc-menu ul .acc-head {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  padding: 12px 4px;
  color: var(--ink-soft);
}
.acc-menu ul ul li > a, .acc-menu ul ul .acc-head {
  font-weight: 500;
  font-size: .9rem;
  padding: 10px 4px;
  color: var(--ink-mute);
}

/* Cart */

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item .thumb {
  width: 70px; height: 70px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
}
.cart-item .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
  line-height: 1.3;
}
.cart-item .meta {
  font-size: .75rem;
  color: var(--ink-mute);
}
.cart-item .qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  padding: 3px;
  width: fit-content;
  margin-top: 4px;
}
.cart-item .qty button {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700;
}
.cart-item .qty button:hover { background: var(--accent); color: #fff; }
.cart-item .qty span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
}
.cart-item .right { display: flex; flex-direction: column; align-items: end; gap: 8px; }
.cart-item .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.cart-item .remove {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  display: grid; place-items: center;
}
.cart-item .remove:hover { color: var(--accent); background: var(--bg-soft); }

.cart-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--font-display);
}
.cart-summary .total {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-dark);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: linear-gradient(var(--gradient-angle), var(--orange-1) 0%, var(--orange-2) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: 0 6px 18px rgba(231, 111, 81, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(231, 111, 81, .45); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: .92rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ic { color: #ffd9a8; }

/* Page-specific helpers */
.page-shell { padding-top: 36px; padding-bottom: 80px; }

.crumbs {
  display: flex;
  gap: 8px;
  font-size: .85rem;
  color: var(--ink-mute);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--ink-mute); opacity: .6; }
.page-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 8px;
  letter-spacing: -.015em;
}
.page-sub {
  color: var(--ink-mute);
  margin-bottom: 32px;
  max-width: 600px;
}

/* Cards/forms */

/* ===========================================================
   FontAwesome — tamaños en los botones-ícono que antes usaban
   SVG inline de 24×24. FA hereda font-size, así que fijamos el
   tamaño en el contenedor.
   =========================================================== */
.icon-btn > i, .add-btn > i, .wish-btn > i, .cart-item .qty button > i, .cart-item .remove > i, .drawer-head .close > i, .search-icon > i, .search-suggest .swatch > i { font-size: 18px; line-height: 1; }

.toast .ic > i { font-size: 16px; }

.confirm-item { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; padding: 4px 0; }

/* Demo status and account form controls. */
[hidden]{display:none!important}

/* Loading indicator (ui.js, 2026-11-30): a thin bar at the top while a page loads or the API answers. It is the
   body's own pseudo-element, so it adds no markup; its color is a token the theme can change. It runs towards the
   end and waits there: it never says «done» before the answer arrives. */
:root { --progress: #fff; --progress-glow: 0 0 10px rgba(0, 0, 0, .28); }
body::before {
  content: ''; position: fixed; top: 0; left: 0; z-index: 10000; width: 100%; height: 3px; pointer-events: none;
  background: var(--progress); box-shadow: var(--progress-glow); border-radius: 0 3px 3px 0;
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0; transition: opacity .3s var(--ease);
}
html.is-busy { cursor: progress; }
html.is-busy body::before { opacity: 1; animation: mmd-progress 9s cubic-bezier(.08, .75, .25, 1) forwards; }
@keyframes mmd-progress { 0% { transform: scaleX(0); } 12% { transform: scaleX(.4); } 100% { transform: scaleX(.94); } }
@media (prefers-reduced-motion: reduce) {
  html.is-busy body::before { animation: mmd-progress-pulse 1.4s ease-in-out infinite alternate; transform: scaleX(1); }
  @keyframes mmd-progress-pulse { from { opacity: .35; } to { opacity: 1; } }
}

#account-address-form{margin-top:16px;display:grid;gap:10px}

/* API catalog states and brand assets. */
.brand-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:18px}.brand-tile{display:grid;place-items:center;gap:10px;padding:20px;border:1px solid var(--line);border-radius:var(--radius);color:var(--ink)}.brand-tile img{object-fit:contain;max-width:100%}.catalog-state{padding:28px;color:var(--ink-mute);grid-column:1/-1}.plp-filters input[type=number],.plp-filters select{width:100%;padding:10px;border:1px solid var(--line);border-radius:var(--radius-sm);margin:8px 0}.product-card .product-img{background-color:var(--bg-soft)}.brand:not(:has(img)){font-family:var(--font-display);font-weight:800;color:#fff;font-size:1.2rem}
