/* Favo & Flor: vitrine. CSS sem framework, mobile first.
   Ordem: tokens, base, topo, catálogo, produto, botões e formulários, carrinho e checkout,
   mensagens, pedido, minha conta, rodapé. */
/* Títulos: Source Serif 4 (SIL OFL 1.1, static/fonts/OFL.txt), servida pelo próprio site. */
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-700.812e2dc3e7b6.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --honey-50: #fff8eb;
  --honey-100: #feeccb;
  --honey-300: #f6c25b;
  --honey-500: #e19a12;
  --honey-700: #8a5207;
  --honey-900: #5a340a;
  --ink: #2a1d10;
  --ink-soft: #4d3b27;
  --muted: #5e4f3e; /* 7,9:1 no branco, 7,1:1 no creme mais escuro */
  --line: #ecdcc4;
  --line-strong: #a08a6a;
  --paper: #fffdf8;
  --ok: #2a6f35;
  --err: #b3261e;
  --focus: #8a5207;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(90, 52, 10, .06), 0 6px 20px rgba(90, 52, 10, .07);
  --shadow-lift: 0 2px 4px rgba(90, 52, 10, .08), 0 12px 28px rgba(90, 52, 10, .12);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tap: 44px;
  --ic-check: url("../img/ic/check.f1df665f5769.svg");
  --ic-x: url("../img/ic/x.0fbe0432c15b.svg");
  --ic-alert: url("../img/ic/alert.a63a9b930a50.svg");
  --ic-info: url("../img/ic/info.7c73a1f8a501.svg");
  --ic-arrow: url("../img/ic/arrow.ba248ea7c0e3.svg");
  --ic-undo: url("../img/ic/undo.cbf255beee5a.svg");
  --ic-clock: url("../img/ic/clock.c789f14d49f6.svg");
  --ic-dot: url("../img/ic/dot.d10d61de30a8.svg");
  --ic-chevron: url("../img/ic/chevron.24dd1339a810.svg");
  --ic-cart: url("../img/ic/cart.b96a51a00350.svg");
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #d9c19a var(--paper); accent-color: var(--honey-700); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 16px/1.55 var(--sans); color: var(--ink); background: var(--paper); caret-color: var(--honey-700); }
main { flex: 1; width: min(1200px, 100% - 2rem); margin-inline: auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--honey-700); text-underline-offset: .18em; }
a:hover { color: var(--honey-900); }
::selection { background: var(--honey-300); color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--honey-900); text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem); margin: .6em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 0 0 .8em; }
h3 { font-size: 1.1rem; margin: 0; }
p { text-wrap: pretty; }
.wrap { width: min(1200px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.075rem; color: var(--ink-soft); max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: 1rem; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { clip-path: none; background: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 20; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.price, .summary__row, .kv, .line__total, .ocard__total { font-variant-numeric: tabular-nums; }

/* Ícones desenhados (máscara sobre currentColor) */
.msg::before, .badge::before, .empty::before, .tl__dot::before, .error::before, .warn::before, .crumbs a[href]::after, .crumbs--back a::before, .btn--prev::before, .btn--next::after, .pix__timer::before {
  content: ""; flex: none; display: inline-block; width: 1em; height: 1em; background: currentColor;
  mask: var(--ic, var(--ic-dot)) center / contain no-repeat; -webkit-mask: var(--ic, var(--ic-dot)) center / contain no-repeat;
}

/* Topo */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 253, 248, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: .75rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 700 1.25rem var(--serif); color: var(--honey-900); min-height: var(--tap); }
.brand:hover { color: var(--honey-900); }
.nav { display: none; gap: .25rem; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: .6rem .7rem; border-radius: var(--radius-sm); min-height: var(--tap); display: inline-flex; align-items: center; transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav a:hover { color: var(--honey-900); background: var(--honey-50); }
.nav a[aria-current] { color: var(--honey-900); font-weight: 700; box-shadow: inset 0 -3px 0 var(--honey-500); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.nav--open { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); padding: .5rem 1rem 1rem; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(90, 52, 10, .1); }
.nav--open a { border-bottom: 1px solid var(--line); border-radius: 0; }
.nav--open a[aria-current] { box-shadow: none; background: var(--honey-50); }
.menu-btn { margin-left: auto; background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 1.1rem; min-height: var(--tap); font: 600 .95rem var(--sans); cursor: pointer; }
.menu-btn:hover { background: var(--honey-50); }
.nav__account { display: flex; align-items: center; gap: .25rem; }
.nav--open .nav__account { flex-direction: column; align-items: stretch; gap: 0; }
.nav__logout { margin: 0; display: flex; }
.nav--open .nav__logout { border-bottom: 1px solid var(--line); }
.nav__btn { background: none; border: 0; padding: .6rem .7rem; min-height: var(--tap); font: 500 1rem var(--sans); color: var(--muted); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; border-radius: var(--radius-sm); }
.nav__btn:hover { color: var(--honey-900); background: var(--honey-50); }
.cart-badge { margin-right: -11px; position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); color: var(--honey-900); border-radius: 50%; }
.cart-badge:hover { background: var(--honey-50); color: var(--honey-900); }
.cart-badge__count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; border-radius: 10px; background: var(--honey-900); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--paper); }
.cart-badge--pop .cart-badge__count { animation: pop .4s var(--ease); }
@keyframes pop { 50% { transform: scale(1.35); } }
@media (min-width: 760px) { .nav { display: flex; } .menu-btn { display: none; } }

/* Catálogo */
.hero { margin: 1.5rem 0 1rem; padding: clamp(1.75rem, 5vw, 3.5rem); border-radius: 22px; background: var(--honey-100); }
.hero h1 { max-width: 18ch; margin-top: 0; }
.hero .lead { margin: 0; }
.hero__fact .price { margin: 1rem 0 0; font-size: 1.25rem; }
.hero__fact .price .small { font-weight: 500; color: var(--ink-soft); }
.hero__cta { margin-top: 1.25rem; }
.hero__media { display: block; margin-top: 1.75rem; border-radius: var(--radius); overflow: hidden; background: var(--honey-50); }
.hero__photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.hero__media:hover .hero__photo { transform: scale(1.03); }
@media (min-width: 860px) {
  .hero--split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
  .hero--split .hero__media { margin-top: 0; }
  .hero--split .hero__photo { aspect-ratio: 4 / 5; max-height: 560px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__text > *, .hero__media { animation: hero-up .6s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: .08s; }
  .hero__text > :nth-child(3) { animation-delay: .16s; }
  .hero__media { animation-delay: .1s; }
}
@keyframes hero-up { from { opacity: 0; translate: 0 10px; } }
.page-title { margin-top: 1.5rem; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .5rem .25rem 1rem; margin-inline: -.25rem; scrollbar-width: thin; }
@media (max-width: 639px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip { white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: #fff; font-size: .95rem; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { background: var(--honey-50); border-color: var(--honey-700); color: var(--ink); }
.chip--on, .chip--on:hover { background: var(--honey-900); border-color: var(--honey-900); color: #fff; font-weight: 600; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); margin-bottom: 3rem; }
@media (min-width: 640px) { .grid { gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.grid > .empty { grid-column: 1 / -1; }
#produtos { scroll-margin-top: 80px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card:has(.card__title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card__media { position: relative; display: block; aspect-ratio: 1; background: var(--honey-50); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: .75rem .85rem 1rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
@media (min-width: 640px) { .card__body { padding: 1rem 1.1rem 1.15rem; } }
.card__title { font-size: 1.1rem; margin: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:focus-visible { outline: none; }
.card__meta { margin: 0; font-size: .85rem; font-weight: 600; color: var(--honey-700); }
.card__desc { line-height: 1.45; padding-bottom: .1em; margin: .2rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: auto; padding-top: .5rem; }
.tag { position: absolute; top: .6rem; left: .6rem; z-index: 1; background: var(--honey-900); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.price { font-weight: 700; font-size: 1.1rem; color: var(--honey-900); margin: .3rem 0 0; }

/* Produto */
.crumbs { font-size: .875rem; margin-top: 1rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .4rem; }
.crumbs li { display: inline-flex; align-items: center; gap: .4rem; }
.crumbs a[href]::after { --ic: var(--ic-chevron); width: .9em; height: .9em; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; gap: .4rem; min-height: 24px; }
@media (max-width: 639px) { .crumbs a { min-height: var(--tap); } }
.crumbs--back a { display: inline-flex; align-items: center; gap: .3rem; min-height: var(--tap); }
.crumbs--back a::before { --ic: var(--ic-chevron); transform: rotate(180deg); }
.crumbs--back a[href]::after { display: none; }
.product { display: grid; gap: 1.5rem; margin: 1rem 0 3rem; }
.product__media { min-width: 0; }
.product__media > img { background: var(--honey-50); border-radius: 22px; width: 100%; height: auto; }
.product__info h1 { margin-top: 0; margin-bottom: .2em; }
.product__origin { margin: 0 0 1rem; font-weight: 600; color: var(--honey-700); }
@media (min-width: 860px) { .product { grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: start; } .product__media { position: sticky; top: 88px; } }
.buy { margin: 1.5rem 0; }
.variants { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; display: grid; gap: .75rem; }
.variants__legend { padding: 0; margin-bottom: .6rem; font-weight: 700; color: var(--ink); }
.variant { display: grid; gap: .25rem .75rem; padding: .25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.variant:hover { border-color: var(--honey-700); }
.variant:has(.variant__radio:checked) { border-color: var(--honey-700); background: var(--honey-50); box-shadow: inset 0 0 0 1px var(--honey-700); }
.variant:has(.variant__radio:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.variant--off { background: var(--paper); }
.variant--off:hover { border-color: var(--line); }
.variant__pick { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .75rem .85rem; cursor: pointer; }
.variant--off .variant__pick { cursor: not-allowed; opacity: .6; }
.variant__radio { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; padding: 0; accent-color: var(--honey-900); }
.variant__radio:focus-visible { outline: none; box-shadow: none; }
.variant__label { display: flex; flex-direction: column; }
.variant__weight { font-size: .875rem; color: var(--muted); }
.variant .price { margin: 0; text-align: right; white-space: nowrap; font-size: 1.2rem; }
.variant > .badge, .variant__note, .variant > .variant__see { margin: 0 .85rem .6rem; justify-self: start; }
.buy__row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.buy__qty { display: flex; flex-direction: column; gap: .3rem; }
.buy__qty-label { font-size: .875rem; font-weight: 600; color: var(--ink-soft); }
.buy__submit { flex: 1 1 14rem; }
.buy__none { margin: 0; color: var(--ink-soft); }
.stepper { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper:focus-within { border-color: var(--honey-700); }
.stepper button { width: var(--tap); height: var(--tap); border: 0; background: var(--honey-50); color: var(--ink); font-size: 1.25rem; cursor: pointer; transition: background-color .15s var(--ease); }
.stepper button:hover { background: var(--honey-100); }
.stepper button:active { background: var(--honey-300); }
.stepper input { width: 48px; height: var(--tap); padding: 0; border: 0; border-radius: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus-visible { outline-offset: -3px; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.product__note { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 62ch; }
.cart-link { white-space: nowrap; }

/* Galeria de fotos: faixa com rolagem-encaixe, miniaturas (a partir de 860px), contador no celular e ampliação em <dialog> */
.gallery { display: grid; gap: .75rem; min-width: 0; }
.gallery__stage { position: relative; background: var(--honey-50); border-radius: 22px; overflow: hidden; }
.gallery__track { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -3px; border-radius: 22px; }
.gallery__slide { flex: 0 0 100%; min-width: 0; aspect-ratio: 3 / 4; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery__open:focus-visible { outline-offset: -3px; }
.gallery__open img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 859px) { .gallery__slide { aspect-ratio: auto; height: min(133.33vw, 62svh); } }
.gallery__count { position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); margin: 0; padding: .2rem .75rem; border-radius: 999px; background: rgba(42, 29, 16, .82); color: #fff; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.gallery__nav { display: none; position: absolute; top: 50%; translate: 0 -50%; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--honey-900); cursor: pointer; }
.gallery__nav::before, .zoom__btn--prev::before, .zoom__btn--next::before, .zoom__btn--close::before { content: ""; display: block; width: 1.25rem; height: 1.25rem; margin: auto; background: currentColor; mask: var(--ic) center / contain no-repeat; -webkit-mask: var(--ic) center / contain no-repeat; }
.gallery__nav--prev, .zoom__btn--prev { --ic: var(--ic-chevron); left: .75rem; }
.gallery__nav--next, .zoom__btn--next { --ic: var(--ic-chevron); right: .75rem; }
.gallery__nav--prev::before, .zoom__btn--prev::before { transform: rotate(180deg); }
.gallery__nav:hover { background: #fff; border-color: var(--honey-700); }
.gallery__thumbs { display: none; list-style: none; margin: 0; padding: 0; gap: .5rem; flex-wrap: wrap; }
.gallery__thumb { display: block; width: 72px; height: 72px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--honey-50); cursor: pointer; opacity: .78; transition: opacity .15s var(--ease); }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb[aria-current] { opacity: 1; outline: 3px solid var(--honey-900); outline-offset: 1px; }
.gallery__thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.variant__see { background: none; border: 0; padding: 0 .1rem; min-height: var(--tap); color: var(--honey-700); font: 600 .875rem var(--sans); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; border-radius: var(--radius-sm); }
.variant__see:hover { color: var(--honey-900); }
@media (min-width: 860px) {
  .gallery__thumbs { display: flex; }
  .gallery__nav { display: block; }
  .gallery__count { display: none; }
}
.zoom { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.zoom::backdrop { background: rgba(42, 29, 16, .92); }
.zoom__box { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; }
.zoom__img { width: auto; height: auto; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: var(--radius); background: var(--honey-50); }
.zoom__cap { position: absolute; left: 4.5rem; right: 4.5rem; bottom: .9rem; margin: 0; text-align: center; font-size: .9375rem; color: var(--honey-100); }
.zoom__btn { position: absolute; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid rgba(255, 244, 222, .5); border-radius: 50%; background: rgba(42, 29, 16, .6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.zoom__btn:hover { background: rgba(255, 244, 222, .18); }
.zoom__btn:focus-visible { outline-color: var(--honey-300); }
.zoom__btn--close { --ic: var(--ic-x); top: .75rem; right: .75rem; }
.zoom__btn--prev, .zoom__btn--next { top: 50%; translate: 0 -50%; }
.zoom[open] { animation: zoom-in .2s var(--ease); }
@keyframes zoom-in { from { opacity: 0; } }

/* Botões e formulários */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; min-height: var(--tap); padding: .55rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease); }
.btn:hover { background: var(--honey-50); border-color: var(--honey-700); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--honey-500); border-color: var(--honey-500); color: #2a1600; }
.btn--primary:hover { background: #cf8b0c; border-color: #cf8b0c; color: #2a1600; }
.btn--block { width: 100%; margin-top: 1rem; font-size: 1rem; }
.btn--lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary[disabled]:hover { background: var(--honey-500); border-color: var(--honey-500); }
.btn--prev::before { --ic: var(--ic-chevron); transform: rotate(180deg); }
.btn--next::after { --ic: var(--ic-chevron); }
.htmx-request .btn { pointer-events: none; opacity: .7; }
.htmx-request .btn--primary::before { content: ""; width: 1em; height: 1em; border: 2px solid rgba(42, 22, 0, .3); border-top-color: #2a1600; border-radius: 50%; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; font: inherit; font-size: .9rem; min-height: var(--tap); padding: 0 .6rem; border-radius: var(--radius-sm); }
.link-btn:hover { color: var(--err); }
input, select, textarea { font: inherit; padding: .6rem .8rem; min-height: var(--tap); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%; }
input::placeholder { color: #85735f; }
input:hover, select:hover { border-color: var(--honey-700); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--honey-700); outline: 2px solid var(--focus); outline-offset: 0; box-shadow: 0 0 0 4px rgba(225, 154, 18, .25); }
.row { display: flex; gap: .5rem; }
.fields { display: grid; gap: 1rem .8rem; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; }
.field--error input, .field--error select { border-color: var(--err); border-width: 2px; padding: calc(.6rem - 1px) calc(.8rem - 1px); }
.error { --ic: var(--ic-alert); display: flex; gap: .35rem; align-items: flex-start; color: var(--err); font-size: .85rem; font-weight: 500; }
.error::before { margin-top: .15em; }
.field__help ul { margin: 0; padding-left: 1.2rem; }
.field__help li + li { margin-top: .15rem; }
.field input[readonly] { background: var(--honey-50); color: var(--muted); }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

/* Carrinho e checkout */
.cart, .checkout, .order { display: grid; gap: 1.25rem; margin-bottom: 3rem; }
@media (min-width: 900px) { .cart, .checkout { grid-template-columns: 1fr 380px; gap: 1.75rem; align-items: start; } .order { grid-template-columns: 1.4fr 1fr; } }
.cart__lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: .25rem 1rem; align-items: center; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.line__info { display: flex; align-items: center; gap: .75rem; grid-column: 1 / -1; min-width: 0; }
.line__info { margin-bottom: .35rem; }
@media (min-width: 640px) { .line__info { margin-bottom: 0; } }
.line__txt { display: flex; flex-direction: column; min-width: 0; }
.line__thumb { flex: none; display: block; width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; background: var(--honey-50); border: 1px solid var(--line); }
.line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line__info a { color: var(--honey-900); font-weight: 700; text-decoration: none; }
.line__info a:hover { text-decoration: underline; }
.line__qty input { width: 76px; text-align: center; }
.line__qty.htmx-request input { opacity: .5; }
.line__total { text-align: right; }
.line--warn { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.warn { --ic: var(--ic-alert); display: flex; gap: .35rem; align-items: center; color: var(--err); font-weight: 600; }
@media (min-width: 640px) { .line { grid-template-columns: 1fr 76px 110px auto; } .line__info { grid-column: auto; } }
.summary, .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .summary, .panel { padding: 1.5rem; } }
.summary { position: sticky; top: 88px; }
.summary h2 { margin-bottom: .5rem; }
.summary__row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.summary__row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.summary__row > :last-child { white-space: nowrap; }
.summary__row--total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .8rem; font-size: 1.15rem; }
.checkout__main { display: grid; gap: 1.25rem; min-width: 0; }
/* Total fixo no celular: acompanha a rolagem do formulário sem mudar o fluxo; o botão e o resumo continuam no fim */
.checkout-bar { display: none; }
@media (max-width: 899px) {
  .checkout-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 56px; padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom)); margin: 0 -1rem; background: rgba(255, 253, 248, .97); border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 16px rgba(90, 52, 10, .08); }
  .checkout-bar__total { margin: 0; font-size: .9375rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
  .checkout-bar__total strong { font-size: 1.15rem; color: var(--honey-900); }
  .checkout-bar__link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .25rem; font-weight: 600; white-space: nowrap; }
  html:has(.checkout-bar) { scroll-padding-bottom: 5.5rem; }
}
.checkout .panel h2 { margin-bottom: 1rem; }
.ship-quote { margin: 1rem 0 .5rem; }
.ship-quote label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .3rem; }
.ship-options { border: 0; padding: 0; margin: .9rem 0 0; display: grid; gap: .5rem; min-width: 0; }
.ship-options legend { padding: 0; margin-bottom: .3rem; }
.ship-option, .pay-method { display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.ship-option:hover, .pay-method:hover { border-color: var(--honey-700); background: var(--honey-50); }
.ship-option:has(input:checked), .pay-method:has(input:checked) { border-color: var(--honey-700); background: var(--honey-50); box-shadow: inset 0 0 0 1px var(--honey-700); }
.ship-option:has(:focus-visible), .pay-method:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.ship-option input, .pay-method input { width: 1.25rem; height: 1.25rem; min-height: 0; flex: none; margin: 0; }
.ship-option input:focus-visible, .pay-method input:focus-visible { outline: none; }
.ship-option__name { flex: 1; display: flex; flex-direction: column; }
.pay-methods { display: grid; gap: .5rem; margin-bottom: 1rem; }
#ship-options { margin-top: .25rem; }
.loading { display: none; }
.htmx-request.loading, .htmx-request .loading { display: inline-flex; align-items: center; margin-top: .5rem; }
.htmx-request .loading::before, .spinner::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5rem; border: 2px solid var(--honey-300); border-top-color: var(--honey-900); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { --ic: var(--ic-cart); text-align: center; padding: 3rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.empty::before { width: 56px; height: 56px; color: var(--honey-500); margin-bottom: .75rem; }
.empty h2 { margin-bottom: .25rem; }
.empty p { margin: 0 0 .75rem; }
.panel.empty { border-style: dashed; box-shadow: none; background: var(--honey-50); }
.center { text-align: center; max-width: 560px; margin: 2rem auto 3rem; }
.center .lead { margin-inline: auto; }
.center .btn { margin-top: .5rem; }
.retry form { margin: 0; }
.retry { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.retry p { margin: 0; flex-basis: 100%; }
/* Pagamento: PIX (QR code), cartão (campos seguros) e desafio do banco */
.pay h1 { margin-bottom: .25em; }
.pay__total { display: flex; flex-direction: column; align-items: center; margin: 0 0 .25rem; }
.pay__total strong { font: 700 1.75rem/1.15 var(--sans); font-variant-numeric: tabular-nums; color: var(--honey-900); }
.pay h2 { margin: 1.25rem 0 .6rem; }
.pay__steps { text-align: left; max-width: 44ch; margin: 0 auto 1.25rem; padding-left: 1.4rem; color: var(--ink-soft); }
.pay__steps li + li { margin-top: .3rem; }
.pix__qr { margin: 0 auto 1.25rem; padding: .75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); width: min(264px, 100%); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.pix__copy { display: grid; gap: .5rem; text-align: left; max-width: 420px; margin: 0 auto; }
.pix__copy label { font-weight: 600; font-size: .9rem; }
.pix__copy input { font: .8rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-soft); text-overflow: ellipsis; }
.pix__copy .btn { margin: 0; width: 100%; }
.pix__copied { min-height: 1.4em; margin: 0; color: var(--ok); font-weight: 600; text-align: center; }
.pix__timer { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; align-items: center; margin: .75rem 0; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pix__timer::before { --ic: var(--ic-clock); width: 1.1em; height: 1.1em; }
.pix__timer strong { color: var(--honey-900); }
.pix--expired { margin-top: 1rem; }
.pix.is-expired .pix__qr, .pix.is-expired .pix__copy, .pix.is-expired .pay__steps { display: none; }
.pix__expired[hidden], .cardform__alert[hidden], .cardform .error[hidden], .cardform .field[hidden] { display: none; }
.cardform { text-align: left; }
.cardform h2 { text-align: center; }
.cardform__alert { margin: 0 0 1rem; }
.cardform__alert:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cardform__fields { margin-bottom: 1rem; grid-template-columns: 1fr 1fr; } /* validade e CVV lado a lado também a 390px */
.cardform .field > label { font-size: .9rem; font-weight: 600; }
.sf { min-height: var(--tap); padding: 0 .5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; transition: border-color .15s var(--ease); }
.sf:hover { border-color: var(--honey-700); }
.sf:focus-within { border-color: var(--honey-700); outline: 2px solid var(--focus); box-shadow: 0 0 0 4px rgba(225, 154, 18, .25); }
.sf iframe { width: 100%; height: 42px; border: 0; display: block; }
.field--error .sf { border: 2px solid var(--err); padding: 0 calc(.5rem - 1px); }
.cardform__terms { margin: 0 0 .5rem; max-width: 62ch; }
.cardform .btn--block { margin-top: .5rem; }
.pay__wait { margin-top: 1rem; }
.challenge__frame { display: block; width: 100%; max-width: 420px; height: 480px; margin: 1rem auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
@media (max-width: 480px) { .challenge__frame { height: 560px; } }
@media (prefers-reduced-motion: reduce) { .sf { transition: none; } }
.badge--muted { background: var(--honey-50); border: 1px solid var(--line); color: var(--muted); font-weight: 600; white-space: normal; }
.badge--muted::before { display: none; }

/* Mensagens */
.messages { margin-top: 1rem; }
.msg { --ic: var(--ic-info); display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--honey-100); color: var(--honey-900); margin: .5rem 0; }
.msg::before { margin-top: .2em; width: 1.1em; height: 1.1em; }
.msg--error { --ic: var(--ic-alert); background: #fbe6e4; color: #8f1d17; }
.msg--success { --ic: var(--ic-check); background: #e3f3e5; color: #21592b; }
.msg a { color: inherit; font-weight: 600; }
p.msg { margin-top: 0; }

/* Pedido e acompanhamento */
.badge { --ic: var(--ic-clock); display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .85rem; line-height: 1.2; padding: .35rem .75rem; border-radius: 999px; background: var(--honey-100); color: var(--honey-900); white-space: nowrap; }
.badge--paid, .badge--preparing { --ic: var(--ic-dot); background: #fde9bd; }
.badge--shipped { --ic: var(--ic-arrow); background: #e1ecfa; color: #1d4d94; }
.badge--delivered { --ic: var(--ic-check); background: #e3f3e5; color: var(--ok); }
.badge--canceled, .badge--expired { --ic: var(--ic-x); background: #f6e1df; color: var(--err); }
.badge--refunded { --ic: var(--ic-undo); background: #f1e8f7; color: #6b3a8c; }
.order-head h1 { margin: .3em 0 .1em; }
.order-head__date { margin: 0 0 1.25rem; }
.order { align-items: start; }
.order__main, .order__side { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.status-head { margin-bottom: .75rem; }
.status-head + p { margin-top: 0; }
.subhead { font: 700 .75rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.5rem 0 .5rem; }
.addr { font-style: normal; }
.kv { margin: 0 0 1rem; display: grid; gap: .35rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.track { background: var(--honey-50); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; }
.track p { margin: 0; }
.track__code { font: 700 1.3rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; margin: .1rem 0 .2rem; overflow-wrap: anywhere; }
.cta { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; background: var(--honey-50); }
.cta p { margin: .1rem 0 .7rem; }

/* Linha do tempo (vertical) */
.tl { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.tl__step { position: relative; display: flex; gap: .85rem; padding-bottom: 1.3rem; }
.tl__step:last-child { padding-bottom: 0; }
.tl__step::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.tl__step:last-child::before { display: none; }
.tl__step--done::before { background: var(--ok); }
.tl__dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; display: grid; place-items: center; color: inherit; }
.tl__dot::before { display: none; width: 14px; height: 14px; }
.tl__step--done .tl__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl__step--done .tl__dot::before { display: block; --ic: var(--ic-check); }
.tl__step--current .tl__dot { border-color: var(--honey-700); background: var(--honey-100); color: var(--honey-700); box-shadow: 0 0 0 4px rgba(225, 154, 18, .25); }
.tl__step--current .tl__dot::before { display: block; --ic: var(--ic-dot); }
.tl__step--terminal .tl__dot { background: var(--err); border-color: var(--err); color: #fff; box-shadow: none; }
.tl__step--terminal .tl__dot::before { display: block; --ic: var(--ic-x); }
.tl__step--terminal .tl__label { color: var(--err); }
.tl__text { display: flex; flex-direction: column; min-width: 0; }
.tl__label { line-height: 1.3; }
.tl__step--todo .tl__label { color: var(--muted); font-weight: 600; }
.tl__when { color: var(--muted); }
.tl__step--current .tl__when { color: var(--honey-700); font-weight: 600; }

/* Progresso compacto (cartões de pedido) */
.progress__bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.progress__seg { height: 8px; border-radius: 4px; background: var(--line); }
.progress__seg--done { background: var(--ok); }
.progress__seg--current { background: var(--honey-500); }
.progress__label { margin: .5rem 0 0; }

/* Minha conta */
.acct-nav { display: flex; gap: .25rem; margin: .5rem 0 1.5rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.acct-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .7rem; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: background-color .15s var(--ease); }
.acct-nav a:hover { background: var(--honey-50); color: var(--honey-900); }
.acct-nav a.is-on { border-bottom-color: var(--honey-500); color: var(--honey-900); }
.acct-hello { margin: 0 0 .5rem; }
.acct-section { margin-bottom: 2rem; }
.ocards { display: grid; gap: .9rem; }
.ocard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: .7rem; box-shadow: var(--shadow); }
.ocard--active { border: 2px solid var(--honey-500); padding: calc(1.1rem - 1px) calc(1.25rem - 1px); background: linear-gradient(180deg, var(--honey-50), #fff 70%); }
.ocard__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .4rem .75rem; }
.ocard__head p { margin: 0; }
.ocard__title { white-space: nowrap; }
.ocard__title a { color: var(--honey-900); text-decoration: none; }
.ocard__title a:hover { text-decoration: underline; }
.ocard__items { margin: 0; color: var(--muted); }
.ocard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.ocard__total { font-size: 1.15rem; color: var(--honey-900); }
.ocard__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ocard__actions .btn { white-space: nowrap; }
@media (max-width: 520px) {
  .ocard__foot { flex-direction: column; align-items: stretch; }
  .ocard__actions .btn { flex: 1; }
}
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.form-card { max-width: 520px; }
.form-card form { display: grid; gap: 1.1rem; }
.form-card form .btn--block { margin-top: .25rem; }
.auth { margin: 2rem auto 3rem; }
.auth h1 { margin-top: 0; }
.auth > .muted { margin-top: 0; }
.auth__links, .auth__alt { text-align: center; }
.auth__links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.25rem; margin: 1.25rem 0 .25rem; }
.auth__alt { margin: .75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.auth__links a, .auth__alt a { display: inline-block; padding: .5rem .25rem; }

/* Rodapé */
.closing { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin: 0 0 3rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 22px; background: var(--honey-100); }
.closing__title { margin: 0 0 .3rem; font: 700 clamp(1.25rem, 2.6vw, 1.6rem)/1.2 var(--serif); color: var(--honey-900); }
.closing__text { margin: 0; color: var(--ink-soft); }
.footer { border-top: 1px solid var(--line); background: var(--honey-50); padding: 1.75rem 0; margin-top: 2rem; }
.footer__inner p { margin: .2rem 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Preço por forma de pagamento: o do cartão é o principal; o do PIX vem logo abaixo, em verde de "entrou". */
.price-stack { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; }
/* Preço "de" riscado em cima, preço atual embaixo */
.price-old { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card .price-old { margin-top: auto; padding-top: .5rem; }
.card .price-old + .price { margin-top: 0; padding-top: 0; }
.price-stack .price-pix { text-align: right; }
.price-pix { margin: 0; color: var(--ok); font-weight: 600; font-size: .875rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.price-pix strong { font-weight: 700; }
.card .price + .price-pix { margin-top: .1rem; }
.price-pix--summary { margin: .15rem 0 .5rem; }
.summary__row--pix { color: var(--ok); }
.summary__row--pix strong { font-weight: 700; }
.summary__row--pix .price-pix { display: block; font-weight: 600; }
.line__info .price-pix { margin-top: .1rem; }
.pay-method__name { flex: 1; font-weight: 600; }
.pay-method__price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--honey-900); white-space: nowrap; }
.order-kind { margin: .6rem 0 0; color: var(--ink-soft); }
.order-kind--center { margin-top: 0; }

/* ===== Estornos no pedido do cliente (X2) ===== */
.summary__row--refund { color: var(--ink-soft); }
.refunded { margin-top: .9rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); background: var(--honey-50, #fff8eb); display: grid; gap: .35rem; }
.refunded__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin: 0; font-variant-numeric: tabular-nums; }
.refunded__amount { white-space: nowrap; }
.ocard__badges { display: inline-flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.ocard__refund { display: block; font-weight: 400; color: var(--muted); }
/* ===== fim X2 ===== */
