/* ─────────────────────────────────────────
   loja.css — Preço nos produtos, carrinho e combos
   Fazenda dos Pinheiros
───────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Preço e tamanho no card ── */
.buy-box {
  margin-bottom: 18px;
}

.size-picker {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 320px;
}

.size-chip {
  position: relative;
  cursor: pointer;
}

.size-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.size-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 4px;
  white-space: nowrap;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition:
    border-color var(--duration) ease,
    background var(--duration) ease,
    color var(--duration) ease;
}

.size-chip:hover span {
  border-color: var(--border-gold-strong);
  color: var(--parchment);
}

.size-chip input:checked + span {
  background: rgba(200, 152, 42, 0.16);
  border-color: var(--amber);
  color: var(--amber);
}

.size-chip input:focus-visible + span {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

.size-single {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.buy-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.buy-price-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--parchment);
}

.buy-price-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}

.buy-provisorio {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--amber);
}

.btn-add {
  gap: 10px;
  text-align: center;
  letter-spacing: 0.1em;
  padding-left: 16px;
  padding-right: 16px;
}

/* ── Combos: mosaico de fotos ── */
.combo-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  height: 100%;
  min-height: 240px;
}

.combo-mosaic img {
  min-width: 0;
}

.combo-mosaic--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Botão do carrinho no menu ── */
.cart-toggle {
  appearance: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-gold-mid);
  background: rgba(200, 152, 42, 0.08);
  color: var(--amber);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color var(--duration) ease,
    background var(--duration) ease;
}

.cart-toggle:hover {
  border-color: var(--border-gold-strong);
  background: rgba(200, 152, 42, 0.16);
}

.cart-toggle[hidden] {
  display: none;
}

.btn-add .cart-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cart-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--moss);
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.cart-count[hidden] {
  display: none;
}

/* ── Painel lateral ── */
body.cart-open {
  overflow: hidden;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(8, 5, 16, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-overlay[hidden] {
  display: none;
}

.cart-overlay.open {
  opacity: 1;
}

.cart-panel {
  width: min(420px, 100%);
  height: 100%;
  background: var(--ink-mid);
  border-left: 1px solid var(--border-gold-mid);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(24px);
  transition: transform 0.3s var(--ease-out);
  padding: 0 24px calc(24px + env(safe-area-inset-bottom));
}

.cart-overlay.open .cart-panel {
  transform: translateX(0);
}

.cart-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--ink-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--border-gold);
}

.cart-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-empty {
  padding: 32px 0 8px;
  color: var(--text-muted);
}

.cart-empty[hidden],
.cart-summary[hidden],
.cart-notice[hidden] {
  display: none;
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "info total"
    "stepper remove";
  gap: 12px 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-white);
}

.cart-item-info {
  grid-area: info;
  min-width: 0;
}

.cart-item-name {
  font-weight: 500;
  color: var(--parchment);
  line-height: 1.35;
}

.cart-item-variant {
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cart-item-total {
  grid-area: total;
  align-self: start;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--parchment);
  white-space: nowrap;
}

.cart-stepper {
  grid-area: stepper;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
}

.cart-step {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--amber);
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-step:hover:not(:disabled) {
  background: rgba(200, 152, 42, 0.14);
}

.cart-step:disabled {
  opacity: 0.35;
  cursor: default;
}

.cart-qty {
  min-width: 32px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--parchment);
}

.cart-remove {
  grid-area: remove;
  justify-self: end;
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cart-remove:hover {
  color: var(--parchment);
}

.cart-summary {
  padding-top: 18px;
}

.cart-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  color: var(--text-secondary);
}

.cart-lines dd {
  margin: 0;
}

.cart-lines .cart-free {
  color: var(--lavender);
}

.cart-lines .cart-total-line {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-gold);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--parchment);
}

.cart-total-line dd {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-note {
  margin: 10px 0 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cart-checkout {
  width: 100%;
}

.cart-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-gold-mid);
  border-radius: var(--radius-sm);
  background: rgba(200, 152, 42, 0.1);
  color: var(--amber);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cart-continue {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px 20px;
  border: 1px solid var(--border-gold-mid);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-continue:hover {
  background: rgba(200, 152, 42, 0.14);
}

/* ── Vendedora no rodapé (Decreto 7.962/2013) ── */
.footer-seller {
  max-width: 720px;
  margin: 0 auto 18px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-faint);
}

.footer-seller a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Aviso do ambiente de teste (só no zip de teste) ── */
.test-banner {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 1050;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #b3261e;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ── Celular ── */
@media (max-width: 700px) {
  .nav-brand {
    margin-right: 104px;
  }
  .cart-toggle {
    width: 36px;
    height: 36px;
  }
  .cart-panel {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-overlay,
  .cart-panel {
    transition: none;
  }
}
