/**
 * Layout alternativo (header-alt + footer-alt) — body.alt-layout
 */
body.alt-layout {
  --alt-dark: #111111;
  --alt-border: #e8e8e8;
  --alt-muted: #666;
  --alt-wholesale-red: #a31830;
  --alt-wholesale-red-deep: #7d1224;
  --alt-wholesale-red-border: rgba(163, 24, 48, 0.42);
  --alt-stores-blue: #193a67;
  --alt-stores-blue-deep: #122a4d;
  --alt-header-gutter: 1.25rem;
  --alt-nav-screen-edge: var(--alt-header-gutter);
  --alt-cintillo-font-size: 0.75rem;
  overflow-x: clip;
}

body.alt-layout .main-content {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
  overflow-x: clip;
}

/* Cintillo superior */
body.alt-layout .alt-header-top {
  background: var(--header-top-bg, #193a67);
  color: var(--header-top-text, #f0f4f8);
  font-size: var(--alt-cintillo-font-size);
  padding: 0.5rem 0;
  overflow: hidden;
}
body.alt-layout .alt-header-top-marquee {
  overflow: hidden;
}
body.alt-layout .alt-header-top-track {
  display: flex;
  width: max-content;
  animation: alt-header-top-scroll 38s linear infinite;
}
body.alt-layout .alt-header-top-track span {
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 3rem;
}
@keyframes alt-header-top-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body.alt-layout .alt-header-top-track { animation: none; }
  body.alt-layout .alt-header-top-track span[aria-hidden="true"] { display: none; }
}

/* Header shell — sticky + auto-hide al bajar */
body.alt-layout .alt-header-shell {
  position: sticky;
  top: 0;
  z-index: 60;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
body.alt-layout.alt-header-hidden .alt-header-shell {
  transform: translateY(-100%);
}
@media (prefers-reduced-motion: reduce) {
  body.alt-layout .alt-header-shell {
    transition: none;
  }
}

/* Header */
body.alt-layout .alt-site-header {
  background: #fff;
  border-bottom: 1px solid var(--alt-border);
}

body.alt-layout .alt-header-main {
  border-bottom: 1px solid var(--alt-border);
}
body.alt-layout .alt-header-main-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem var(--alt-header-gutter);
}

body.alt-layout .alt-header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

body.alt-layout .alt-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
}

body.alt-layout .alt-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
body.alt-layout .alt-logo:hover { text-decoration: none; opacity: 0.9; }
body.alt-layout .alt-logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
body.alt-layout .alt-logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: var(--alt-dark);
}
body.alt-layout .alt-logo-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--alt-muted);
}

body.alt-layout .alt-header-search {
  display: flex;
  align-items: stretch;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--alt-border);
  border-radius: 2px;
  overflow: hidden;
  background: #fafafa;
}
body.alt-layout .alt-header-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
}
body.alt-layout .alt-header-search-input:focus {
  outline: none;
  background: #fff;
}
body.alt-layout .alt-header-search-btn {
  border: none;
  background: var(--alt-dark);
  color: #fff;
  padding: 0 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
body.alt-layout .alt-header-search-btn:hover { background: #333; }

body.alt-layout .alt-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
}
body.alt-layout .alt-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--alt-border);
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}
body.alt-layout .alt-nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--alt-dark);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
body.alt-layout.alt-menu-open .alt-nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.alt-layout.alt-menu-open .alt-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
body.alt-layout.alt-menu-open .alt-nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
body.alt-layout .alt-header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--alt-dark);
  text-decoration: none;
  border: 1px solid var(--alt-border);
  border-radius: 2px;
}
body.alt-layout .alt-header-cart:hover {
  border-color: var(--alt-dark);
  text-decoration: none;
}
body.alt-layout .alt-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-btn, #9f5a77);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.alt-layout .alt-header-stores {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem 0.5rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--alt-stores-blue-deep);
  border-radius: 999px;
  background: linear-gradient(180deg, #1f4a82 0%, var(--alt-stores-blue) 100%);
  box-shadow: 0 2px 8px rgba(25, 58, 103, 0.28);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
body.alt-layout .alt-header-stores:hover {
  border-color: #0d1f38;
  color: #fff;
  background: linear-gradient(180deg, var(--alt-stores-blue) 0%, var(--alt-stores-blue-deep) 100%);
  box-shadow: 0 4px 16px rgba(18, 42, 77, 0.32);
  transform: translateY(-1px);
  text-decoration: none;
}
body.alt-layout .alt-header-stores-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}
body.alt-layout .alt-header-stores-icon svg {
  display: block;
}
body.alt-layout .alt-header-stores-text {
  line-height: 1.2;
}
body.alt-layout .alt-header-quick {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
body.alt-layout a.alt-header-offers-slot.alt-nav-link--offers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--alt-wholesale-red-deep);
  border-radius: 999px;
  border-bottom: 1px solid var(--alt-wholesale-red-deep);
  box-shadow: 0 2px 8px rgba(163, 24, 48, 0.28);
}
body.alt-layout a.alt-header-offers-slot.alt-nav-link--offers:hover {
  border-radius: 999px;
  border-bottom-color: #5e0d1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(94, 13, 26, 0.32);
}
body.alt-layout .alt-header-login {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--alt-dark);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--alt-border);
  border-radius: 2px;
}
body.alt-layout .alt-header-login:hover {
  border-color: var(--alt-dark);
  text-decoration: none;
}

body.alt-layout .alt-header-wholesale-code {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.52rem 1rem 0.52rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--alt-stores-blue-deep);
  border-radius: 999px;
  background: linear-gradient(180deg, #1f4a82 0%, var(--alt-stores-blue) 100%);
  box-shadow: 0 2px 8px rgba(25, 58, 103, 0.28);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
body.alt-layout .alt-header-wholesale-code:hover {
  border-color: #0d1f38;
  color: #fff;
  background: linear-gradient(180deg, var(--alt-stores-blue) 0%, var(--alt-stores-blue-deep) 100%);
  box-shadow: 0 4px 16px rgba(18, 42, 77, 0.32);
  transform: translateY(-1px);
  text-decoration: none;
}
body.alt-layout .alt-header-wholesale-code-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1a9e4a;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
body.alt-layout .alt-header-wholesale-code-icon svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
}
body.alt-layout .alt-header-wholesale-code-text {
  line-height: 1.2;
}

body.alt-layout .alt-header-wholesale-session {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  max-width: min(280px, 46vw);
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(154, 107, 72, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(154, 107, 72, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(154, 107, 72, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
body.alt-layout .alt-header-wholesale-session:hover {
  border-color: rgba(154, 107, 72, 0.45);
  box-shadow: 0 4px 14px rgba(154, 107, 72, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}
body.alt-layout .alt-header-wholesale-session-name {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--alt-dark);
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  hyphens: auto;
}
body.alt-layout .alt-header-wholesale-session-tag {
  flex-shrink: 0;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a6b48;
  line-height: 1.2;
}

body.alt-layout .alt-nav-drawer-wholesale-card {
  padding: 1rem 1.05rem;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(154, 107, 72, 0.12), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(154, 107, 72, 0.2);
}
body.alt-layout .alt-nav-drawer-wholesale-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a6b48;
}
body.alt-layout .alt-nav-drawer-wholesale-name {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--alt-dark);
  line-height: 1.35;
  word-break: break-word;
  hyphens: auto;
}
body.alt-layout .alt-nav-drawer-wholesale-logout {
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--alt-dark);
  text-decoration: none;
  opacity: 0.75;
}
body.alt-layout .alt-nav-drawer-wholesale-logout:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Menú principal — desktop */
body.alt-layout .alt-header-nav {
  background: var(--alt-dark);
  color: #fff;
}
body.alt-layout .alt-header-nav-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-block: 0.35rem 0.45rem;
  padding-inline: var(--alt-nav-screen-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
body.alt-layout .alt-nav-primary {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 100%;
}
body.alt-layout .alt-nav-primary > li {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}
body.alt-layout .alt-nav-link {
  display: block;
  text-align: center;
  padding: 0.48rem 0.15rem;
  font-size: var(--alt-cintillo-font-size);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
body.alt-layout .alt-nav-link:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
body.alt-layout .alt-nav-link--home,
body.alt-layout .alt-nav-link--offers {
  color: #fff;
  background: linear-gradient(180deg, var(--alt-wholesale-red) 0%, var(--alt-wholesale-red-deep) 100%);
  border-radius: 4px;
  padding: 0.48rem 0.85rem;
  border-bottom-color: transparent;
  box-shadow: 0 2px 8px rgba(163, 24, 48, 0.35);
  font-size: var(--alt-cintillo-font-size);
  letter-spacing: 0.05em;
}
body.alt-layout .alt-nav-link--home:hover,
body.alt-layout .alt-nav-link--offers:hover {
  color: #fff;
  background: linear-gradient(180deg, #8d1529 0%, #5e0d1a 100%);
  border-bottom-color: transparent;
  box-shadow: 0 4px 12px rgba(94, 13, 26, 0.4);
}

/* Drawer móvil */
body.alt-layout .alt-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 95;
}
body.alt-layout .alt-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: #fff;
  z-index: 96;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
}
body.alt-layout.alt-menu-open .alt-nav-drawer {
  transform: translateX(0);
}
body.alt-layout .alt-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--alt-border);
}
body.alt-layout .alt-nav-drawer-logo {
  text-decoration: none;
  color: inherit;
}
body.alt-layout .alt-nav-drawer-logo .alt-logo-img {
  height: 36px;
}
body.alt-layout .alt-nav-drawer-close {
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--alt-muted);
  padding: 0.15rem 0.35rem;
}
body.alt-layout .alt-nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem 1.5rem;
}
body.alt-layout .alt-nav-drawer-search {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
body.alt-layout .alt-nav-drawer-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--alt-border);
  border-radius: 2px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
}
body.alt-layout .alt-nav-drawer-search button {
  border: none;
  background: var(--alt-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 0.85rem;
  border-radius: 2px;
  cursor: pointer;
}
body.alt-layout .alt-nav-drawer-section {
  margin-bottom: 1.35rem;
}
body.alt-layout .alt-nav-drawer-label {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--alt-muted);
}
body.alt-layout .alt-nav-drawer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.alt-layout .alt-nav-drawer-list a {
  display: block;
  padding: 0.65rem 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--alt-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--alt-border);
}
body.alt-layout .alt-nav-drawer-list a:hover {
  color: var(--color-gold, #9a6b48);
  text-decoration: none;
}
body.alt-layout .alt-nav-drawer-home,
body.alt-layout .alt-nav-drawer-home:hover,
body.alt-layout .alt-nav-drawer-offers,
body.alt-layout .alt-nav-drawer-offers:hover {
  color: var(--alt-wholesale-red) !important;
  font-weight: 700 !important;
}
body.alt-layout .alt-nav-drawer-accent {
  color: var(--color-btn, #9f5a77) !important;
  font-weight: 600 !important;
}
body.alt-layout .alt-nav-drawer-section--cta {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--alt-border);
}
body.alt-layout .alt-nav-drawer-btn {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--alt-dark);
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}
body.alt-layout .alt-nav-drawer-btn--outline {
  background: #fff;
  color: var(--alt-dark) !important;
  border: 1px solid var(--alt-dark);
}
body.alt-layout .alt-nav-drawer-link {
  display: block;
  text-align: center;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--alt-muted);
  text-decoration: none;
}
body.alt-layout .alt-nav-drawer-link:hover {
  color: var(--alt-dark);
  text-decoration: underline;
}

body.alt-layout.alt-menu-open {
  overflow: hidden;
}

/* Mini carrito — scoped alt */
body.alt-layout .alt-mini-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
}
body.alt-layout .alt-mini-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100%;
  background: #fff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
}
body.alt-layout .alt-mini-cart-drawer.open {
  transform: translateX(0);
}
body.alt-layout .alt-mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--alt-border);
}
body.alt-layout .alt-mini-cart-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.alt-layout .alt-mini-cart-close {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--alt-muted);
}
body.alt-layout .alt-mini-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.15rem;
}
body.alt-layout .alt-mini-cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--alt-border);
}
body.alt-layout .alt-mini-cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--alt-border);
}
body.alt-layout .alt-mini-cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--alt-dark);
  text-decoration: none;
}
body.alt-layout .alt-mini-cart-item-name:hover { text-decoration: underline; }
body.alt-layout .alt-mini-cart-item-info .cart-offer-payment-note {
  max-width: 100%;
  margin: 0.3rem 0 0.1rem;
  font-size: 0.62rem;
}
body.alt-layout .alt-mini-cart-item-info small {
  display: block;
  font-size: 0.75rem;
  color: var(--alt-muted);
  margin-top: 0.2rem;
}
body.alt-layout .alt-mini-cart-item-remove {
  color: var(--alt-muted);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
}
body.alt-layout .alt-mini-cart-empty {
  color: var(--alt-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}
body.alt-layout .alt-mini-cart-footer {
  padding: 1rem 1.15rem 1.25rem;
  border-top: 1px solid var(--alt-border);
}
body.alt-layout .alt-mini-cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
body.alt-layout .alt-mini-cart-subtotal strong {
  font-size: 1rem;
}
body.alt-layout .alt-mini-cart-btn {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
}
body.alt-layout .alt-mini-cart-btn-light {
  background: #f3f3f3;
  color: var(--alt-dark);
  border: 1px solid var(--alt-border);
}
body.alt-layout .alt-mini-cart-btn-primary {
  background: var(--alt-dark);
  color: #fff;
  border: 1px solid var(--alt-dark);
}
body.alt-layout.alt-mini-cart-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  body.alt-layout .alt-header-main-inner {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    grid-template-areas:
      "menu logo cart"
      "search search search"
      "stores stores stores"
      "wholesale wholesale wholesale";
    gap: 0.5rem 0.65rem;
    align-items: center;
    padding: 0.65rem 0.85rem 0.8rem;
  }

  body.alt-layout .alt-nav-toggle {
    display: inline-flex;
    grid-area: menu;
    justify-self: start;
  }

  body.alt-layout .alt-logo {
    grid-area: logo;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
  }

  body.alt-layout .alt-logo-img {
    height: 34px;
    max-width: min(150px, 44vw);
    margin: 0 auto;
  }

  body.alt-layout .alt-header-end {
    display: contents;
  }

  body.alt-layout .alt-header-cart {
    grid-area: cart;
    justify-self: end;
  }

  body.alt-layout .alt-header-cart-slot {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    box-shadow: none;
    transform: none;
  }

  body.alt-layout .alt-header-cart-slot svg {
    width: 22px;
    height: 22px;
  }

  body.alt-layout .alt-header-quick {
    grid-area: stores;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 0.45rem;
  }

  body.alt-layout .alt-header-stores-slot {
    grid-area: auto;
    width: 100%;
    max-width: none;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.55rem 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  body.alt-layout .alt-header-offers-slot {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    border-radius: 999px;
  }

  body.alt-layout .alt-header-wholesale-slot {
    grid-area: wholesale;
    width: 100%;
    max-width: none;
    justify-content: center;
    box-sizing: border-box;
  }

  body.alt-layout .alt-header-wholesale-session {
    align-items: center;
    text-align: center;
  }

  body.alt-layout .alt-header-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    min-height: 46px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #d8d8d8;
    box-shadow: none;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.alt-layout .alt-header-search-input {
    font-size: 16px;
    line-height: 1.35;
    padding: 0.75rem 0.85rem;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
  }

  body.alt-layout .alt-header-search-input::-webkit-search-decoration,
  body.alt-layout .alt-header-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
  }

  body.alt-layout .alt-header-search-btn {
    flex: 0 0 48px;
    width: 48px;
    min-height: 44px;
    padding: 0;
    border-radius: 0;
  }

  body.alt-layout .alt-header-wholesale-code {
    padding: 0.55rem 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    gap: 0.45rem;
  }

  body.alt-layout .alt-header-nav {
    display: none;
  }
}

@media (min-width: 769px) {
  body.alt-layout .alt-header-main-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo search end";
    align-items: center;
    gap: 1rem 1.25rem;
  }

  body.alt-layout .alt-nav-toggle {
    display: none;
  }

  body.alt-layout .alt-logo {
    grid-area: logo;
  }

  body.alt-layout .alt-header-search {
    grid-area: search;
    width: 100%;
    max-width: 520px;
    margin: 0;
    justify-self: center;
  }

  body.alt-layout .alt-header-end {
    grid-area: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-shrink: 0;
    flex-wrap: wrap;
  }

  body.alt-layout .alt-header-stores-slot {
    width: auto;
    padding: 0.52rem 1rem 0.52rem 0.85rem;
  }

  body.alt-layout .alt-header-cart-slot {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-left: 0.15rem;
    border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, 0.1);
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
  }

  body.alt-layout .alt-header-cart-slot:hover {
    border-color: var(--alt-dark);
    background: #fff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
  }

  body.alt-layout .alt-header-cart-slot svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.65;
  }

  body.alt-layout .alt-header-cart-slot .alt-cart-count {
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  }

  body.alt-layout .alt-nav-drawer,
  body.alt-layout .alt-nav-overlay {
    display: none !important;
  }
}

/* Páginas internas (categoría, búsqueda, carrito, etc.) */
body.alt-layout.page-shop .main-content {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px max(20px, env(safe-area-inset-left)) 32px max(20px, env(safe-area-inset-right));
  overflow-x: visible;
}

@media (max-width: 768px) {
  body.alt-layout.page-shop .main-content {
    padding: 20px max(16px, env(safe-area-inset-left)) 24px max(16px, env(safe-area-inset-right));
  }
}

/* categoria.php — 95% ancho, 2.5% margen lateral */
body.alt-layout.page-categoria .main-content {
  max-width: none;
  width: 95%;
  margin-left: 2.5%;
  margin-right: 2.5%;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body.alt-layout.page-categoria .main-content {
    width: 95%;
    margin-left: 2.5%;
    margin-right: 2.5%;
    padding-left: 0;
    padding-right: 0;
  }
}
