/* ============================================================
   MILKU — Frontend CSS
   Variables de tema inyectadas dinámicamente desde ThemeService
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Fallbacks — ThemeService sobreescribe estos en <style> */
  --color-primary:      #0D0D0D;
  --color-secondary:    #F5F0E8;
  --color-accent:       #B87333;
  --color-accent-light: #D4956A;
  --font-display:       'Hellix', Jost, Arial, sans-serif;
  --font-body:          'Hellix', Jost, Arial, sans-serif;
  --font-price:         var(--font-display);
  --font-nav:           var(--font-body);
  --fw-display:         700;
  --fw-body:            400;
  --fw-nav:             500;
  --ls-display:         0em;
  --ls-body:            0em;
  --fs-nav:             13px;
  --fs-heading:         32px;
  --fs-subheading:      15px;
  --fs-product:         14px;
  --fs-price:           16px;
  --logo-height:        38px;
  --logo-max-width:     min(220px, 171px);
  --nav-padding-y:      15px;
  --nav-h:              68px;
  --color-mid:        #6B6560;
  --color-rule:       #D6CDBF;
  --catalog-header-bg:  #FFFFFF;
  --catalog-header-bg-end: #FFFFFF;
  --catalog-header-background: #FFFFFF;
  --catalog-line-color: #D6CDBF;
  --color-sand2:      #EDE6D6;
  --color-white:      #FFFFFF;
  --color-light-bg:   #F7F5F2;
  --color-success:    #2E7D4F;
  --color-error:      #C0392B;
  --color-warning:    #B8860B;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);

  --max-w: 1280px;
}

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  letter-spacing: var(--ls-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-primary);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a   { color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Utilidades ─────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: all 0.2s; white-space: nowrap;
}
.btn--primary   { background: var(--color-primary); color: var(--color-white); }
.btn--primary:hover { background: var(--color-accent); }
.btn--accent    { background: var(--color-accent); color: var(--color-white); }
.btn--accent:hover  { background: var(--color-accent-light); }
.btn--outline   { border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: var(--color-white); }
.btn--ghost     { color: var(--color-mid); font-weight: 500; letter-spacing: 0.03em; text-transform: none; }
.btn--ghost:hover   { color: var(--color-primary); }
.btn--light     { background: #fff; color: var(--color-primary); border: 1px solid rgba(255,255,255,0.85); }
.btn--light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn--dark      { background: var(--color-primary); color: var(--color-white); }
.btn--dark:hover { background: var(--color-accent); }
.btn--sm        { padding: 0.5rem 1.1rem; font-size: 0.7rem; }

/* ── Flash ──────────────────────────────────────────────────── */
.flash {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.875rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  position: fixed; top: calc(var(--nav-h) + 0.75rem); right: 1.5rem;
  z-index: 9999; max-width: 420px; border-radius: var(--radius-md);
  animation: slideIn 0.25s ease;
}
.flash--success { background: #d1fae5; color: #065f46; }
.flash--error   { background: #fee2e2; color: #7f1d1d; }
.flash__close   { opacity: 0.6; font-size: 1rem; }
.flash__close:hover { opacity: 1; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Site header (marquee + navbar) ─────────────────────────── */
.site-header--with-marquee {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white, #fff);
}
.site-header--with-marquee .navbar {
  position: static;
}
.site-header__marquee .marquee-section { margin: 0; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-rule);
  transition: box-shadow 0.2s;
  height: var(--nav-h);
  overflow-x: clip;
}
.navbar--scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.navbar__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; align-items: center; gap: 2rem;
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: var(--fw-display);
  text-decoration: none; color: var(--color-primary);
  letter-spacing: -0.02em; flex-shrink: 0;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: min(200px, 42vw);
  height: var(--logo-height, 38px);
  overflow: hidden;
}
.navbar__logo-img {
  display: block;
  height: var(--logo-height, 38px);
  width: auto;
  max-width: var(--logo-max-width, 160px);
  object-fit: contain;
}
.navbar__logo-dot { color: var(--color-accent); }

.navbar__links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none; margin: 0;
}
.navbar__links a {
  display: block; padding: 0.4rem 0.75rem;
  font-family: var(--font-nav, var(--font-body));
  font-size: var(--fs-nav, 13px);
  font-weight: var(--fw-nav, 500);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-mid); text-decoration: none; transition: color 0.2s;
}
.navbar__links a:hover, .navbar__links a.active { color: var(--color-primary); }

.navbar__actions {
  margin-left: auto; display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
}
.navbar__icon-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: var(--color-mid); border-radius: var(--radius-sm); transition: all 0.2s; position: relative;
}
.navbar__icon-btn:hover { color: var(--color-primary); background: var(--color-light-bg); }
.navbar__recent-chip {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--color-rule, #e5e5e5);
  background: #fff; flex-shrink: 0; line-height: 0; transition: opacity .15s ease, border-color .15s ease;
}
.navbar__recent-chip:hover { opacity: .88; border-color: var(--color-mid, #888); }
.navbar__recent-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.navbar__recent-chip-fallback { display: block; width: 100%; height: 100%; background: #eee; }
.iso-head__cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.navbar__cart-badge {
  position: absolute;
  top: auto;
  left: auto;
  right: -9px;
  bottom: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
  box-shadow: 0 0 0 1.5px #fff;
}
.navbar__cart-badge[hidden] {
  display: none;
}
.navbar__link-plain {
  font-family: var(--font-nav, var(--font-body));
  font-size: var(--fs-nav, 13px);
  font-weight: var(--fw-nav, 500);
  text-decoration: none; color: var(--color-mid); padding: 0.4rem 0.5rem;
}
.navbar__link-plain:hover { color: var(--color-primary); }
.navbar__cta {
  background: var(--color-primary); color: var(--color-white);
  padding: 0.55rem 1.2rem;
  font-family: var(--font-nav, var(--font-body));
  font-size: var(--fs-nav, 13px);
  font-weight: var(--fw-nav, 600);
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: background 0.2s;
}
.navbar__cta:hover { background: var(--color-accent); }

/* Search bar */
.search-bar {
  background: var(--color-light-bg); border-top: 1px solid var(--color-rule);
  padding: 0.875rem 2rem;
}
.search-bar__form {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; gap: 0.75rem;
}
.search-bar__form input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 1rem; font-family: var(--font-body);
  color: var(--color-primary);
}
.search-bar__form input::placeholder { color: var(--color-mid); }
.search-bar__form button { color: var(--color-mid); }

/* Dropdowns */
.user-menu, .lang-switcher { position: relative; }
.user-menu__btn, .lang-switcher__btn {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500; color: var(--color-primary);
  transition: background 0.15s;
  touch-action: manipulation;
}
.user-menu__btn:hover, .lang-switcher__btn:hover { background: var(--color-light-bg); }
.user-menu__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-size: 0.7rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.user-menu__dropdown, .lang-switcher__dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border: 1px solid var(--color-rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); list-style: none; min-width: 180px;
  opacity: 0; pointer-events: none; transform: translateY(-4px); transition: all 0.15s;
}
.user-menu.open .user-menu__dropdown,
.lang-switcher.open .lang-switcher__dropdown {
  opacity: 1; pointer-events: all; transform: none;
}
.user-menu__dropdown a, .lang-switcher__dropdown a {
  display: block; padding: 0.6rem 1rem;
  font-size: 0.83rem; text-decoration: none; color: var(--color-primary);
  transition: background 0.1s;
}
.user-menu__dropdown a:hover, .lang-switcher__dropdown a:hover { background: var(--color-light-bg); }
.user-menu__sep { height: 1px; background: var(--color-rule); margin: 0.25rem 0; }
.logout-form { margin: 0; padding: 0; }
.user-menu__logout-btn {
  display: block; width: 100%; padding: 0.6rem 1rem;
  font-size: 0.83rem; color: var(--color-primary);
  background: none; border: none; text-align: left; cursor: pointer; font-family: inherit;
}
.user-menu__logout-btn:hover { background: var(--color-light-bg); }

/* Hamburger */
.navbar__hamburger {
  display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px;
  align-items: center; justify-content: center; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.navbar__mobile-auth { display: none; }
.navbar__hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--color-primary); transition: all 0.2s;
}
.navbar__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Producto card ───────────────────────────────────────────── */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.product-card__media {
  position: relative;
  margin-bottom: 0.75rem;
  flex: 0 0 auto;
}
.product-card__img,
.product-card__body {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0.7rem;
}
.product-card__body:hover .product-card__name { color: var(--color-accent); }
.product-card__img {
  background: var(--color-secondary);
  aspect-ratio: 3 / 4;
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
}
.product-card__img img,
.product-card__img-primary,
.product-card__img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.45s ease;
}
.product-card__img-primary { z-index: 1; display: block; }
.product-card__img-hover {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.product-card:hover .product-card__img-hover { opacity: 1; }
.product-card:hover .product-card__img-primary { transform: scale(1.04); }
.product-card__quickview {
  position: absolute; bottom: 0.65rem; right: 0.65rem; z-index: 5;
  width: 2.25rem; height: 2.25rem;
  display: none;
  align-items: center; justify-content: center;
  padding: 0;
  background: rgba(255,255,255,0.96); border: 1px solid var(--color-rule);
  border-radius: 50%;
  color: var(--color-primary); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  cursor: pointer;
}
.product-card__quickview:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Vista rápida: hover en desktop */
@media (hover: hover) and (pointer: fine) {
  [data-catalog-quick-view="desktop"] .product-card__quickview,
  [data-catalog-quick-view="all"] .product-card__quickview {
    display: inline-flex;
  }
  [data-catalog-quick-view="desktop"] .product-card:hover .product-card__quickview,
  [data-catalog-quick-view="all"] .product-card:hover .product-card__quickview {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Vista rápida: siempre visible en táctil (mobile) */
@media (hover: none), (pointer: coarse) {
  [data-catalog-quick-view="desktop"] .product-card__quickview,
  [data-catalog-quick-view="all"] .product-card__quickview {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
  }
}

[data-catalog-quick-view="off"] .product-card__quickview {
  display: none !important;
  pointer-events: none !important;
}

.product-card__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--color-sand2);
}
.product-card__badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 4;
  background: var(--color-primary); color: white;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 0;
  line-height: 1.2;
  pointer-events: none;
}
.product-card__badge--new      { background: var(--color-accent); }
.product-card__badge--featured { background: var(--color-primary); }
.product-card__badge--sale     { background: var(--color-error, #DC2626); }

.price {
  font: inherit;
  color: inherit;
}
.price--sale {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4em;
}
.price__was {
  font-size: 0.68em;
  font-weight: 400;
  color: var(--color-mid, #888);
  text-decoration: line-through;
}
.price__now {
  font-size: 1em;
  font-weight: inherit;
  text-decoration: none;
  color: var(--color-error, #DC2626);
}
.product-card__name   {
  font-family: var(--font-body);
  font-size: var(--fs-product, 14px);
  font-weight: var(--fw-body, 400);
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.product-card__sku {
  display: none;
}
.product-title {
  display: inline;
  font: inherit;
  color: inherit;
  line-height: 1.3;
}
.product-title--inline {
  display: inline;
}
.product-title__sku {
  font-weight: 700;
}
.product-title__sep {
  font-weight: inherit;
}
.product-title__name {
  font-weight: inherit;
}
.product-card__name .product-title__sku,
.iso-featured__name .product-title__sku {
  font-weight: 700;
}
.product-card__name .product-title__name,
.product-card__name .product-title__sep,
.iso-featured__name .product-title__name,
.iso-featured__name .product-title__sep {
  font-weight: 400;
}
.product-card__variant { font-size: 0.75rem; color: var(--color-mid); margin-bottom: 0.35rem; }
.product-card__price  {
  font-family: var(--font-price, var(--font-display));
  font-size: var(--fs-price, 16px);
  font-weight: 700;
  margin-top: 0.1rem;
  line-height: 1.3;
  min-height: 1.3em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card__price .price--sale {
  white-space: nowrap;
}
.product-card__colors {
  display: flex;
  gap: 4px;
  margin-top: 0.4rem;
  align-items: center;
  min-height: 12px;
}
.product-card__dot    { width: 10px; height: 10px; border-radius: var(--color-swatch-radius, 50%); border: 1px solid rgba(0,0,0,0.12); flex-shrink: 0; }
.product-card__colors-more { font-size: 0.68rem; color: var(--color-mid); }
.product-card__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.7rem 0.9rem;
  box-sizing: border-box;
  background: var(--color-primary);
  color: var(--color-white);
  border: 0;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, color 0.28s ease, letter-spacing 0.28s ease;
}
.product-card__buy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.38) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 1;
}
.product-card__buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  letter-spacing: 0.12em;
  background: var(--color-accent, var(--color-primary));
  color: var(--color-white);
}
.product-card__buy:hover::after {
  animation: cartAddShine 0.55s ease forwards;
}
.product-card__buy:active {
  transform: translateY(0);
  box-shadow: none;
}
@keyframes cartAddShine {
  to { transform: translateX(130%); }
}

/* ── Quick view modal ────────────────────────────────────────── */
.quick-view {
  position: fixed; inset: 0; z-index: 50050;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.quick-view[hidden] { display: none; }
.quick-view__backdrop {
  position: absolute; inset: 0;
  background: rgba(13,13,13,0.55);
}
.quick-view__dialog {
  position: relative; z-index: 1;
  width: min(920px, 100%); max-height: min(90vh, 720px);
  background: white; border-radius: 4px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  overflow: auto; padding: 1.5rem;
}
.quick-view__close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--color-light-bg); color: var(--color-mid);
  font-size: 0.9rem; line-height: 1;
}
.quick-view__close:hover { background: var(--color-primary); color: white; }
.quick-view__loader { text-align: center; padding: 3rem 1rem; color: var(--color-mid); font-size: 0.9rem; }
.quick-view__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem; align-items: start;
}
.quick-view__media { background: var(--color-secondary); aspect-ratio: 4/5; overflow: hidden; position: relative; }
.quick-view__sale-badge { z-index: 5; }
.quick-view__gallery { position: relative; width: 100%; height: 100%; }
.quick-view__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quick-view__gallery {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  user-select: none;
}
.quick-view__gallery .quick-view__img { height: 100%; }
.quick-view__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, color 0.15s ease;
}
.quick-view__nav:hover { background: var(--color-primary); color: #fff; }
.quick-view__nav--prev { left: 0.5rem; }
.quick-view__nav--next { right: 0.5rem; }
.quick-view__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
}
.quick-view__dot {
  pointer-events: auto;
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.quick-view__dot.is-active {
  background: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.quick-view__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--color-sand2);
}
.quick-view__variant { font-size: 0.75rem; color: var(--color-mid); margin-bottom: 0.35rem; }
.quick-view__title {
  font-family: var(--font-body); font-size: 1.35rem; font-weight: var(--fw-body, 400);
  color: var(--color-primary); margin-bottom: 0.5rem;
}
.quick-view__price {
  font-family: var(--font-price, var(--font-display)); font-size: var(--fs-price, 16px); font-weight: 700;
  margin-bottom: 0.75rem;
}
.quick-view__excerpt { font-size: 0.82rem; color: var(--color-mid); line-height: 1.6; margin-bottom: 1rem; }
.quick-view__field { margin-bottom: 1rem; }
.quick-view__label {
  display: block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-mid); margin-bottom: 0.5rem;
}
.quick-view__hint { font-size: 0.75rem; color: var(--color-mid); margin-top: 0.5rem; }
.quick-view__actions { margin: 1.25rem 0 0.75rem; }
.quick-view__full-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.78rem; font-weight: 600; color: var(--color-accent); text-decoration: none;
}
.quick-view__full-link:hover { text-decoration: underline; }
.quick-view__grid--matrix { align-items: start; }
.quick-view__matrix { margin: 0.5rem 0 0; max-width: 100%; }
.quick-view__dialog:has(.quick-view__grid--matrix) {
  width: min(980px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: min(92vh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
.quick-view__grid--matrix {
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.25rem;
}
.quick-view__grid--matrix .quick-view__media {
  aspect-ratio: 3 / 4;
  max-height: 320px;
}
.quick-view__grid--matrix .quick-view__info {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.quick-view__matrix.wm-matrix-wrap,
.quick-view .wm-matrix-wrap {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.quick-view .wm-matrix {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.quick-view .wm-matrix__color-head {
  min-width: 0;
  max-width: none;
  padding: .4rem .2rem !important;
}
.quick-view .wm-matrix__corner,
.quick-view .wm-matrix__size {
  min-width: 0;
  white-space: normal;
}
.quick-view .wm-matrix__color-name {
  font-size: .6rem;
}
.quick-view .wm-matrix__input {
  max-width: none;
  width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: .45rem .15rem;
  box-shadow: none;
}
.quick-view .wm-matrix__input:focus {
  background: #f3f3f3;
  box-shadow: none;
  border: none;
}
.quick-view .wm-matrix__cell {
  border-color: #c8c8c8;
}
.quick-view__retail-off {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-mid);
}
.quick-view__msg {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-success, #166534);
}
.quick-view__color-hint {
  display: none;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  min-height: 1.35em;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--color-mid);
  background: var(--color-light-bg, #f5f3f0);
  border-radius: 4px;
}
.quick-view__color-hint.is-set {
  color: var(--color-primary);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.quick-view__color-hint-swatch {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: var(--color-swatch-radius, 50%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ddd;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.quick-view__color-hint-text {
  min-width: 0;
  flex: 1;
}
.quick-view__color-hint-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 0.15rem;
}
.quick-view__color-hint-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
}
.quick-view__matrix-shell {
  position: relative;
  margin: 0;
}
.quick-view .product-selector__colors { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.quick-view .color-btn {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: var(--color-swatch-radius, 50%);
  outline: 2px solid transparent;
  cursor: pointer;
}
.quick-view .color-btn.active {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.qv-color-swatch { position: relative; padding: 0; cursor: pointer; }
.qv-color-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  background: #171717;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.qv-color-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 4px solid transparent;
  border-top-color: #171717;
  transform: translateX(-50%);
}
[data-color-name].is-name-visible .qv-color-bubble,
[data-color-name]:focus-visible .qv-color-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (hover: hover) and (pointer: fine) {
  [data-color-name]:hover .qv-color-bubble {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
@media (max-width: 768px) {
  .quick-view {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .quick-view__dialog,
  .quick-view__dialog:has(.quick-view__grid--matrix) {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding: max(0.85rem, env(safe-area-inset-top, 0px))
             max(1rem, env(safe-area-inset-right, 0px))
             max(1rem, env(safe-area-inset-bottom, 0px))
             max(1rem, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  .quick-view__close {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    z-index: 50051;
    width: 2.5rem;
    height: 2.5rem;
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  }
  .quick-view__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .quick-view__grid--matrix { grid-template-columns: 1fr; }
  .quick-view__grid--matrix .quick-view__media { max-height: 38vh; }
  .quick-view__media { max-height: 42vh; aspect-ratio: auto; }
  .quick-view__color-hint { display: flex; }
  /* Solo swatch: el nombre va en #qvActiveColor (evita solape con talles) */
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__color-name,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__color-name {
    display: none !important;
  }
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__color-head,
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__corner,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__color-head,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__corner {
    width: 2.35rem !important;
    min-width: 2.35rem !important;
    max-width: 2.35rem !important;
    padding: 0.3rem 0.1rem !important;
    text-align: center !important;
    white-space: normal;
    box-sizing: border-box;
  }
  #quickViewModal .wm-matrix__corner,
  .quick-view .wm-matrix__corner {
    font-size: 0.55rem;
    line-height: 1.15;
  }
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__swatch,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__swatch {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0 auto;
  }
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__swatch.is-active-row,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__swatch.is-active-row {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  /* Talleres fluidos: llenan el ancho; si hay muchos, min-width + scroll */
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__size-head,
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__cell,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__size-head,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__cell {
    width: auto !important;
    min-width: 2.4rem !important;
    max-width: none !important;
    box-sizing: border-box;
    padding: 0 !important;
  }
  #quickViewModal .wm-matrix--sizes-cols .wm-matrix__size-head,
  .quick-view .wm-matrix--sizes-cols .wm-matrix__size-head {
    font-size: 0.68rem;
    font-weight: 700;
  }
  /* Evitar zoom iOS al foco (font < 16px) */
  #quickViewModal .wm-matrix__input,
  .quick-view .wm-matrix__input {
    font-size: 16px !important;
    line-height: 1.1;
    min-height: 2.4rem;
    padding: 0.3rem 0;
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }
  #quickViewModal .quick-view__matrix.wm-matrix-wrap,
  .quick-view .wm-matrix-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  #quickViewModal .wm-matrix,
  .quick-view .wm-matrix {
    table-layout: fixed;
    width: max(100%, calc(2.35rem + (var(--qv-size-cols, 6) * 2.4rem)));
    min-width: 0;
    border-collapse: collapse;
  }
  #quickViewModal .wm-matrix .qv-color-bubble {
    display: none !important;
  }
  .quick-view__matrix-shell.has-more-right::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.75rem;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 70%);
  }
  .quick-view__matrix-more {
    position: absolute;
    right: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .quick-view__matrix-more[hidden] {
    display: none !important;
  }
}

/* Grilla de productos */
.product-grid { display: grid; gap: 1.5rem; }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--color-primary); color: rgba(255,255,255,0.45);
  padding: 4rem 0 0;
}
.footer__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
}
.footer__logos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: var(--fw-display); color: white;
  text-decoration: none; display: inline-block; margin: 0;
}
.footer__logo-img {
  display: block;
  width: auto;
  height: auto;
  max-height: 44px;
  max-width: min(180px, 70%);
}
.footer__logo--moka {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
}
.footer__logo span { color: var(--color-accent); }
.footer__brand p { font-size: 0.8rem; line-height: 1.6; margin-top: 0.4rem; }
.footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}
.footer__contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.footer__col h4 {
  font-size: var(--fs-subheading, 15px); font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 1rem;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 0.5rem; }
.footer__col a, .footer__col span {
  font-size: var(--fs-nav, 13px); color: rgba(255,255,255,0.35);
  text-decoration: none; transition: color 0.2s;
}
.footer__col a:hover { color: var(--color-accent); }
.footer__bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem;
}
.footer__bottom p { font-size: 0.75rem; }
.footer__bottom a { color: var(--color-accent); text-decoration: none; }

/* ── Formularios ────────────────────────────────────────────── */
.form-group    { margin-bottom: 1.25rem; }
.form-label    { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 0.4rem; }
.form-control  {
  width: 100%; padding: 0.65rem 0.9rem;
  font-size: 0.9rem; font-family: var(--font-body);
  border: 1px solid var(--color-rule); border-radius: var(--radius-sm);
  background: white; color: var(--color-primary);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13,13,13,0.06);
}
.form-control.is-invalid {
  border-color: #C2410C;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}
.form-error  { font-size: 0.75rem; color: #B45309; margin-top: 0.3rem; }
.form-error[hidden] { display: none !important; }
.form-hint   { font-size: 0.75rem; color: var(--color-mid); margin-top: 0.3rem; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6560' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.5rem; }

/* Password show/hide */
.input-password { position: relative; }
.input-password .form-control { padding-right: 2.5rem; }
.input-password__toggle {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; padding: 0; border: 0; background: transparent;
  color: var(--color-mid); line-height: 1;
  cursor: pointer; border-radius: var(--radius-sm);
}
.input-password__toggle:hover { color: var(--color-primary); }
.input-password__toggle:focus-visible {
  outline: 2px solid var(--color-primary); outline-offset: 1px;
}
.input-password__icon { display: block; flex-shrink: 0; pointer-events: none; }
.input-password__icon--hide { display: none !important; }
.input-password__toggle.is-revealed .input-password__icon--show { display: none !important; }
.input-password__toggle.is-revealed .input-password__icon--hide { display: block !important; }

/* ── Paginación ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.35rem; align-items: center; justify-content: center; margin-top: 3rem; }
.pagination__item {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 0.83rem; border: 1px solid var(--color-rule); color: var(--color-mid);
  text-decoration: none; transition: all 0.15s;
}
.pagination__item:hover   { border-color: var(--color-primary); color: var(--color-primary); }
.pagination__item--active { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.pagination__item--dots   { border: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .product-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .footer__inner   { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .navbar__inner {
    padding: 0 1rem;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0.5rem;
    min-width: 0;
  }
  .navbar__logo { font-size: 1.35rem; min-width: 0; }
  .navbar__actions {
    gap: 0.15rem;
    margin-left: auto;
  }
  .navbar__link-plain,
  .navbar__cta { display: none !important; }
  .user-menu__name { display: none; }
  .lang-switcher__btn span:not(:first-child) { display: none; }
  .navbar__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: white; flex-direction: column; align-items: flex-start;
    padding: 1.5rem 1.25rem; gap: 0;
    transform: translateX(-100%); transition: transform 0.3s;
    overflow-y: auto;
    z-index: 999;
    pointer-events: none;
  }
  .navbar__links.navbar__links--open { transform: none; pointer-events: auto; }
  .navbar__links a { font-size: var(--fs-nav, 13px); padding: 0.75rem 0; border-bottom: 1px solid var(--color-rule); width: 100%; }
  .navbar__mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-rule);
  }
  .navbar__mobile-auth-link {
    font-family: var(--font-nav, var(--font-body));
    font-size: var(--fs-nav, 13px);
    font-weight: var(--fw-nav, 500);
    color: var(--color-mid);
    text-decoration: none;
  }
  .navbar__mobile-auth-cta {
    display: block;
    text-align: center;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.85rem 1rem;
    font-family: var(--font-nav, var(--font-body));
    font-size: var(--fs-nav, 13px);
    font-weight: var(--fw-nav, 600);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
  }
  .navbar__mobile-auth .logout-form { margin: 0; width: 100%; }
  .navbar__mobile-logout {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
  }
  .navbar__hamburger { display: flex; }
  .user-menu.open { z-index: 1002; }
  .user-menu.open .user-menu__dropdown,
  .lang-switcher.open .lang-switcher__dropdown {
    position: fixed;
    top: calc(var(--nav-h) + 4px);
    right: 1rem;
    left: auto;
    min-width: 200px;
  }
  .search-bar { padding: 0.875rem 1rem; }
  .product-grid--4, .product-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.35rem;
    padding: 0 1.25rem;
  }
  .footer__brand {
    grid-column: auto;
    order: 1;
  }
  .footer__col--wholesale { order: 2; }
  .footer__col--categories { order: 3; }
  .footer__col--contact { order: 4; }
  .footer__brand p { display: none; }
  .footer__logo-img {
    max-height: 44px;
    max-width: min(140px, 90%);
  }
  .footer__logo--moka {
    min-height: 44px;
    font-size: 1.75rem;
  }
  .footer__bottom  { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .product-grid--4, .product-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* ── Mi cuenta ──────────────────────────────────────────────── */
.account-page { padding: 2.5rem 0 5rem; }
.account-container--narrow { max-width: 720px; }

.account-breadcrumb {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--color-mid);
  margin-bottom: 1.75rem;
}
.account-breadcrumb a {
  color: var(--color-mid); text-decoration: none; transition: color 0.15s;
}
.account-breadcrumb a:hover { color: var(--color-primary); }
.account-breadcrumb span { opacity: 0.45; }

.account-page-header { margin-bottom: 2rem; }
.account-page-header__row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.account-page-header__title {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: var(--fw-display);
  line-height: 1.2; margin-bottom: 0.35rem;
}
.account-page-header__sub { font-size: 0.85rem; color: var(--color-mid); }

.account-header {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  margin-bottom: 2.5rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-rule);
}
.account-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.account-header__actions .logout-form { margin: 0; }
.account-logout-btn {
  cursor: pointer;
}
@media (max-width: 768px) {
  .account-header__actions {
    width: 100%;
    margin-left: 0;
  }
  .account-header__actions .account-logout-btn,
  .account-header__actions .logout-form {
    width: 100%;
  }
  .account-header__actions .account-logout-btn {
    justify-content: center;
  }
}
.account-portal-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.15rem; margin: -1rem 0 1.75rem;
  background: linear-gradient(135deg, rgba(13,13,13,.04), rgba(184,115,51,.08));
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
}
.account-portal-banner strong {
  display: block; font-size: .9rem; margin-bottom: .2rem;
}
.account-portal-banner p {
  margin: 0; font-size: .8rem; color: var(--color-mid); line-height: 1.45;
}
.account-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-family: var(--font-display); font-size: 1.8rem; font-weight: var(--fw-display);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-header__name  { font-family: var(--font-display); font-size: 1.5rem; font-weight: var(--fw-display); }
.account-header__email { font-size: 0.85rem; color: var(--color-mid); margin-top: 0.15rem; }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.account-section {
  background: white; border: 1px solid var(--color-rule);
  border-radius: var(--radius-md); padding: 1.5rem;
}
.account-section__title {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-mid); margin-bottom: 1rem;
}
.account-section__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.account-section__head .account-section__title { margin-bottom: 0; }
.account-section__link { font-size: 0.78rem; color: var(--color-accent); text-decoration: none; }
.account-section__link:hover { text-decoration: underline; }

.account-order-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--color-rule);
  text-decoration: none; color: var(--color-primary); transition: color 0.15s;
}
.account-order-item:last-child { border-bottom: none; }
.account-order-item:hover { color: var(--color-accent); }
.account-order-item__number { font-family: monospace; font-size: 0.82rem; font-weight: 600; }
.account-order-item__date   { font-size: 0.72rem; color: var(--color-mid); margin-top: 0.1rem; }
.account-order-item__total  { margin-left: auto; font-weight: 600; font-size: 0.85rem; }

.account-empty {
  text-align: center; padding: 4rem 2rem;
  background: white; border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
}
.account-empty__icon {
  width: 56px; height: 56px; margin: 0 auto 1.25rem;
  border-radius: 50%; background: var(--color-light-bg, #f5f3f0);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-mid);
}
.account-empty__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.account-empty__text  { font-size: 0.88rem; color: var(--color-mid); margin-bottom: 1.5rem; line-height: 1.5; }

/* Lista de pedidos */
.order-list { display: flex; flex-direction: column; gap: 0.75rem; }

.order-list-card {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 1rem 1.25rem;
  padding: 1.15rem 1.35rem;
  background: white; border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-primary);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.order-list-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.order-list-card__main { min-width: 0; }
.order-list-card__top {
  display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.order-list-card__number {
  font-family: ui-monospace, monospace; font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.02em;
}
.order-list-card__meta {
  font-size: 0.78rem; color: var(--color-mid); line-height: 1.45;
}
.order-list-card__channel {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--color-mid); background: var(--color-light-bg, #f5f3f0);
  padding: 0.15rem 0.45rem; border-radius: 4px; margin-left: 0.25rem;
}
.order-list-card__channel--wholesale {
  color: var(--color-accent); background: rgba(184, 115, 51, 0.1);
}
.order-list-card__aside {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
.order-list-card__total { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.order-list-card__chevron { color: var(--color-mid); flex-shrink: 0; opacity: 0.5; }
.order-list-card:hover .order-list-card__chevron { opacity: 1; color: var(--color-primary); }

.account-pagination { margin-top: 2.5rem; }

/* Badges de estado (frontend) */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.55rem; border-radius: 20px;
  font-size: 0.68rem; font-weight: 600; white-space: nowrap; line-height: 1.3;
}
.badge--pending        { background: #FEF3C7; color: #92400E; }
.badge--approved       { background: #DBEAFE; color: #1E40AF; }
.badge--payment_review { background: #EDE9FE; color: #5B21B6; }
.badge--partially_paid { background: #FEF3C7; color: #92400E; }
.badge--paid           { background: #D1FAE5; color: #065F46; }
.badge--preparing      { background: #E0F2FE; color: #0C4A6E; }
.badge--dispatched     { background: #D1FAE5; color: #047857; }
.badge--delivered      { background: #ECFDF5; color: #14532D; }
.badge--cancelled,
.badge--rejected       { background: #FEE2E2; color: #991B1B; }

@media (max-width: 768px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-page { padding: 1.75rem 0 3.5rem; }
  .account-page-header__title { font-size: 1.45rem; }
  .order-list-card {
    grid-template-columns: 1fr auto;
    padding: 1rem 1.15rem; gap: 0.75rem;
  }
  .order-list-card__aside { grid-column: 2; grid-row: 1 / 3; align-self: center; flex-direction: column; gap: 0.35rem; }
  .order-list-card__chevron { display: none; }
  .order-list-card__total { font-size: 0.88rem; }
}

/* ── Plantilla Milku Jeans Oficial (manual de marca) ── */
[data-design-template="milku-brand"] {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

[data-design-template="milku-brand"] .navbar__logo-img {
  height: var(--logo-height, 38px);
}

[data-design-template="milku-brand"] .navbar__links a {
  letter-spacing: 0.12em;
}

[data-design-template="milku-brand"] .navbar__cta,
[data-design-template="milku-brand"] .btn,
[data-design-template="milku-brand"] .btn-primary {
  border-radius: 999px;
  letter-spacing: 0.08em;
}

[data-design-template="milku-brand"] .section-eyebrow,
[data-design-template="milku-brand"] .hero__eyebrow {
  letter-spacing: 0.18em;
  color: var(--color-accent);
}

/* ── Ancho del sitio (Apariencia → layout_width) ─────────────── */
@media (min-width: 1400px) {
  [data-layout-width="extra"] .product-grid--4 {
    grid-template-columns: repeat(5, 1fr);
  }
  [data-layout-width="extra"] .page-catalog .catalog-grid.product-grid--3 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Animación agregar al carrito ────────────────────────────── */
.milku-cart-flyer {
  position: fixed;
  z-index: 40000;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary, #111);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.milku-cart-flyer svg {
  width: 18px;
  height: 18px;
}
.milku-cart-toast {
  position: fixed;
  z-index: 40001;
  padding: 0.4rem 0.7rem;
  background: var(--color-primary, #111);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}
.milku-cart-toast.is-in { opacity: 1; }
.milku-cart--pulse {
  animation: milkuCartPulse 0.55s ease;
}
.milku-cart--pulse::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  pointer-events: none;
  animation: milkuCartRing 0.55s ease forwards;
}
.iso-head__cart.milku-cart--pulse .iso-head__badge,
.iso-tabnav__cart.milku-cart--pulse .iso-head__badge,
.navbar__cart.milku-cart--pulse .navbar__cart-badge {
  animation: milkuBadgePop 0.45s ease;
}
@keyframes milkuCartPulse {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.18); }
}
@keyframes milkuCartRing {
  0% { opacity: 0.7; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.35); }
}
@keyframes milkuBadgePop {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.28); }
}
.navbar__cart.milku-cart--pulse .navbar__cart-badge {
  animation-name: milkuBadgePop;
}
@media (prefers-reduced-motion: reduce) {
  .milku-cart-flyer { display: none; }
  .milku-cart--pulse,
  .milku-cart--pulse::after,
  .iso-head__cart.milku-cart--pulse .iso-head__badge,
  .iso-tabnav__cart.milku-cart--pulse .iso-head__badge,
  .navbar__cart.milku-cart--pulse .navbar__cart-badge {
    animation: none;
  }
}
