/* Armería Gil · cabecera, menú desplegable, cajón móvil y pie. */

.topbar { background: var(--encina-900); color: var(--monte-300); font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.topbar a { color: var(--laton-300); text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar a:hover { text-decoration: underline; }
@media (max-width: 640px) { .topbar-in { justify-content: center; text-align: center; } .topbar a { display: none; } }

/* Ancho de la "carcasa": cabecera, pie y carrito comparten el mismo borde que el catálogo. */
:root { --shell: 1600px; --header-h: 132px; }  /* fila del logo 84 + barra de secciones 48 */
.site-header > .container, .site-footer > .container, .topbar > .container, .mega > .container { max-width: var(--shell); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--encina-800); color: var(--piedra-100);
}
.header-in { position: relative; display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; flex: none; }
.brand picture { display: block; }
.brand-logo { display: block; height: 58px; width: auto; }
.brand:focus-visible { outline-offset: 6px; }
.main-nav { flex: 0 1 auto; min-width: 0; height: 100%; margin-left: 12px; }
.main-nav > ul { list-style: none; display: flex; height: 100%; }
.main-nav > ul > li { display: flex; align-items: stretch; flex: none; }
.main-nav > ul > li > a {
  display: flex; align-items: center; padding: 0 clamp(10px, 0.95vw, 18px);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; color: var(--piedra-100);
  white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.main-nav > ul > li:hover > a, .main-nav > ul > li:focus-within > a { color: var(--laton-300); border-bottom-color: var(--laton-500); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-3); border-top: 1px solid var(--border-soft);
  display: none;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { display: block; animation: mega-in .18s var(--ease) .06s both; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .has-mega:hover .mega, .has-mega:focus-within .mega { animation: none; } }
/* Desplegable de cada sección: centrado, con la foto de cada apartado y una tarjeta de «ver todo» */
.mega-in { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; max-width: 1240px; margin-inline: auto;
  padding: 28px var(--gutter) 30px; align-items: stretch; }
.mega-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 190px); justify-content: center; gap: 24px; }
.mega-head { display: grid; gap: 10px; text-decoration: none; color: var(--text); }
.mega-img { display: grid; place-items: center; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--surface-2); color: var(--encina-700); }
.mega-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.mega-head:hover .mega-img img { transform: scale(1.05); }
.mega-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; line-height: 1.2; }
.mega-head:hover .mega-title { color: var(--accent-strong); }
.mega-col ul { list-style: none; display: grid; gap: 2px; margin: 8px 0 0; padding: 0; }
.mega-col li a { display: block; padding: 4px 0; font-size: 14.5px; color: var(--text-muted); text-decoration: none; }
.mega-col li a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.mega-feature { position: relative; display: flex; align-items: flex-end; min-height: 220px; overflow: hidden; border-radius: 10px;
  background: var(--encina-800); color: #fff; text-decoration: none; }
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.mega-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 24, 18, .88) 0%, rgba(14, 24, 18, .35) 55%, rgba(14, 24, 18, .05) 100%); }
.mega-feature:hover img { transform: scale(1.04); }
.mega-feature-txt { position: relative; z-index: 1; display: grid; gap: 4px; padding: 20px 22px; }
.mega-feature-k { font-size: 13px; font-weight: 600; color: var(--laton-300); }
.mega-feature strong { font-family: var(--font-display); font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.mega-feature-cta { margin-top: 8px; font-size: 14.5px; font-weight: 600; }
.mega-feature:hover .mega-feature-cta { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1279px) { .mega-in { grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; } .mega-cols { gap: 18px; } }

/* Buscador ------------------------------------------------------------------
   Tres formas, sin estados intermedios:
   ≥1200px        campo en línea junto al menú;
   1024–1199, <640 lupa que abre una barra sobre toda la fila de la cabecera;
   640–1023       (menú en el cajón) campo en línea que ocupa el hueco libre. */
.hs { display: flex; align-items: center; justify-content: flex-end; margin-left: auto; flex: none; }
.hs-open { display: none; color: var(--piedra-100); }
.hs-open:hover { background: rgba(255, 255, 255, .08); }

.header-search {
  position: relative; display: flex; align-items: center;
  width: clamp(220px, 19vw, 340px); color: var(--monte-300);
}
.hs-icon { position: absolute; left: 13px; pointer-events: none; }
.header-search input {
  flex: 1; width: 100%; min-width: 0; height: 42px; padding: 0 40px 0 40px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .06); color: var(--hueso);
  font-size: var(--fs-sm); transition: border-color .15s, background-color .15s;
}
.header-search input::placeholder { color: var(--monte-300); opacity: 1; }
.header-search input:focus { outline: none; border-color: var(--laton-500); background: rgba(255, 255, 255, .1); }
.header-search input::-webkit-search-cancel-button,
.header-search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.hs-clear {
  position: absolute; right: 7px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--monte-300); cursor: pointer;
}
.hs-clear:hover { color: var(--hueso); background: rgba(255, 255, 255, .1); }
.hs-clear[hidden] { display: none; }
.hs-close {
  display: none; flex: none; height: 42px; padding: 0 0 0 18px; border: 0; background: none; cursor: pointer;
  color: var(--laton-300); font-weight: 600; font-size: var(--fs-sm);
}
.hs-close:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Barra desplegada (modo lupa): tapa la fila entera, centrada y a 820px como máximo. */
.hs.is-open .header-search {
  display: flex; position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; right: 0;
  width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto;
  animation: fade .15s;
}
.hs.is-open::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--encina-800); }
.hs.is-open .hs-clear { right: 74px; }
.hs.is-open .hs-close { display: block; }

/* Panel de sugerencias --------------------------------------------------------- */
.sg {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: min(700px, calc(100vw - 2 * var(--gutter)));
  max-height: min(74vh, 660px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--hueso); color: var(--text);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3); border: 1px solid var(--border-soft);
  font-size: var(--fs-sm); text-align: left;
}
.sg[hidden] { display: none; }
.site-header .header-search .sg { top: calc(100% + 12px); }
.hs.is-open .sg { top: calc(50% + 21px + 12px); left: 0; right: 0; width: auto; }
.sg-fix { padding: 12px 20px; background: var(--surface-2); color: var(--text-muted); border-bottom: 1px solid var(--border-soft); }
.sg-fix strong { color: var(--text); font-weight: 600; }
.sg-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.sg-body.is-single { grid-template-columns: minmax(0, 1fr); }
.sg-col { padding: 8px 8px 12px; min-width: 0; }
.sg-col + .sg-col { border-left: 1px solid var(--border-soft); background: var(--piedra-100); }
.sg-h { padding: 10px 12px 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.sg-group + .sg-h { margin-top: 6px; }
.sg-opt {
  display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: var(--r-md);
  color: inherit; text-decoration: none; cursor: pointer;
}
.sg-opt:hover, .sg-opt.is-active { background: var(--piedra-200); }
.sg-col + .sg-col .sg-opt:hover, .sg-col + .sg-col .sg-opt.is-active { background: var(--monte-100); }
.sg-col + .sg-col mark { background: transparent; box-shadow: none; text-decoration: underline; text-decoration-color: var(--laton-500); text-underline-offset: 3px; }
.sg-thumb {
  flex: none; width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden;
  display: grid; place-items: center; background: var(--piedra-200); color: var(--monte-300);
}
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sg-brand { font-size: 13px; color: var(--text-muted); }
.sg-name { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sg-name mark, .sg-term mark { background: var(--laton-100); color: inherit; border-radius: 2px; box-shadow: 0 0 0 1px var(--laton-100); }
.sg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.sg-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.sg-price.is-sale { color: var(--sale-strong); }
.sg-old { color: var(--text-soft); font-variant-numeric: tabular-nums; font-size: 13px; }
.sg-meta .badge { font-size: 0.6875rem; padding: 1px 7px; }
.sg-term { display: grid; gap: 2px; min-width: 0; }
.sg-term > span:first-child { font-weight: 600; }
.sg-path { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-all {
  display: flex; justify-content: center; align-items: center;
  padding: 14px 20px; border-top: 1px solid var(--border-soft); background: var(--hueso);
  font-weight: 600; color: var(--accent-strong); text-decoration: none; border-radius: 0;
}
.sg-all:hover, .sg-all.is-active { background: var(--laton-100); color: var(--encina-800); }
.sg-empty { padding: 22px 20px; display: grid; gap: 4px; }
.sg-empty p:first-child { font-weight: 600; }
.sg-empty p + p { color: var(--text-muted); }
.sg-loading { padding: 18px 20px; color: var(--text-muted); }
@media (max-width: 760px) {
  .sg-body { grid-template-columns: minmax(0, 1fr); }
  .sg-col + .sg-col { border-left: 0; border-top: 1px solid var(--border-soft); }
}

/* Carrito */
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  border-radius: var(--r-sm); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  white-space: nowrap; flex: none; margin-right: -12px;
}
.cart-btn:hover { background: rgba(255, 255, 255, .08); }
.cart-btn.acct-btn { margin-right: -12px; }
.acct-label { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }
/* 1200–1365: menú completo + buscador abierto; la cuenta queda en icono para que no se monten. */
@media (min-width: 1200px) and (max-width: 1365px) { .acct-btn .acct-label { display: none; } }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center;
  background: var(--sale); color: var(--hueso); font-size: 0.6875rem; font-weight: 700;
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

.nav-toggle { display: none; }

/* 1024–1199: menú completo y lupa. */
@media (max-width: 1199px) {
  .header-in { gap: 16px; }
  .hs-open { display: inline-grid; }
  .hs:not(.is-open) .header-search { display: none; }
  .cart-label { display: none; }
  .main-nav { margin-left: 4px; }
}
/* 640–1023: menú al cajón; el buscador vuelve a ser un campo. */
@media (max-width: 1023px) {
  .main-nav { display: none; }
  :root { --header-h: 72px; }
  .nav-toggle { display: inline-grid; margin-left: -8px; }
  .brand-logo { height: 50px; }
  .hs { flex: 1; }
  .hs-open { display: none; }
  .hs:not(.is-open) .header-search { display: flex; width: 100%; max-width: 460px; }
  .cart-label { display: inline; }
}
@media (max-width: 639px) {
  :root { --header-h: 60px; }
  .header-in { gap: 6px; }
  .brand { margin-right: auto; }
  .brand-logo { height: 44px; }
  .hs { flex: none; }
  .hs-open { display: inline-grid; }
  .hs:not(.is-open) .header-search { display: none; }
  .hs.is-open .sg {
    position: fixed; top: calc(var(--header-top, 0px) + var(--header-h) + 8px); left: 8px; right: 8px;
    max-height: calc(100dvh - var(--header-h) - var(--header-top, 0px) - 16px);
  }
  .cart-label { display: none; }
  .cart-btn { padding: 0 8px; margin-right: -8px; }
  .cart-btn.acct-btn { margin-right: -4px; }
}

/* Cajón móvil */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 29, 23, .55); animation: fade .2s; }
.drawer-panel {
  position: absolute; inset: 0 auto 0 0; width: min(380px, 88vw);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--hueso); animation: slide-in .25s var(--ease);
}
.drawer-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 8px 20px; }
.drawer-brand { display: block; line-height: 0; }
.drawer-brand img { height: 42px; width: auto; }
.drawer-close { flex: none; width: 44px; height: 44px; color: var(--text); }
.drawer-search.header-search { flex: none; width: auto; margin: 0 16px 12px; flex-wrap: wrap; color: var(--text-muted); }
.drawer-search .hs-icon { top: 14px; }
.drawer-search .hs-clear { top: 9px; color: var(--text-muted); }
.drawer-search .hs-clear:hover { color: var(--text); background: var(--surface-2); }
.drawer-search.header-search input { height: 46px; border-color: var(--border); background: var(--surface); color: var(--text); font-size: var(--fs-base); }
.drawer-search.header-search input::placeholder { color: var(--text-soft); }
.drawer-search.header-search input:focus { border-color: var(--laton-500); background: var(--surface); box-shadow: 0 0 0 3px var(--laton-100); }
.drawer-search .sg { position: static; width: 100%; max-height: min(52dvh, 460px); margin-top: 8px; box-shadow: none; border-radius: var(--r-md); }

/* Navegación por niveles. Sin JS: <details> anidados; con JS (.is-live): paneles que se deslizan. */
.dn { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--border-soft); }
.dn-list, .dn-extra { list-style: none; margin: 0; padding: 0; }
.dn-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 6px 14px 6px 20px;
  border: 0; border-radius: 0; cursor: pointer; text-align: left; text-decoration: none;
  background: linear-gradient(var(--border-soft), var(--border-soft)) no-repeat left 20px bottom / calc(100% - 20px) 1px;
  color: var(--text); font: inherit; font-size: var(--fs-base); font-weight: 500; line-height: 1.25;
  -webkit-tap-highlight-color: transparent; transition: background-color .15s;
}
summary.dn-row { list-style: none; }
summary.dn-row::-webkit-details-marker { display: none; }
.dn-row:hover { background-color: var(--surface-2); }
.dn-row:active { background-color: var(--piedra-200); }
.dn-row:focus-visible, .dn-back:focus-visible, .dn-extra a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.dn-row-root { min-height: 56px; font-weight: 600; }
.dn-thumb { flex: none; width: 36px; height: 36px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); }
.dn-label { flex: 1; min-width: 0; }
.dn-chev { flex: none; color: var(--text-soft); transition: transform .2s var(--ease); }
.dn-all { color: var(--accent-strong); font-weight: 600; }
.dn-row[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }
.dn-row[aria-current="page"]::after { content: ""; flex: none; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--laton-500); }
.dn-back[hidden] { display: none; }
.dn-back {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 4px; width: 100%; min-height: 52px; padding: 0 16px 0 10px;
  border: 0; border-bottom: 1px solid var(--border); background: var(--hueso); cursor: pointer; text-align: left;
  color: var(--text); font-family: var(--font-display); font-weight: var(--fw-display); font-variation-settings: "wdth" var(--wdth-display); letter-spacing: var(--ls-display); font-size: var(--fs-md); line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.dn-back svg { flex: none; color: var(--text-muted); }
.dn-back:hover svg { color: var(--text); }
.dn-extra { padding: 18px 0 24px; }
.dn-extra a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 20px;
  color: var(--text-muted); font-size: var(--fs-sm); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.dn-extra a:hover { color: var(--text); }
.dn-extra svg { flex: none; color: var(--monte-500); }
/* Sin JS: los niveles se despliegan en el sitio. */
.dn:not(.is-live) .dn-node[open] > summary .dn-chev { transform: rotate(90deg); }
.dn:not(.is-live) .dn-node > .dn-panel { padding-left: 14px; background: var(--surface-2); }
/* Con JS: un panel por nivel, solo el activo es visible e interactivo. */
.dn.is-live { overflow: hidden; }
.dn.is-live .dn-panel {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--hueso);
  transform: translateX(100%); visibility: hidden;
  transition: transform .25s var(--ease), visibility 0s linear .25s;
}
.dn.is-live .dn-panel + .dn-panel { box-shadow: -12px 0 24px -16px rgba(20, 29, 23, .35); }
.dn.is-live .dn-panel.is-active { transform: none; visibility: visible; transition: transform .25s var(--ease), visibility 0s; }
.dn.is-live .dn-panel.is-behind { transform: translateX(-28%); }
.dn.is-instant .dn-panel { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .dn.is-live .dn-panel, .dn.is-live .dn-panel.is-active { transition: none; }
}
@keyframes slide-in { from { transform: translateX(-100%); } }
@keyframes fade { from { opacity: 0; } }

/* Pie */
.site-footer { background: var(--encina-900); color: var(--monte-300); margin-top: clamp(48px, 8vw, 96px); font-size: var(--fs-sm); }
.footer-grid {
  display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(0, 1.4fr) minmax(0, 1.1fr) repeat(2, minmax(0, 1fr)) minmax(0, .8fr);
  gap: 40px; padding-block: 64px 48px;
}
.footer-brand { display: grid; gap: 20px; align-content: start; justify-items: start; }
.footer-logo { display: block; line-height: 0; }
.footer-logo img { height: 84px; width: auto; }
.footer-dealer {
  font-size: 13px; color: var(--monte-300); padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-sm);
}
.footer-col { display: grid; gap: 10px; align-content: start; }
.site-footer address { font-style: normal; line-height: 1.6; color: var(--piedra-100); }
.footer-hours { line-height: 1.6; margin-top: 6px; }
.site-footer .footer-map { justify-self: start; font-weight: 600; color: var(--laton-300); }
.site-footer a { color: var(--piedra-100); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer h2 { font-size: var(--fs-sm); font-weight: 600; color: var(--laton-300); margin-bottom: 4px; }
.site-footer nav h2 { margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; padding-block: 20px 28px;
  background: linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .08)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: 13px; color: var(--monte-500);
}
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-block: 44px 32px; }
  .footer-brand { grid-auto-flow: row; justify-content: start; }
  .footer-logo img { height: 68px; }
  .footer-visit { grid-column: 1 / -1; }
  .footer-cats { grid-row: span 2; }
}

/* Idioma: dos banderas arriba a la derecha (en el móvil, dentro del menú) */
.lang-sw { display: flex; align-items: center; gap: 6px; flex: none; }
.lang-sw-h { margin-left: 10px; }
.lang-flag { display: inline-flex; padding: 3px; border-radius: 5px; opacity: .55; outline: 2px solid transparent; outline-offset: 0; transition: opacity .15s, outline-color .15s; }
.lang-flag svg { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.lang-flag:hover, .lang-flag:focus-visible { opacity: 1; }
.lang-flag.is-current { opacity: 1; outline-color: var(--laton-500, #b8964f); }
.lang-sw-d { margin-left: auto; margin-right: 8px; }
@media (max-width: 899px) { .lang-sw-h { display: none; } }

/* Cabecera en dos niveles: fila verde con logo, buscador, cuenta y carrito; debajo, las secciones
   centradas en una barra un tono más oscura. --------------------------------------------------------- */
.header-in { height: 84px; gap: 28px; }
.brand-logo { height: 60px; }
.hs { flex: 1; justify-content: center; margin-left: 0; }
.header-search { width: min(680px, 100%); }
.header-search input { height: 46px; border-radius: 999px; font-size: 16px; padding: 0 44px 0 46px; }
.hs-icon { left: 17px; }
.nav-row { background: var(--encina-900); }
.nav-row > .container { max-width: var(--shell); }
.nav-row .main-nav { height: 48px; margin-left: 0; display: block; }
.nav-row .main-nav > ul { justify-content: center; }
.main-nav > ul > li > a { font-size: 15px; letter-spacing: .01em; padding: 0 16px; }
.main-nav > ul > li > a[aria-current="page"] { color: var(--laton-300); border-bottom-color: var(--laton-500); }
.main-nav .nav-offers > a { color: var(--laton-300); }
.main-nav .nav-offers > a::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--sale); }
@media (min-width: 640px) {
  .hs-open { display: none; }
  .hs:not(.is-open) .header-search { display: flex; }
}
@media (max-width: 1199px) { .acct-btn .acct-label { display: none; } }
@media (max-width: 1023px) {
  .nav-row { display: none; }
  .header-in { height: 72px; gap: 14px; }
  .brand-logo { height: 50px; }
}
@media (max-width: 639px) {
  .header-in { height: 60px; gap: 6px; }
  .brand-logo { height: 44px; }
  .hs { flex: none; }
}

/* Dentro de la tienda (listados y fichas): todo en una sola fila compacta.
   Las dos filas de la cabecera se funden (display: contents) y se ordenan: logo, secciones, buscador,
   idioma, cuenta y carrito. ---------------------------------------------------------------------- */
@media (min-width: 1024px) {
  :is(.page-catalogo, .page-ficha) { --header-h: 72px; }
  :is(.page-catalogo, .page-ficha) .site-header {
    display: flex; align-items: center; gap: 18px; height: 72px;
    padding-inline: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  }
  :is(.page-catalogo, .page-ficha) .site-header > .header-in,
  :is(.page-catalogo, .page-ficha) .nav-row,
  :is(.page-catalogo, .page-ficha) .nav-row > .container { display: contents; }
  :is(.page-catalogo, .page-ficha) .brand { order: 1; margin-right: 6px; }
  :is(.page-catalogo, .page-ficha) .brand-logo { height: 46px; }
  :is(.page-catalogo, .page-ficha) .main-nav { order: 2; height: 72px; flex: none; }
  :is(.page-catalogo, .page-ficha) .main-nav > ul { justify-content: flex-start; }
  :is(.page-catalogo, .page-ficha) .main-nav > ul > li > a { padding: 0 11px; font-size: 14.5px; }
  :is(.page-catalogo, .page-ficha) .hs { order: 3; flex: 1 1 180px; justify-content: flex-end; }
  :is(.page-catalogo, .page-ficha) .header-search { width: min(320px, 100%); }
  :is(.page-catalogo, .page-ficha) .header-search input { height: 42px; font-size: 15px; }
  :is(.page-catalogo, .page-ficha) .lang-sw-h { order: 4; margin-left: 0; }
  :is(.page-catalogo, .page-ficha) .acct-btn { order: 5; }
  :is(.page-catalogo, .page-ficha) .cart-btn:not(.acct-btn) { order: 6; }
  :is(.page-catalogo, .page-ficha) .acct-btn .acct-label { display: none; }
}
@media (min-width: 1024px) and (max-width: 1359px) {
  :is(.page-catalogo, .page-ficha) .hs-open { display: inline-grid; }
  :is(.page-catalogo, .page-ficha) .hs:not(.is-open) .header-search { display: none; }
  :is(.page-catalogo, .page-ficha) .cart-label { display: none; }
}

/* Título de la página de la tienda dentro de la cabecera ------------------------------------------ */
.hdr-title { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 0 1 auto; color: #fff; line-height: 1.1; }
.hdr-title h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-back { font-size: 13px; font-weight: 600; color: var(--laton-300); text-decoration: none; white-space: nowrap; }
.hdr-back::after { content: " ›"; }
.hdr-back:hover { text-decoration: underline; text-underline-offset: 3px; }
/* En la tienda ya estamos «en la tienda»: fuera Tienda, Ofertas y Blog de la barra */
:is(.page-catalogo, .page-ficha) .main-nav :is(.nav-shop, .nav-offers, .nav-blog) { display: none; }
/* La tienda a todo el ancho de la pantalla */
:is(.page-catalogo, .page-ficha) { --shell: 100vw; }
@media (min-width: 1024px) {
  :is(.page-catalogo, .page-ficha) .hdr-title { order: 1; padding: 0 22px 0 20px; margin-right: 4px; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .16); max-width: 300px; }
}
@media (max-width: 1023px) {
  .hdr-title { flex: 1 1 auto; }
  .hdr-title h1 { font-size: 18px; }
  .page-catalogo .brand { margin-right: 0; }
  .page-catalogo .hs { flex: none; }
}
/* Al entrar en la tienda, el título llega desde la izquierda */
@media (prefers-reduced-motion: no-preference) {
  .hdr-title { animation: hdr-title-in .6s cubic-bezier(.2, .7, .2, 1) .05s both; }
}
@keyframes hdr-title-in { from { opacity: 0; transform: translateX(-24px); } }

/* En la tienda, las secciones centradas en la fila; el buscador sigue a la derecha */
@media (min-width: 1024px) {
  :is(.page-catalogo, .page-ficha) .main-nav { flex: 1 1 auto; }
  :is(.page-catalogo, .page-ficha) .nav-row .main-nav > ul { justify-content: center; }
  :is(.page-catalogo, .page-ficha) .hs { flex: none; }
}

/* Cabecera de dos filas: el buscador centrado en la pantalla, alineado con la barra de secciones
   (y no en el hueco entre el logo y los iconos, que es más ancho a la derecha). */
@media (min-width: 1200px) {
  body:not(.page-catalogo):not(.page-ficha) .header-in .hs:not(.is-open) .header-search {
    position: absolute; left: 0; right: 0; top: 50%; margin: -23px auto 0; width: min(680px, calc(100% - 800px));
  }
}
