/* AG Menu — public menu /{slug} (docs/05), in the layout of /modelo/loja.html.
   Store colors arrive as CSS variables from the page <style> (--color-primary, --color-secondary…). */

.menu-page { --status-h: 3.9rem; }   /* real height set by menu.js */

/* ----- Store header ----- */
.store-header {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--color-secondary); color: var(--color-secondary-contrast);
}
.store-header__cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* The owner's cover photo is shown at full strength (the model dims it until it disappears).
   The text is always white over a veil that is dark where the text sits and clears towards the other side,
   so the contrast does not depend on the photo (worst case, a white photo: 7:1). */
.store-header--cover { background: #0f0f14; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.store-header--cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(15 15 20 / .86) 0%, rgb(15 15 20 / .72) 45%, rgb(15 15 20 / .2) 100%);
}
.store-header--cover .store-header__inner { min-height: 13rem; }
.store-header--cover .whatsapp-button { text-shadow: none; }
@media (max-width: 700px) {
  /* narrow screens: the text runs across the whole photo */
  .store-header--cover::after { background: linear-gradient(180deg, rgb(15 15 20 / .62) 0%, rgb(15 15 20 / .8) 100%); }
  .store-header--cover .store-header__inner { min-height: 0; }
}
.store-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding-block: 2rem; }
.store-header__logo {
  flex: none; width: 5.5rem; height: 5.5rem; object-fit: contain; padding: .3rem;
  background: #fff; border: 2px solid rgb(255 255 255 / .12); border-radius: 18px; box-shadow: 0 8px 24px rgb(0 0 0 / .4);
}
.store-header__text { flex: 1 1 17.5rem; min-width: 0; }
.store-header__name { margin: 0 0 .35rem; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); }
.store-header__tagline { margin: 0 0 .85rem; font-size: .95rem; opacity: .8; }
.store-header__meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.store-header__meta li { display: flex; align-items: flex-start; gap: .4rem; }
.store-header__meta .icon { margin-top: .1em; }
.store-header__meta a { color: inherit; }
.store-header__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.whatsapp-button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem 1.15rem;
  border-radius: 999px; background: var(--gradient-accent); color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none;
  box-shadow: 0 8px 20px -8px rgb(0 168 120 / .6); transition: transform .25s var(--ease);
}
.whatsapp-button:hover { transform: translateY(-2px); }

/* ----- Status bar (sticky): open/closed, date, hours, payments, promotions ----- */
.status-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg); border-bottom: 1px solid var(--color-border-soft); box-shadow: var(--shadow);
}
.status-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-block: .75rem; }
.status-bar__left { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: .9rem; }
.status__dot { width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; animation: status-blink 2s ease-in-out infinite; }
@keyframes status-blink { 50% { opacity: .5; } }
.status--open { color: var(--color-success); }
.status--open .status__dot { box-shadow: 0 0 0 4px rgb(23 105 47 / .15); }
.status--closed { color: var(--color-danger); }
.status--closed .status__dot { box-shadow: 0 0 0 4px rgb(185 28 28 / .15); }
.status strong { color: var(--color-text); font-weight: 600; }
.status__detail { color: var(--color-muted); }
.status-bar__date { margin: 0; color: var(--color-subtle); font-size: .8rem; }
.status-bar__date::first-letter { text-transform: uppercase; }
.status-bar__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .9rem;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px;
  color: var(--color-muted); font-size: .8rem; font-weight: 600; white-space: nowrap; cursor: pointer; list-style: none;
  transition: border-color .2s, color .2s;
}
.chip::-webkit-details-marker { display: none; }
.chip:hover, .chip-menu[open] > .chip { border-color: var(--color-primary-text); color: var(--color-primary-text); }
.chip .icon { width: 1.1em; height: 1.1em; }
.chip__arrow { transition: transform .2s; }
.chip-menu[open] .chip__arrow { transform: rotate(180deg); }
.chip--promo { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); }
.chip--promo:hover { color: var(--color-primary-contrast); border-color: var(--color-text); }
.chip__count { min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: var(--color-bg); color: var(--color-text); font-size: .7rem; text-align: center; }

.chip-menu { position: relative; }
.chip-menu__panel {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 60; width: max-content; min-width: 17rem; max-width: min(22rem, 100vw - 2.5rem);
  padding: .9rem 1rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-card);
}
.hours { margin: 0; font-size: .9rem; }
.hours__row { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-top: 1px solid var(--color-border-soft); }
.hours__row:first-child { border-top: 0; }
.hours__row--today { font-weight: 700; }
.hours dt, .hours dd { margin: 0; }
.payments { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.payments li { padding: .25rem .75rem; background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: 999px; }

/* ----- Layout: categories + products ----- */
.menu-layout { padding-block: 0 3.5rem; }
.menu { min-width: 0; }
.menu:focus { outline: none; }
.menu__empty { padding: 2rem 0; font-size: 1.125rem; }

/* Phones: the category nav is a sticky horizontal strip of pills (top level only), right below the status bar. */
.category-nav {
  position: sticky; top: var(--status-h); z-index: 40; margin: 0 -1.25rem 1.5rem; padding: .85rem 0;
  background: var(--color-page); border-bottom: 1px solid var(--color-border-soft);
}
.category-nav:focus { outline: none; }
.category-nav__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.category-nav__list {
  display: flex; gap: .5rem; margin: 0; padding: .125rem 1.25rem; list-style: none;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.category-nav__list::-webkit-scrollbar { display: none; }
.category-nav__list > li { flex: none; }
.category-nav__list ul { display: none; }
.category-nav a {
  position: relative; display: flex; align-items: center; min-height: 40px; padding: .4rem 1rem; white-space: nowrap;
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 999px;
  color: var(--color-muted); font-size: .85rem; font-weight: 500; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.category-nav a:hover { color: var(--color-text); border-color: var(--color-primary-text); }
.category-nav a[aria-current] { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); font-weight: 700; }

.category, .subcategory, .location { scroll-margin-top: calc(var(--status-h) + 5rem); }
.category { margin-bottom: 3.5rem; }
.category__title {
  display: inline-block; min-width: 11.25rem; margin: 0 0 1.25rem; padding-bottom: .85rem;
  font-size: 1.4rem; border-bottom: 2px solid var(--color-primary);
}
.subcategory__title {
  margin: 2rem 0 1rem; padding-left: .25rem; font-family: var(--font); font-size: .8rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--color-subtle);
}
.category__title + .subcategory .subcategory__title { margin-top: .5rem; }

/* Desktop: sidebar with the full tree. */
@media (min-width: 900px) {
  .menu-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; align-items: start; padding-top: 2rem; }
  .category-nav {
    top: calc(var(--status-h) + 1.25rem); margin: 0; padding: 0 .5rem 0 0; background: none; border: 0;
    max-height: calc(100vh - var(--status-h) - 2.5rem); overflow-y: auto; scrollbar-width: thin;
  }
  .category-nav__title {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; margin: 0 0 .85rem;
    font-family: var(--font); font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--color-subtle);
  }
  .category-nav__list { display: flex; flex-direction: column; gap: 2px; padding: 0; overflow: visible; }
  .category-nav__list ul { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0; padding: 0; list-style: none; }
  .category-nav a {
    min-height: 40px; padding: .55rem .9rem; white-space: normal; font-size: .9rem;
    background: none; border: 0; border-radius: var(--radius);
  }
  .category-nav ul ul a { padding-left: 1.75rem; font-size: .82rem; color: var(--color-subtle); }
  .category-nav a:hover { background: var(--color-surface); }
  .category-nav a[aria-current] {
    background: color-mix(in srgb, var(--color-primary) 9%, transparent); color: var(--color-primary-text); font-weight: 700;
  }
  .category-nav a[aria-current]::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 1.15rem; border-radius: 3px; background: var(--color-primary);
  }
  .category, .subcategory, .location { scroll-margin-top: calc(var(--status-h) + 1.25rem); }
}

/* ----- Products ----- */
.product-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product {
  position: relative; display: flex; gap: .9rem; padding: 1.1rem;
  background: var(--color-bg); border: 1px solid var(--color-border-soft); border-radius: 14px;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.product:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.product__image { flex: none; width: 4.75rem; height: 4.75rem; object-fit: cover; border-radius: 12px; background: var(--color-surface); }
.product__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.product__name { margin: 0 0 .25rem; font-family: var(--font); font-size: .95rem; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.product__description { margin: 0 0 .75rem; color: var(--color-subtle); font-size: .8rem; line-height: 1.5; }
.product__price { margin: 0; font-family: var(--font-mono); font-size: .95rem; font-weight: 600; color: var(--color-primary-text); white-space: nowrap; }
.product__buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .6rem; margin-top: auto; }
.product__prices { display: flex; flex-wrap: wrap; gap: .4rem; margin: auto 0 0; padding: 0; list-style: none; }
.product__prices li {
  display: flex; align-items: baseline; gap: .4rem; padding: .25rem .7rem;
  border: 1px solid var(--color-border-soft); border-radius: 999px; background: var(--color-surface);
}
.product__price-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.product__price-label { font-size: .8rem; font-weight: 600; color: var(--color-muted); }
.product__prices--cart { display: grid; gap: 0; }
.product__prices--cart li { justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem 0 0; margin-top: .5rem; background: none; border: 0; border-top: 1px solid var(--color-border-soft); border-radius: 0; }
.product__prices--cart li:first-child { margin-top: 0; }

/* ----- Add / quantity on each price ----- */
.add-control { flex: none; }
.add-button {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .4rem 1rem;
  border: 0; border-radius: 999px; background: var(--color-primary); color: var(--color-primary-contrast);
  font-size: .78rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: transform .2s, filter .2s;
}
.add-button .icon { width: 1em; height: 1em; }
.add-button:hover { transform: scale(1.05); filter: brightness(1.08); }
.add-button:active { transform: scale(.95); }
.stepper { display: inline-flex; align-items: center; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; }
.stepper[hidden] { display: none; }
.stepper__button {
  width: 40px; height: 38px; border: 0; background: transparent; color: var(--color-primary-text);
  font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color .2s;
}
.stepper__button:hover { background: var(--color-surface); }
.stepper__button:disabled { opacity: .45; cursor: not-allowed; }
.stepper__qty { min-width: 1.9rem; text-align: center; font-family: var(--font-mono); font-size: .85rem; font-weight: 700; }

/* ----- Sponsors ----- */
.sponsors { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border-soft); text-align: center; }
.sponsors__title { margin: 0 0 1.1rem; font-family: var(--font); font-size: .8rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--color-subtle); }
.sponsors__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.sponsors__list li > a, .sponsors__list li > img, .sponsors__list li > .sponsors__name {
  display: grid; place-items: center; width: 4.25rem; height: 4.25rem; overflow: hidden;
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 50%;
}
.sponsors__list li > a { transition: transform .25s, border-color .25s, box-shadow .25s; }
.sponsors__list li > a:hover { transform: translateY(-3px); border-color: var(--color-primary); box-shadow: var(--shadow-card); }
.sponsors__list img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sponsors__name { padding: .25rem; font-size: .65rem; font-weight: 700; line-height: 1.1; color: var(--color-text); text-decoration: none; }

/* ----- Location ----- */
.location { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border-soft); }
.location:focus { outline: none; }
.location__title { margin: 0 0 .4rem; font-size: 1.15rem; }
.location__address { display: flex; gap: .5rem; margin: 0 0 1rem; color: var(--color-muted); font-size: .85rem; }
.location__address .icon { margin-top: .1em; flex: none; }
.location__map {
  position: relative; aspect-ratio: 16 / 8; max-height: 24rem; width: 100%; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--color-border); background: var(--color-surface);
}
.location__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: .25rem; padding: .5rem 1.15rem;
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 999px;
  color: var(--color-text); font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s;
}
.map-button:hover { border-color: var(--color-primary-text); color: var(--color-primary-text); }

/* ----- Promotions dialog ----- */
.promotions__list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.promotion { padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: 14px; }
.promotion__title { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 .5rem; font-size: 1.1rem; }
.promotion__title .icon { color: var(--color-primary-text); margin-top: .1em; }
.promotion p { margin: 0 0 .75rem; }
.promotion img { display: block; border-radius: var(--radius); }

/* ----- Footer ----- */
.store-footer { background: #0f0f14; color: rgb(255 255 255 / .75); font-size: .85rem; line-height: 1.7; text-align: center; }
.store-footer:focus { outline: none; }
.store-footer__inner { display: grid; gap: 1.25rem; justify-items: center; padding-block: 2.5rem; }
.menu-page:has(.cart-bar:not([hidden])) .store-footer__inner { padding-bottom: 7rem; }
.store-footer a { color: inherit; }
.store-footer p { margin: 0; }
.store-footer__text { max-width: 40rem; font-size: .8rem; color: rgb(255 255 255 / .7); }
.contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.contacts a {
  display: flex; align-items: center; gap: .5rem; min-height: 40px; padding: .45rem 1rem;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .16); border-radius: 999px;
  color: rgb(255 255 255 / .9); font-size: .8rem; font-weight: 500; text-decoration: none; transition: background-color .2s;
}
.contacts a:hover { background: rgb(255 255 255 / .12); }
.contacts__label { font-weight: 700; }
.store-footer__brand strong { color: #fff; }
.back-to-top { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .75rem; font-size: .8rem; text-decoration: none; }
.back-to-top:hover { color: #fff; text-decoration: underline; }
.store-footer__credits { font-size: .72rem; color: rgb(255 255 255 / .62); }

/* ----- Messages used by the cart ----- */
.notice { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1rem; padding: .75rem .9rem; border: 1px solid; border-radius: var(--radius); font-size: .85rem; line-height: 1.5; }
.notice .icon { margin-top: .15em; flex: none; }
.notice--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.notice--warning { background: #fff6e5; border-color: #f3d9a4; color: #5a3b00; }
.required { font-weight: 400; color: var(--color-muted); font-size: .8rem; }
.link-button {
  display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--focus);
  text-decoration: underline; cursor: pointer; font: inherit;
}
.link-button--danger { color: var(--color-danger); }
.button--secondary { background: var(--color-bg); color: var(--color-text); border-color: var(--color-border); }
.button--block { width: 100%; }

/* ----- Cart bar: floating dark pill at the bottom ----- */
.menu-page:has(.cart-bar:not([hidden])) { padding-bottom: 0; }
.cart-bar {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 200; transform: translateX(-50%);
  width: min(40rem, 100% - 2rem); animation: cart-bar-in .35s var(--ease);
}
@keyframes cart-bar-in { from { opacity: 0; transform: translateX(-50%) translateY(2rem); } }
.cart-bar__button {
  display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 60px; padding: .6rem .6rem .6rem 1.35rem;
  border: 0; border-radius: 999px; background: #1a1a1f; color: #fff; cursor: pointer; text-align: left;
  box-shadow: 0 -10px 40px -15px rgb(26 26 31 / .15), 0 20px 40px -15px rgb(0 0 0 / .45);
}
.cart-bar__icon { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; background: rgb(255 255 255 / .1); }
.cart-bar__icon .icon { width: 1.1rem; height: 1.1rem; }
.cart-bar__count {
  position: absolute; top: -.3rem; right: -.35rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .25rem; border-radius: 999px;
  display: grid; place-items: center; background: var(--color-primary); color: var(--color-primary-contrast);
  font-size: .65rem; font-weight: 700; border: 2px solid #1a1a1f;
}
.cart-bar__text { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar__action {
  flex: none; padding: .7rem 1.35rem; border-radius: 999px; background: var(--color-primary); color: var(--color-primary-contrast);
  font-size: .9rem; font-weight: 700; white-space: nowrap; transition: transform .2s;
}
.cart-bar__button:hover .cart-bar__action { transform: scale(1.03); }

/* ----- Cart drawer (a <dialog> styled as a side panel) ----- */
dialog.cart {
  display: none; flex-direction: column; width: min(27.5rem, 100%); max-width: 100%; height: 100%; max-height: 100%;
  margin: 0 0 0 auto; padding: 0; overflow: hidden; border: 0; border-left: 1px solid var(--color-border); border-radius: 0;
  box-shadow: -20px 0 60px -20px rgb(26 26 31 / .25);
}
dialog.cart[open] { display: flex; animation: cart-in .4s var(--ease); }
@keyframes cart-in { from { transform: translateX(100%); } }
.cart__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border-soft); }
.cart__head .dialog__title { font-size: 1.15rem; }
.cart__close {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-muted); cursor: pointer; transition: color .2s, border-color .2s;
}
.cart__close:hover { color: var(--color-primary-text); border-color: var(--color-primary-text); }
.cart__close .icon { width: 1rem; height: 1rem; }
.cart__body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem 1.5rem; }
.cart__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 60%; padding: 2.5rem 1.25rem; text-align: center; color: var(--color-muted); font-size: .9rem; }
.cart__empty p { margin: 0; }
.cart__empty-icon .icon { width: 3rem; height: 3rem; opacity: .4; }
.cart__form { display: grid; gap: 1rem; }
.cart__form[hidden] { display: none; }
.cart__items { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.cart-line {
  display: grid; gap: .5rem; padding: .9rem; background: var(--color-surface); border: 1px solid var(--color-border-soft);
  border-radius: var(--radius); animation: cart-line-in .3s ease;
}
@keyframes cart-line-in { from { opacity: 0; transform: translateY(8px); } }
.cart-line__head { display: flex; justify-content: space-between; gap: .75rem; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.cart-line__price { white-space: nowrap; font-family: var(--font-mono); font-weight: 600; color: var(--color-accent-dark); }
.cart-line__tools { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .8rem; }
.cart-line .stepper { border-radius: 8px; }
.cart-line .stepper__button { width: 36px; height: 34px; color: var(--color-muted); font-size: 1rem; }
.cart-line__note-label { font-size: .78rem; font-weight: 600; color: var(--color-muted); }
.cart-line__note, .cart-field input, .cart-field select, .cart-field textarea {
  width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--color-field-border); border-radius: var(--radius);
  background: var(--color-bg); color: var(--color-text); transition: border-color .2s;
}
.cart-line__note:hover, .cart-field input:hover, .cart-field select:hover, .cart-field textarea:hover { border-color: var(--color-text); }
.cart__customer { display: grid; gap: .75rem; margin: 0; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius); }
.cart__customer legend { padding: 0 .4rem; font-family: var(--font-display); font-weight: 600; }
.cart-field { display: grid; gap: .3rem; }
.cart-field > label { font-size: .85rem; font-weight: 600; }
.cart-field__info { margin: 0; font-size: .85rem; color: var(--color-muted); }
.cart-field--options { margin: 0; padding: 0; border: 0; }
.cart-field--options legend { font-family: var(--font); font-size: .85rem; font-weight: 600; margin-bottom: .25rem; padding: 0; }
.cart-field--hp { position: absolute !important; left: -9999px; }
.cart-field [aria-invalid="true"] { border: 2px solid var(--color-danger); }
.radio { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-size: .9rem; cursor: pointer; }
.radio input { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: var(--color-primary); }
.cart__error { padding: .75rem 1rem; border: 2px solid var(--color-danger); border-radius: var(--radius); color: var(--color-danger); font-size: .9rem; font-weight: 700; }
.cart__privacy { margin: 0; font-size: .8rem; color: var(--color-muted); }

/* Coupon (only when the store has an active coupon) */
.cart-coupon { display: grid; gap: .35rem; padding: .9rem 1rem; border: 1px dashed var(--color-field-border); border-radius: var(--radius); }
.cart-coupon > label { font-size: .85rem; font-weight: 600; }
.cart-coupon__row { display: flex; gap: .5rem; }
.cart-coupon__row[hidden], .cart-coupon__applied[hidden] { display: none; }
.cart-coupon input {
  flex: 1; min-width: 0; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--color-field-border); border-radius: var(--radius);
  background: var(--color-bg); color: var(--color-text); font-family: var(--font-mono); text-transform: uppercase;
}
.cart-coupon input[aria-invalid="true"] { border: 2px solid var(--color-danger); }
.cart-coupon__apply { min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--color-text); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text); font-weight: 700; cursor: pointer; }
.cart-coupon__apply:disabled { opacity: .6; cursor: wait; }
.cart-coupon__applied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.cart-coupon__applied > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; color: var(--color-accent-dark); }
.cart-coupon__applied strong { font-family: var(--font-mono); }
.cart-coupon__applied .icon { width: 1rem; height: 1rem; }
.cart-coupon__status { margin: 0; font-size: .8rem; color: var(--color-muted); }
.cart-coupon__status:empty { display: none; }
.cart-coupon__status.is-error { color: var(--color-danger); font-weight: 700; }
.cart__discount { display: grid; gap: .2rem; }
.cart__discount[hidden] { display: none; }
.cart__discount p { display: flex; justify-content: space-between; margin: 0; color: var(--color-muted); font-size: .85rem; }
.cart__discount p > span:last-child { font-family: var(--font-mono); }
.cart__discount p:last-child > span:last-child { color: var(--color-accent-dark); font-weight: 700; }

.cart__foot { display: grid; gap: .5rem; padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-border-soft); background: var(--color-surface); }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 .35rem; color: var(--color-muted); font-size: .9rem; font-weight: 500; }
.cart__total strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.cart__send {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; min-height: 52px; padding: .9rem 1rem;
  border: 0; border-radius: var(--radius); background: var(--gradient-accent); color: #fff; font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.cart__send:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgb(0 168 120 / .5); }
.cart__send:disabled { opacity: .5; cursor: not-allowed; }
.cart__alt { justify-self: center; font-size: .8rem; }
.cart__clear { justify-self: center; min-height: 40px; padding: .4rem 1rem; border: 0; border-radius: var(--radius); background: none; color: var(--color-muted); font-size: .8rem; font-weight: 600; cursor: pointer; }
.cart__clear:hover { color: var(--color-danger); }
.cart-sent { width: min(26rem, 100% - 2rem); }
.cart-sent .dialog__footer { gap: .5rem; flex-wrap: wrap; }

/* ----- Toast ("… adicionado à cesta") ----- */
.toast {
  position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); z-index: 400;
  display: flex; align-items: center; gap: .6rem; max-width: calc(100% - 2rem); padding: .75rem 1.25rem; border-radius: 999px;
  background: #1a1a1f; color: #fff; font-size: .82rem; font-weight: 600; pointer-events: none;
  box-shadow: 0 12px 32px -8px rgb(26 26 31 / .3); opacity: 0; transform: translateX(-50%) translateY(6rem);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .icon { color: #5ee0b0; }

@media (max-width: 520px) {
  .store-header__inner { gap: 1rem; padding-block: 1.5rem; }
  .store-header__logo { width: 4rem; height: 4rem; border-radius: 14px; }
  .store-header__actions { width: 100%; }
  .whatsapp-button { flex: 1; justify-content: center; }
  .status ~ .status-bar__date { display: none; }   /* a store without opening hours keeps the date: the bar is never empty */
  .product__image { width: 4rem; height: 4rem; }
  .cart-bar__button { min-height: 56px; padding: .5rem .5rem .5rem 1.1rem; }
  .cart-bar__action { padding: .6rem 1rem; font-size: .82rem; }
}

html.a11y-contrast .store-header, html.a11y-contrast .store-footer, html.a11y-contrast .cart-bar__button, html.a11y-contrast .toast { background: #000; }
html.a11y-contrast .store-header__cover { display: none; }
html.a11y-contrast .cart-bar__button, html.a11y-contrast .toast, html.a11y-contrast .product, html.a11y-contrast .chip { border: 2px solid #fff; }
html.a11y-contrast .whatsapp-button, html.a11y-contrast .cart__send { background: #000; color: #ff0; border: 2px solid #ff0; }
html.a11y-contrast .category-nav a[aria-current] { background: #ff0; color: #000; }
html.a11y-contrast .category-nav a[aria-current]::before { display: none; }
html.a11y-contrast .notice, html.a11y-contrast .store-footer__text, html.a11y-contrast .store-footer__credits { background: #000; color: #fff; }

@media print {
  .category-nav, .a11y-toggle, #vlibras-access-wrapper, #vlibras-app-root,.chip--promo, .back-to-top, .skip-links, .cart-bar, .toast, .status-bar__actions { display: none !important; }
  .status-bar { position: static; }
  .product { break-inside: avoid; }
}
