/* ── Reset / Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:   #0f766e;
  --color-primary-d: #0b5f59;
  --color-accent:    #0f766e;
  --color-bg:        #f6f8f7;
  --color-surface:   #ffffff;
  --color-featured-card:#e7f8f1;
  --color-text:      #172033;
  --color-muted:     #667085;
  --color-border:    #dde5e2;
  --color-danger:    #b42318;
  --color-success-bg:#e7f5f2;
  --color-primary-soft:#e7f5f2;
  --color-info:      #345e73;
  --color-info-soft: #edf4f7;
  --color-warning:   #8a5a00;
  --color-warning-soft:#fff7e6;
  --focus-ring:      0 0 0 3px rgba(15, 118, 110, .16);
  --radius:          12px;
  --shadow:          0 2px 12px rgba(17, 24, 39, .07);
  --transition:      .2s ease;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100dvh;
}

.hidden { display: none !important; }

.marketing-optin {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-top: .7rem;
  color: var(--color-muted);
  font-size: .86rem;
  line-height: 1.35;
}

.marketing-optin input {
  margin-top: .15rem;
  accent-color: var(--color-primary);
}

.delivery-address-grid {
  display: grid;
  grid-template-columns: 1.4fr .75fr .6fr .6fr;
  gap: .65rem;
}

.delivery-address-grid__street,
.delivery-address-grid .form-group:nth-of-type(5),
.delivery-address-grid .form-group:nth-of-type(6) {
  grid-column: span 2;
}

@media (max-width: 620px) {
  .delivery-address-grid {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-address-grid__street,
  .delivery-address-grid .form-group:nth-of-type(5),
  .delivery-address-grid .form-group:nth-of-type(6) {
    grid-column: 1 / -1;
  }
}

@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .sticky-wrap,
  .categories-bar,
  .cart,
  .cart-btn,
  .overlay,
  .toast,
  .platform-watermark,
  .product-admin-controls,
  .admin-indicator,
  .header__admin,
  #backToTop,
  .promo-banner,
  .demo-tour {
    display: none !important;
  }

  .store-banner {
    height: 32mm !important;
    display: block !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .catalog {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 6mm 0 0 !important;
  }

  .catalog__grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5mm !important;
  }

  .product-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #d0d5dd !important;
  }

  .product-card__img,
  .product-card img {
    max-height: 38mm !important;
    object-fit: cover !important;
  }

  .btn-add,
  .product-card button {
    display: none !important;
  }
}

.auth-brand-logo {
  display: block;
  width: min(240px, 72%);
  height: auto;
  margin: 0 auto 1rem;
}

/* ── Sticky wrap (header + categorías fijos juntos) ─────────────────────── */
.sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  width: 100%;
  max-width: 100vw;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
/* ── Store banner (imagen de portada del negocio) ───────────────────────── */
.store-banner {
  display: none;
  width: 100%;
  height: 180px;
  background-color: var(--color-border);
  background-image: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.store-banner.has-image {
  display: block;
}

.store-banner__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.store-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
}

.store-info {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.store-info__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .8rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .7rem;
}

.store-info__item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-width: 0;
  padding: .65rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
}

.store-info__icon {
  line-height: 1.35;
  flex-shrink: 0;
}

.store-info__label {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: .12rem;
}

.store-info__value,
.store-info__value a {
  color: var(--color-text);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.store-info__value a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.store-info__item--social {
  align-items: center;
}

.store-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .2rem;
}

.store-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef2f7;
  color: #172033;
  font-size: .82rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.store-social-link:hover,
.store-social-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
  outline: none;
  text-decoration: none;
}

.store-social-link--instagram {
  background: linear-gradient(135deg, #f97316, #db2777 48%, #7c3aed);
  color: #fff;
}

.store-social-link--facebook {
  background: #1877f2;
  color: #fff;
}

.store-social-link--tiktok {
  background: #111827;
  color: #fff;
}

.store-social-link--youtube {
  background: #ff0033;
  color: #fff;
}

.store-social-link--x {
  background: #000;
  color: #fff;
}

.store-social-link--website {
  background: #0f8f72;
  color: #fff;
}

@media (max-width: 600px) {
  .store-banner { height: 130px; }
  .store-info__inner {
    grid-template-columns: 1fr;
    padding: .65rem .75rem;
  }
}

@media (max-width: 900px) {
  .store-banner {
    height: auto;
    background: #dff7ea;
  }

  .store-banner__image {
    height: auto;
    object-fit: contain;
  }

  .store-banner__overlay {
    display: none;
  }
}

.header {
  position: relative;
  z-index: 5;
  overflow-x: clip;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  overflow-x: clip;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-accent);
}

.store-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
}

.platform-watermark {
  max-width: 1200px;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: none;
}

.platform-watermark a {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-muted);
  font-size: .78rem;
  text-decoration: none;
  opacity: .72;
  transition: opacity var(--transition), color var(--transition);
}

.platform-watermark img {
  width: 22px;
  height: 22px;
  display: block;
}

.platform-watermark a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.header__search {
  flex: 1;
  position: relative;
}

.header__search input {
  width: 100%;
  padding: .5rem 2.2rem .5rem .875rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition);
  background: var(--color-bg);
}

.header__search input:focus {
  border-color: var(--color-primary);
}

.store-lang-switcher {
  flex-shrink: 0;
  min-width: 0;
}

.store-lang-switcher label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-muted);
}

.store-lang-switcher select {
  min-height: 34px;
  padding: .35rem .55rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: .78rem;
}

@media (max-width: 720px) {
  .header__inner {
    flex-wrap: wrap;
    gap: .6rem;
  }

  .header__search {
    order: 5;
    flex-basis: 100%;
  }

  .store-lang-switcher label > span {
    display: none;
  }
}

.search-clear {
  position: absolute;
  right: .6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #999;
  padding: .2rem .4rem;
  border-radius: 50%;
  transition: color .15s, background .15s;
}
.search-clear:hover {
  color: #333;
  background: rgba(0,0,0,.07);
}

/* ── Cart button ─────────────────────────────────────────────────────────── */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: .4rem;
  border-radius: 8px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.cart-btn:hover { background: var(--color-bg); }

.cart-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-danger);
  color: #fff;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

/* ── Favorite store shortcut ─────────────────────────────────────────────── */
.favorite-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 40px;
  padding: .48rem .75rem;
  border: 1px solid rgba(15, 143, 114, 0.25);
  border-radius: 999px;
  background: #e7f8f1;
  color: #08705a;
  box-shadow: 0 8px 18px rgba(8, 112, 90, 0.11);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.favorite-store-btn:hover,
.favorite-store-btn:focus-visible {
  background: #d8f3e9;
  color: #065846;
  box-shadow: 0 10px 24px rgba(8, 112, 90, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.favorite-store-btn__icon::before {
  content: "📲";
}

.favorite-store-modal[hidden] {
  display: none;
}

.favorite-store-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.favorite-store-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
}

.favorite-store-modal__card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(86dvh, 680px);
  overflow: auto;
  border: 1px solid rgba(15, 143, 114, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
  padding: 1.15rem;
}

.favorite-store-modal__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 10px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.favorite-store-modal__kicker {
  margin: 0 2.5rem .3rem 0;
  color: #08705a;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.favorite-store-modal h2 {
  margin: 0 2.5rem .45rem 0;
  color: #172033;
  font-size: 1.35rem;
  line-height: 1.18;
}

.favorite-store-modal p {
  margin: 0;
}

.favorite-store-modal__primary {
  width: 100%;
  margin-top: .9rem;
  border: 0;
  border-radius: 12px;
  background: #13c46b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: .78rem 1rem;
}

.favorite-store-modal__steps {
  display: grid;
  gap: .65rem;
  margin-top: .95rem;
}

.favorite-store-modal__step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: .75rem;
  align-items: start;
  padding: .78rem;
  border: 1px solid rgba(15, 143, 114, .14);
  border-radius: 12px;
  background: #f7fffb;
}

.favorite-store-modal__step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e7f8f1;
  color: #08705a;
  font-weight: 900;
}

.featured-products {
  max-width: 1200px;
  margin: .85rem auto 1.65rem;
  padding: 0 1rem;
}

.featured-products__inner {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  padding: .85rem;
}

.featured-products__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .7rem;
}

.featured-products__head strong {
  color: var(--color-text);
  font-size: 1rem;
}

.featured-products__head span {
  color: var(--color-muted);
  font-size: .82rem;
}

.featured-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .65rem;
}

.featured-product {
  min-height: 88px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-featured-card);
  color: var(--color-text);
  padding: .75rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.featured-product:hover,
.featured-product:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
  outline: none;
}

.featured-product__name {
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.25;
}

.featured-product__meta {
  color: var(--color-muted);
  font-size: .75rem;
  line-height: 1.25;
}

.featured-product strong {
  color: var(--color-primary);
  margin-top: auto;
  font-size: .95rem;
}

.favorite-store-modal__step strong {
  display: block;
  margin-bottom: .15rem;
  color: #172033;
}

.favorite-store-modal__step span {
  color: #667085;
  font-size: .9rem;
  line-height: 1.35;
}

.favorite-store-modal__hint {
  margin-top: .85rem;
  color: #667085;
  font-size: .86rem;
  line-height: 1.35;
}

/* ── Header admin link ───────────────────────────────────────────────────── */
.header__admin {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(15, 143, 114, 0.22);
  border-radius: 12px;
  background: #e7f8f1;
  color: #08705a;
  box-shadow: 0 8px 20px rgba(8, 112, 90, 0.14);
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.header__admin.is-visible {
  display: flex;
}

.header__admin::before,
.header__admin-tooltip {
  position: absolute;
  left: 50%;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.header__admin::before {
  content: "";
  top: calc(100% + 5px);
  border: 6px solid transparent;
  border-bottom-color: #172033;
}

.header__admin-tooltip {
  top: calc(100% + 16px);
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #172033;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.header__admin:hover::before,
.header__admin:hover .header__admin-tooltip,
.header__admin:focus-visible::before,
.header__admin:focus-visible .header__admin-tooltip,
.header__admin:active::before,
.header__admin:active .header__admin-tooltip,
.header__admin.show-tooltip::before,
.header__admin.show-tooltip .header__admin-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.header__admin svg {
  width: 23px;
  height: 23px;
}

.header__admin:hover {
  background: #d8f3e9;
  color: #065846;
  box-shadow: 0 10px 24px rgba(8, 112, 90, 0.18);
  transform: translateY(-1px);
}

/* ── Categorías ──────────────────────────────────────────────────────────── */
.categories-bar {
  position: relative;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  background: var(--color-surface);
  max-width: 100%;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.category-menu-btn,
.categories-drawer-head,
.category-drawer-overlay {
  display: none;
}

.categories-bar::before,
.categories-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  pointer-events: none;
  z-index: 2;
}

.categories-bar::before {
  left: 38px;
  background: linear-gradient(90deg, var(--color-surface), rgba(255, 255, 255, 0));
}

.categories-bar::after {
  right: 44px;
  background: linear-gradient(270deg, var(--color-surface), rgba(255, 255, 255, 0));
}

.categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: .55rem .8rem;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scroll-padding-inline: .8rem;
  touch-action: pan-x;
}

.categories::-webkit-scrollbar { display: none; }

.cat-scroll-btn {
  flex: 0 0 38px;
  border: none;
  background: linear-gradient(90deg, var(--color-surface), rgba(255, 255, 255, .92));
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-border);
  transition: background var(--transition), color var(--transition), opacity var(--transition);
  position: relative;
  z-index: 3;
}

.cat-scroll-btn--right {
  border-right: 0;
  border-left: 1px solid var(--color-border);
  background: linear-gradient(270deg, var(--color-surface), rgba(255, 255, 255, .92));
}

.cat-scroll-btn:hover:not(:disabled) {
  background: var(--color-bg);
  color: var(--color-accent);
}

.cat-scroll-btn:disabled {
  opacity: .32;
  cursor: default;
}

.view-toggle-btn {
  width: 100%;
  min-height: 38px;
  padding: .45rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  cursor: pointer;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.view-toggle-btn:hover { background: var(--color-bg); color: var(--color-text); }
.view-toggle-btn.is-list { color: var(--color-primary); }

.cat-pill {
  flex: 0 0 auto;
  padding: .46rem .9rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  color: var(--color-text);
  scroll-snap-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cat-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-accent);
}

.cat-pill--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

@media (max-width: 900px) {
  .categories-bar {
    box-shadow: none;
    gap: .4rem;
    padding: .45rem .75rem .55rem;
    align-items: center;
    overflow: visible;
    background: rgba(255, 247, 237, .8);
    border-top: 1px solid rgba(251, 146, 60, .22);
    border-bottom: 1px solid rgba(251, 146, 60, .22);
  }

  .categories-bar::before,
  .categories-bar::after {
    display: none;
  }

  .category-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    min-height: 40px;
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(251, 146, 60, .34);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    font-size: .84rem;
    font-weight: 900;
    cursor: pointer;
  }

  .categories {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1220;
    width: min(82vw, 320px);
    max-width: calc(100vw - 48px);
    margin: 0;
    padding: 0 1rem 1rem;
    display: grid;
    align-content: start;
    gap: .45rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    box-shadow: 18px 0 40px rgba(15, 23, 42, .24);
    transform: translateX(-104%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .22s ease, visibility .22s ease;
    scroll-snap-type: none;
    touch-action: pan-y;
  }

  body.category-drawer-open {
    overflow: hidden;
  }

  body.category-drawer-open .categories {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .categories-drawer-head {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 -1rem .35rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .categories-drawer-head strong {
    color: var(--color-text);
    font-size: 1rem;
  }

  .categories-drawer-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
  }

  .category-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1210;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, .48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.category-drawer-open .category-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .cat-scroll-btn {
    display: none;
  }

  .cat-pill {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: .72rem .85rem;
    border-radius: 10px;
    font-size: .9rem;
    text-align: left;
    scroll-snap-align: none;
  }
}

/* ── Vista de tarjetas de categoría ─────────────────────────────────────── */
.cat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem 0 2rem;
}

.cat-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  user-select: none;
}

.cat-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.cat-card--inactive {
  opacity: .78;
  background: #fffafa;
  border-color: #fca5a5;
}

.cat-card__name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.cat-card__count {
  font-size: .8rem;
  color: var(--color-muted);
}

.cat-card__admin {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--color-border);
}

.cat-card__status {
  display: block;
  padding: .45rem .55rem;
  border-radius: 6px;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.25;
}

.cat-card__status.is-active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.cat-card__status.is-inactive {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.cat-card__status.is-mixed {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.cat-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  width: 100%;
  min-width: 0;
}

.cat-card__admin-btn {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: .35rem .32rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-card__admin-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #f8fafc;
}

.cat-card__admin-btn--on {
  border-color: #16a34a;
  color: #166534;
}

.cat-card__admin-btn--off {
  border-color: #dc2626;
  color: #991b1b;
}

.cat-card__admin-btn--rename {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cat-card__admin-btn:hover {
  background: var(--color-bg);
}

/* ── Catalog grid ────────────────────────────────────────────────────────── */
.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ── Modo lista (sin imágenes) ──────────────────────────────────────────── */
.catalog__grid.view-list {
  grid-template-columns: 1fr;
  gap: .45rem;
}
.catalog__grid.view-list .product-card {
  flex-direction: row;
  align-items: center;
}
.catalog__grid.view-list .product-image-gallery,
.catalog__grid.view-list .product-card__img,
.catalog__grid.view-list .product-card__img--placeholder {
  display: none;
}
.catalog__grid.view-list .product-card__body {
  padding: .5rem .875rem;
  gap: .15rem;
}
.catalog__grid.view-list .product-card__desc {
  display: none;
}
.catalog__grid.view-list .product-card__prices {
  flex-direction: row;
  gap: .75rem;
  flex-wrap: wrap;
}
.catalog__grid.view-list .product-card__actions {
  flex-direction: column;
  padding: .5rem .875rem .5rem 0;
  gap: .3rem;
  margin-top: 0;
  flex-shrink: 0;
}

/* ── Cat cards en modo lista ──────────────────────────────────── */
.cat-card-grid.view-list {
  grid-template-columns: 1fr;
  gap: .4rem;
  padding: 1rem 0 1.5rem;
}
.cat-card-grid.view-list .cat-card {
  flex-direction: row;
  padding: .65rem 1rem;
  gap: .75rem;
  text-align: left;
  justify-content: flex-start;
  transform: none !important;
}
.cat-card-grid.view-list .cat-card__count { margin-left: auto; }
.cat-card-grid.view-list .cat-card__admin {
  width: auto;
  min-width: 280px;
  margin-left: .5rem;
  padding-top: 0;
  padding-left: .75rem;
  border-top: 0;
  border-left: 1px solid var(--color-border);
}
.cat-card-grid.view-list .cat-card__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog__empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-muted);
  font-size: 1.1rem;
}

/* ── Skeleton ────────────────────────────────────────────────────────────── */
.catalog__skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.skeleton-card {
  height: 280px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Product Card ────────────────────────────────────────────────────────── */
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-bg);
}

.product-image-gallery {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-bg);
}

.product-image-gallery .product-card__img {
  display: block;
  height: 100%;
}

.product-image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
}

.product-image-nav--prev {
  left: .45rem;
}

.product-image-nav--next {
  right: .45rem;
}

.product-image-count {
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}

.product-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  aspect-ratio: 1;
  background: var(--color-bg);
}

.product-card__body {
  padding: .875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.product-card__name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}

.product-card__desc {
  font-size: .78rem;
  color: var(--color-muted);
  line-height: 1.4;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__desc:hover,
.product-card__desc:focus-visible {
  color: var(--color-accent);
  text-decoration: underline;
  outline: none;
}

.product-card__cat {
  font-size: .75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Precios ──────────────────────────────────────────────────────── */
.product-card__prices {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-top: auto;
  padding-top: .5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem;
}

.price-row__label {
  font-size: .75rem;
  white-space: nowrap;
}

.price-row--unit .price-row__label  { color: var(--color-muted); }
.price-row--unit .price-row__value  {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
}

.price-row--bulk .price-row__label  {
  color: #0e6b61;
  font-weight: 600;
}
.price-row--bulk .price-row__value  {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0e6b61;
}

/* ── (obsolete, kept for safety) ── */
.product-card__price { display: none; }
.product-card__bulk  { display: none; }

.product-card__stock {
  font-size: .75rem;
}

.product-card__stock--ok   { color: #16a34a; }
.product-card__stock--low  { color: #d97706; }
.product-card__stock--none { color: var(--color-danger); }

.product-size-select {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-muted);
}

.product-variant-row {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.product-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.product-variant-option {
  min-height: 28px;
  padding: .3rem .55rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.1;
}

.product-variant-option.is-selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.product-variant-option:disabled {
  cursor: not-allowed;
  opacity: .36;
  text-decoration: line-through;
}

.product-variant-option small {
  font-size: .62rem;
  font-weight: 600;
  margin-top: .12rem;
  opacity: .85;
}

.product-variant-hint {
  min-height: .78rem;
  color: #d97706;
  font-size: .66rem;
  font-weight: 700;
}

.product-card__actions {
  padding: .75rem .875rem;
  display: flex;
  gap: .5rem;
}

/* ── Product detail modal ───────────────────────────────────────────────── */
.product-detail-modal[hidden] {
  display: none;
}

.product-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.product-detail-modal__card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
}

.product-detail-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 2;
}

.product-detail-modal__close:hover {
  background: #fff;
}

.product-detail-card {
  display: flex;
  flex-direction: column;
}

.product-detail-card .product-image-gallery,
.product-detail-card .product-card__img,
.product-detail-card .product-card__img--placeholder {
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.product-detail-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.product-detail-card__desc {
  margin: .25rem 0 .4rem;
  color: var(--color-muted);
  font-size: .92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.product-detail-card .product-card__actions {
  padding: .25rem 0 0;
}

.btn-add {
  flex: 1;
  padding: .55rem .5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  line-height: 1.2;
}

.btn-add__price {
  font-size: .72rem;
  font-weight: 400;
  opacity: .85;
}

.btn-add:hover:not(:disabled) { background: var(--color-primary-d); }

.btn-add:disabled {
  background: var(--color-border);
  color: var(--color-muted);
  cursor: not-allowed;
}

.btn-add--bulk {
  background: #16897a;
  flex: 1;
  font-size: .8rem;
}

.btn-add--bulk:hover:not(:disabled) { background: #0e6b61; }

/* ── Cart drawer ─────────────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  backdrop-filter: blur(2px);
}

.overlay.active { display: block; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(420px, 100vw);
  background: var(--color-surface);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
}

.cart.open { display: flex; }

.cart.open ~ .demo-tour {
  display: none !important;
}

.cart__header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  z-index: 1;
}

.cart__header h2 { font-size: 1.1rem; }

.cart__close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-muted);
  padding: .25rem .5rem;
  border-radius: 6px;
  transition: background var(--transition);
}

.cart__close:hover { background: var(--color-bg); }

.cart__list {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: .75rem 1.25rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.cart__empty {
  flex: 0 0 auto;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 1rem;
}

/* ── Cart item ───────────────────────────────────────────────────────────── */
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: .3rem .75rem;
  padding: .75rem;
  background: var(--color-bg);
  border-radius: 10px;
}

.cart-item__top {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.cart-item__name {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
}

.cart-item__badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .18rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cart-item__badge--unit {
  background: #dbeafe;
  color: #1d4ed8;
}

.cart-item__badge--bulk {
  background: #d1fae5;
  color: #065f46;
}

.cart-item__bottom {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: baseline;
  gap: .75rem;
}

.cart-item__price-unit {
  font-size: .75rem;
  color: var(--color-muted);
}

.cart-item__label {
  font-size: .72rem;
  color: var(--color-muted);
  grid-column: 1;
}

.cart-item__controls {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.qty-btn:hover { border-color: var(--color-primary); color: var(--color-accent); }

.qty-value {
  font-size: .9rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}

.cart-item__subtotal {
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* ── Cart footer ─────────────────────────────────────────────────────────── */
.cart__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex-shrink: 0;
}

.cart__discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  font-weight: 600;
  color: #1a7f1a;
  background: #eafaea;
  border: 1px solid #b6e8b6;
  border-radius: 6px;
  padding: .35rem .65rem;
}

.cart__discount.hidden { display: none; }

/* ── Banner de promo ──────────────────────────────────────────────────────── */
.promo-banner {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #fff3cd;
  border-bottom: 2px solid #f0ad4e;
  padding: .7rem 1rem;
  font-size: .93rem;
  font-weight: 600;
  color: #7a5200;
  position: sticky;
  top: 0;
  z-index: 90;
}

.promo-banner.hidden { display: none; }

.promo-banner--error {
  background: #fde8e8;
  border-bottom-color: #c00;
  color: #7a0000;
}
.promo-banner--error .promo-banner__close { color: #7a0000; }

.promo-banner__icon { font-size: 1.15rem; flex-shrink: 0; }

.promo-banner__close {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #7a5200;
  line-height: 1;
  padding: 0 .2rem;
}

.cart__total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.cart__total strong { font-size: 1.25rem; }

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-whatsapp:hover { background: var(--color-primary-d); }

.payment-link-panel {
  display: grid;
  gap: .55rem;
  padding: .85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-info-soft);
}

.payment-link-panel strong {
  color: var(--color-text);
  font-size: .92rem;
}

.payment-link-panel p {
  margin: .15rem 0 0;
  color: var(--color-muted);
  font-size: .82rem;
  line-height: 1.35;
}

.btn-payment-link,
.btn-payment-open {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn-payment-link:disabled {
  opacity: .7;
  cursor: wait;
}

.btn-payment-open {
  background: var(--color-primary);
}

.payment-link-panel__status {
  overflow-wrap: anywhere;
}

.btn-clear {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: .6rem;
  font-size: .85rem;
  cursor: pointer;
  color: var(--color-muted);
  transition: all var(--transition);
}

.btn-clear:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e;
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  font-size: .9rem;
  z-index: 500;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.demo-tour {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 350;
  width: min(820px, calc(100vw - 24px));
  transform: translateX(-50%);
  padding: .7rem 2.6rem .7rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.demo-tour__content {
  display: flex;
  gap: .75rem;
  align-items: center;
  position: relative;
}

.demo-tour__text {
  min-width: 0;
  flex: 1 1 auto;
}

.demo-tour strong {
  display: block;
  margin-bottom: .15rem;
  color: var(--color-text);
  font-size: .94rem;
  line-height: 1.15;
}

.demo-tour p {
  margin: 0;
  color: var(--color-muted);
  font-size: .84rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-tour__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: .4rem;
  justify-content: flex-end;
}

.demo-tour button,
.demo-tour a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: .4rem .6rem;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.demo-tour a {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.demo-tour__toggle {
  display: none;
}

.demo-tour__close {
  position: absolute;
  top: -.35rem;
  right: -2.15rem;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

@media (max-width: 640px) {
  .demo-tour {
    left: 50%;
    right: auto;
    bottom: .45rem;
    width: min(340px, calc(100vw - .75rem));
    transform: translateX(-50%);
    padding: .5rem 2.1rem .5rem .55rem;
    border-radius: 8px;
  }

  .demo-tour__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .4rem;
  }

  .demo-tour__text {
    display: block;
  }

  .demo-tour strong {
    margin-bottom: 0;
    font-size: .78rem;
  }

  .demo-tour p {
    font-size: .7rem;
    line-height: 1.2;
  }

  .demo-tour__toggle {
    display: none;
  }

  .demo-tour__close {
    top: -.1rem;
    right: -1.75rem;
    display: inline-flex;
    width: 26px;
    min-height: 26px;
  }

  .demo-tour__actions {
    display: flex;
    gap: .3rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: .1rem;
    scrollbar-width: none;
  }

  .demo-tour__actions::-webkit-scrollbar {
    display: none;
  }

  .demo-tour button,
  .demo-tour a {
    width: auto;
    min-width: max-content;
    min-height: 28px;
    padding: .32rem .45rem;
    font-size: .66rem;
  }
}

/* ── Customer form (datos del cliente en el carrito) ──────────────────────── */
.customer-form,
.payment-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .875rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
}

/* ── Delivery form ───────────────────────────────────────────────────────── */
.delivery-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .875rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
}

.delivery-form__title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.delivery-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}

.delivery-option {
  cursor: pointer;
}

.delivery-option input[type="radio"] {
  display: none;
}

.delivery-option__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .65rem .5rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  font-size: .83rem;
  text-align: center;
  transition: all var(--transition);
}

.delivery-option__icon {
  font-size: 1.5rem;
}

.delivery-option input[type="radio"]:checked + .delivery-option__box {
  border-color: var(--color-primary);
  background: #f0fdf4;
  color: var(--color-accent);
  font-weight: 600;
}

.pickup-location {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin-top: .75rem;
  padding: .75rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
}

.pickup-location.hidden {
  display: none;
}

.pickup-location__icon {
  line-height: 1.4;
}

.pickup-location__label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: .15rem;
}

.pickup-location a {
  color: var(--color-accent);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.pickup-location a:hover {
  text-decoration: underline;
}

/* Panel de envío a domicilio */
.delivery-panel {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  border-top: 1px solid var(--color-border);
  padding-top: .65rem;
  margin-top: .1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group input,
.form-group select {
  padding: .55rem .75rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: .9rem;
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-primary);
}

.form-group input.input-error,
.form-group select.input-error {
  border-color: var(--color-danger);
}

/* Aviso de costo de envío */
.delivery-notice {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: .6rem .75rem;
}

.delivery-notice__icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.delivery-notice p {
  font-size: .78rem;
  color: #92400e;
  line-height: 1.4;
}

/* Sugerencias Places (pac = Places AutoComplete) */
.pac-container {
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow);
  font-family: inherit;
  font-size: .9rem;
  overflow: hidden;
  z-index: 9999;
}

.pac-item {
  padding: .5rem .75rem;
  cursor: pointer;
}

.pac-item:hover { background: var(--color-bg); }

/* ── Password visibility toggle ─────────────────────────────────────────── */
.password-control {
  position: relative;
}

.password-control input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f2f4f7;
  color: #111827;
  outline: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sticky-wrap,
  .store-banner,
  .store-info,
  .header,
  .categories-bar,
  .catalog {
    width: 100%;
    max-width: 100%;
  }

  .cat-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    padding: .9rem 0 1.5rem;
  }

  .cat-card {
    min-height: 72px;
    justify-content: center;
    padding: .8rem .55rem;
    border-radius: 10px;
    gap: .22rem;
  }

  .cat-card__name {
    font-size: .76rem;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .cat-card__count {
    font-size: .68rem;
    line-height: 1.2;
  }

  .cat-card-grid.view-list {
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .cat-card-grid.view-list .cat-card {
    min-height: 56px;
    padding: .65rem .8rem;
  }

  .catalog__grid,
  .catalog__skeleton {
    grid-template-columns: 1fr;
  }

  .catalog {
    padding-inline: .75rem;
  }

  .product-card {
    width: 100%;
    max-width: 100%;
  }

  .product-card__img,
  .product-image-gallery,
  .product-card__img--placeholder {
    aspect-ratio: 4 / 3;
    max-height: min(260px, 58vw);
  }

  .product-card__img {
    object-fit: contain;
  }

  .header__logo { font-size: .9rem; }

  .header__inner {
    padding: .55rem .5rem;
    gap: .4rem;
  }

  .header__admin {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .favorite-store-btn,
  .cart-btn {
    width: 36px;
    height: 36px;
    padding: .3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .favorite-store-btn {
    min-height: 36px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .favorite-store-btn > span[data-i18n] {
    display: none;
  }

  .store-lang-switcher select {
    max-width: 78px;
    min-height: 32px;
    padding-inline: .45rem;
    font-size: .72rem;
  }
}

@media (max-width: 768px) {
  .cart__footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .header__inner {
    flex-wrap: wrap;
    gap: .75rem;
  }

  .header__logo {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__search {
    order: 10;
    flex: 1 1 100%;
  }

  .header__admin,
  .favorite-store-btn,
  .cart-btn {
    flex: 0 0 auto;
  }

  .admin-indicator {
    order: 9;
    width: 100%;
    margin-left: 0;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .4rem;
  }

  .admin-badge,
  .admin-toggle {
    max-width: 100%;
    white-space: nowrap;
  }
}

.catalog-actions-menu {
  position: relative;
  flex: 0 0 44px;
  z-index: 20;
  background: transparent;
}

.catalog-actions-menu__trigger {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  user-select: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.catalog-actions-menu__trigger::-webkit-details-marker {
  display: none;
}

.catalog-actions-menu[open] .catalog-actions-menu__trigger,
.catalog-actions-menu__trigger:hover {
  border-color: rgba(15, 143, 114, .32);
  background: #e7f5f2;
  color: var(--color-primary);
}

.catalog-actions-menu__panel {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  width: min(210px, calc(100vw - 1.5rem));
  display: grid;
  gap: .35rem;
  padding: .45rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 12px;
  background: var(--color-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  z-index: 220;
}

.catalog-print-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .45rem;
  padding: .5rem .6rem;
}

.catalog-print-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-bg);
}

@media (max-width: 900px) {
  .catalog-actions-menu {
    align-self: stretch;
    overflow: visible;
  }

  .catalog-actions-menu__trigger {
    min-height: 40px;
    width: 42px;
    height: 40px;
    border-radius: 10px;
  }

  .catalog-actions-menu__panel {
    top: calc(100% + .45rem);
    right: 0;
    width: min(208px, calc(100vw - 1.5rem));
  }

  .catalog-actions-menu .view-toggle-btn,
  .catalog-print-btn {
    min-height: 42px;
    justify-content: flex-start;
    font-size: .84rem;
  }
}

/* ── Text containment polish ─────────────────────────────────────────────── */
body,
body * {
  min-width: 0;
}

body :where(h1, h2, h3, h4, h5, h6, p, label, small, strong, span, li, dd, dt, button, a, input, textarea, select, code, pre) {
  overflow-wrap: anywhere;
  word-break: normal;
}

.header__inner,
.store-info__item,
.category-shell,
.cat-card,
.product-card,
.product-detail-modal__card,
.favorite-store-modal__card,
.cart,
.cart-item,
.toast,
.demo-tour {
  min-width: 0;
  max-width: 100%;
}

.header__logo,
.store-info__value,
.cat-card__name,
.cat-card__count,
.cat-card__status,
.cat-card__admin-btn,
.product-card__name,
.product-card__desc,
.product-card__cat,
.product-card__prices,
.product-card__stock,
.cart-item__name,
.cart-item__meta,
.cart-item__badge,
.favorite-store-modal h2,
.favorite-store-modal p,
.favorite-store-modal__step,
.favorite-store-modal__hint,
.toast,
.demo-tour__title,
.demo-tour__body {
  white-space: normal;
  overflow-wrap: anywhere;
}

.cat-card__admin-btn,
.btn-add,
.btn-whatsapp,
.btn-clear,
.favorite-store-btn,
.favorite-store-modal__primary,
.catalog-print-btn,
.view-toggle-btn,
.admin-save-btn,
.admin-visibility-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.product-card__prices,
.cart-item__badge {
  flex-wrap: wrap;
}

.toast {
  width: max-content;
  line-height: 1.35;
}

.favorite-store-modal__step {
  grid-template-columns: auto minmax(0, 1fr);
}

.catalog-actions-menu__panel {
  min-width: 190px;
  max-width: min(230px, calc(100vw - 1rem));
}

.catalog-actions-menu__panel .view-toggle-btn,
.catalog-actions-menu__panel .catalog-print-btn {
  width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: left;
}

@media (max-width: 768px) {
  .toast {
    width: calc(100vw - 2rem);
  }

  .admin-badge,
  .admin-toggle {
    white-space: normal;
  }

  .product-detail-card .product-card__actions,
  .demo-tour__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .cat-card-grid.view-list .cat-card__admin {
    min-width: 0;
  }
}
