/* Alma Bela — loja pública · mobile-first */
.shop-body {
  --ab-cream: #f3ebe3;
  --ab-cream-2: #ebe1d6;
  --ab-paper: #faf6f1;
  --ab-choc: #3c2a22;
  --ab-choc-soft: #5a4338;
  --ab-line: #d9cfc4;
  --ab-muted: #7a6a60;
  --ab-accent: #8b6b5a;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --ink: var(--ab-choc);
  --muted: var(--ab-muted);
  --line: var(--ab-line);
  --rose: var(--ab-accent);
  --rose-deep: var(--ab-choc-soft);
  --bg: var(--ab-cream);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottom-nav-h: 64px;
  --shop-pad: 14px;
  font-family: var(--font-body);
  color: var(--ab-choc);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(60, 42, 34, .08);
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
  background:
    radial-gradient(900px 480px at 50% -8%, #fffaf5 0%, transparent 55%),
    linear-gradient(180deg, var(--ab-paper) 0%, var(--ab-cream) 45%, var(--ab-cream-2) 100%);
}

.shop-body img { max-width: 100%; height: auto; }
.shop-body button,
.shop-body a,
.shop-body .btn { touch-action: manipulation; }

.shop-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: calc(8px + var(--safe-top)) max(14px, var(--safe-right)) 8px max(14px, var(--safe-left));
  background: rgba(250, 246, 241, .94);
  border-bottom: 1px solid rgba(217, 207, 196, .9);
  backdrop-filter: blur(12px);
}
.shop-brand {
  display: flex; align-items: center;
  min-height: 44px;
  flex: 1;
  min-width: 0;
}
.shop-brand img {
  height: 40px; width: auto; max-width: 70vw;
  display: block; object-fit: contain;
}
.shop-nav {
  display: none; gap: 20px; margin-left: auto;
  font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.shop-nav a { padding: 8px 0; }
.shop-nav a:hover { color: var(--ab-accent); }
.shop-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.shop-account-link {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center;
}
.shop-bag {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ab-choc); color: #fff; position: relative;
}
.shop-bag em {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--ab-accent); color: #fff; font-size: 0.68rem;
  font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}
.shop-account-kpis {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px;
}
.shop-account-kpis .panel { margin: 0; text-align: center; }
.shop-account-kpis strong { font-size: 1.25rem; display: block; margin-top: 4px; }
.shop-credit-box {
  margin: 0 0 14px; padding: 12px; border: 1px solid var(--ab-line);
  border-radius: 10px; background: #fff;
}
.shop-credit-box label {
  display: block; font-weight: 600; margin-bottom: 6px;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
}
.shop-credit-box select {
  width: 100%; min-height: 48px; font-size: 16px;
  border-radius: 10px; border: 1px solid var(--ab-line); padding: 12px;
  background: #fff;
}
.shop-pay.is-disabled { opacity: .55; }
.shop-main {
  max-width: 1120px; margin: 0 auto;
  padding: 0 max(var(--shop-pad), var(--safe-left)) 28px max(var(--shop-pad), var(--safe-right));
}
.shop-body .panel {
  padding: 14px;
  border-radius: 12px;
}
.shop-body .field input,
.shop-body .field select,
.shop-body .field textarea {
  font-size: 16px;
  min-height: 48px;
}

/* Hero */
.shop-hero {
  margin: 0 calc(-1 * max(var(--shop-pad), var(--safe-left))) 4px calc(-1 * max(var(--shop-pad), var(--safe-right)));
  min-height: min(78dvh, 640px);
  display: grid; place-items: center;
  padding: 20px max(var(--shop-pad), var(--safe-left)) 28px max(var(--shop-pad), var(--safe-right));
  background:
    radial-gradient(circle at 50% 35%, #fff8f1 0%, transparent 52%),
    linear-gradient(180deg, #f7f0e8 0%, #ebe1d6 100%);
  animation: shopFade .8s ease both;
}
.shop-hero-stage {
  width: min(100%, 520px);
  text-align: center;
  display: grid; gap: 14px; justify-items: center;
}
.shop-hero-logo {
  width: min(100%, 300px);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(60, 42, 34, .08));
  animation: shopRise .9s ease both;
}
.shop-hero-motto {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 4.2vw, 1.45rem);
  color: var(--ab-choc-soft);
  max-width: 18ch;
  line-height: 1.35;
}
.shop-cta {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  width: 100%;
}
.shop-cta .btn,
.shop-cta .btn-ghost,
.shop-cta .btn-primary {
  flex: 1 1 auto;
  min-width: min(100%, 148px);
  justify-content: center;
  text-align: center;
}

.shop-body .btn,
.shop-body .btn-primary,
.shop-body .btn-ghost,
.shop-body .btn-danger,
.shop-body .btn-soft {
  min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-body .btn-primary {
  background: var(--ab-choc); border-color: var(--ab-choc); color: #fff;
  border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.75rem; font-weight: 600; padding: 12px 18px;
}
.shop-body .btn-primary:hover { background: var(--ab-choc-soft); }
.shop-body .btn-block { width: 100%; }
.btn-ghost {
  background: transparent; border: 1px solid var(--ab-choc); color: var(--ab-choc);
  border-radius: 999px; min-height: 46px; padding: 10px 16px;
  font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer;
}
.btn-ghost:hover { background: rgba(60,42,34,.06); }

.shop-kicker {
  margin: 0 0 8px; font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ab-accent); font-weight: 600;
}
.shop-section { padding: 22px 0 6px; }
.shop-section-head { margin-bottom: 14px; text-align: center; padding: 0 4px; }
.shop-section-head h1, .shop-section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.75rem, 7vw, 2.8rem);
  margin: 0; line-height: 1.05; font-weight: 600; color: var(--ab-choc);
}
.shop-section-head p { margin: 8px 0 0; color: var(--ab-muted); font-size: .92rem; line-height: 1.45; }

.shop-cats {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-cats::-webkit-scrollbar { display: none; }
.shop-cat {
  flex: 0 0 auto; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--ab-line); background: rgba(255,255,255,.55);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em;
  scroll-snap-align: start; min-height: 44px;
  display: inline-flex; align-items: center;
}
.shop-cat:hover { border-color: var(--ab-choc); color: var(--ab-choc); }

.shop-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.shop-card {
  display: block; border-radius: 4px; overflow: hidden;
  background: rgba(255,255,255,.65); border: 1px solid rgba(217,207,196,.95);
  transition: transform .25s ease, box-shadow .25s ease;
}
.shop-card:active { transform: scale(.985); }
.shop-card-media {
  aspect-ratio: 4/5; position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,.25), rgba(60,42,34,.18)),
    linear-gradient(145deg, #d8c4b4, #8b6b5a 55%, #3c2a22);
}
.shop-card-media img,
.shop-product-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.shop-card-media.has-photo::after,
.shop-product-media.has-photo::after { display: none; }
.shop-card-media::after {
  content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 3.2rem; color: rgba(255,255,255,.5);
}
.shop-badge {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  background: var(--ab-choc); color: #fff; font-size: .6rem; font-weight: 700;
  padding: 5px 7px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase;
}
.shop-badge-soft { background: rgba(255,255,255,.92); color: var(--ab-choc); }
.shop-card-body { padding: 10px 8px 12px; display: grid; gap: 3px; text-align: center; }
.shop-card-cat { font-size: .62rem; color: var(--ab-muted); text-transform: uppercase; letter-spacing: .08em; }
.shop-card-body strong {
  font-size: .82rem; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-body em { font-style: normal; font-weight: 700; color: var(--ab-choc-soft); font-size: .88rem; }

.shop-promo {
  margin: 28px 0; padding: 24px 16px; border-radius: 8px; color: var(--ab-choc); text-align: center;
  background:
    radial-gradient(circle at 50% 0%, #fffaf5 0%, transparent 55%),
    linear-gradient(180deg, #f7f0e8, #ebe1d6);
  border: 1px solid var(--ab-line);
}
.shop-promo-mark { width: min(200px, 68%); height: auto; margin: 0 auto 12px; display: block; }
.shop-promo h2 {
  font-family: var(--font-display); font-size: clamp(1.55rem, 6vw, 2.4rem);
  margin: 0 0 8px; font-weight: 600;
}
.shop-promo p { opacity: .9; max-width: 42ch; margin: 0 auto 14px; color: var(--ab-muted); font-size: .92rem; }
.shop-promo .btn-primary { background: var(--ab-choc); color: #fff; border-color: var(--ab-choc); }
.shop-promo .btn-ghost { border-color: var(--ab-choc); color: var(--ab-choc); }

.shop-filters {
  display: grid; gap: 8px; margin-bottom: 16px; grid-template-columns: 1fr;
}
.shop-filters input,
.shop-filters select,
.shop-buy select,
.shop-buy input,
.shop-checkout-form input,
.shop-checkout-form textarea,
.shop-cart-actions input,
.shop-pix textarea {
  font-size: 16px; /* evita zoom automático no iOS */
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--ab-line);
  padding: 12px 14px;
  background: #fff;
  font-family: inherit;
}
.shop-filters select,
.shop-buy select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ab-choc) 50%), linear-gradient(135deg, var(--ab-choc) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 36px; }

.shop-product { display: grid; gap: 16px; padding: 12px 0 96px; }
.shop-gallery { display: grid; gap: 10px; }
.shop-product-media {
  border-radius: 8px; min-height: 280px; position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,.15), rgba(60,42,34,.3)),
    linear-gradient(145deg, #d8c4b4, #8b6b5a 55%, #3c2a22);
}
.shop-product-media.has-photo { min-height: 0; aspect-ratio: 4/5; max-height: 72dvh; }
.shop-product-media::after {
  content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 5rem; color: rgba(255,255,255,.45);
}
.shop-thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-thumbs::-webkit-scrollbar { display: none; }
.shop-thumb {
  flex: 0 0 64px; width: 64px; height: 64px;
  border: 2px solid transparent; border-radius: 6px; overflow: hidden; padding: 0;
  background: #fff; cursor: pointer; scroll-snap-align: start;
}
.shop-thumb.active, .shop-thumb:hover { border-color: var(--ab-choc); }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-product-info h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem, 7vw, 3.2rem);
  margin: 0 0 8px; line-height: .95; font-weight: 600;
}
.shop-price { font-size: 1.2rem; font-weight: 700; color: var(--ab-choc-soft); margin: 0 0 12px; }
.shop-desc { color: var(--ab-muted); line-height: 1.55; font-size: .95rem; }
.shop-buy label {
  display: block; font-weight: 600; margin: 12px 0 6px;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
}

/* CTA sticky no produto (mobile) */
.shop-add-inline { display: none; }
.shop-buy-sticky {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  z-index: 45;
  padding: 10px max(14px, var(--safe-left)) 10px max(14px, var(--safe-right));
  background: rgba(250, 246, 241, .96);
  border-top: 1px solid var(--ab-line);
  backdrop-filter: blur(10px);
  transition: transform .25s ease, opacity .25s ease;
}
.shop-buy-sticky .btn { width: 100%; margin: 0; }
.shop-buy-sticky.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }

.shop-cart-item {
  display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--ab-line);
}
.shop-cart-actions {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
}
.shop-cart-actions form { display: contents; }
.shop-cart-actions input[type=number] { min-width: 0; text-align: center; }
.shop-cart-actions .btn,
.shop-cart-actions .btn-ghost,
.shop-cart-actions .btn-danger {
  min-height: 48px; padding: 8px 12px; font-size: .72rem; white-space: nowrap;
}
.shop-cart-summary {
  margin-top: 16px; padding: 16px; border-radius: 10px; background: rgba(255,255,255,.85);
  border: 1px solid var(--ab-line);
}
.shop-cart-summary > div {
  display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 1.05rem;
}
.shop-cart-summary.shop-sticky-cta {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
  z-index: 30;
  box-shadow: 0 -8px 30px rgba(60,42,34,.08);
}

.shop-checkout-grid { display: grid; gap: 14px; }
.shop-checkout-form .panel,
.shop-checkout .panel { overflow: hidden; }
.shop-pay-options { display: grid; gap: 8px; margin-bottom: 12px; }
.shop-pay {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--ab-line); border-radius: 10px; background: #fff; cursor: pointer;
  min-height: 56px;
}
.shop-pay input { margin-top: 4px; width: 18px; height: 18px; }
.shop-pay strong { display: block; }
.shop-pay small { color: var(--ab-muted); display: block; margin-top: 2px; line-height: 1.35; }
.shop-card-fields { margin-bottom: 12px; }
.shop-mini-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--ab-line); font-size: .9rem;
}
.shop-mini-total {
  display: flex; justify-content: space-between; margin-top: 12px; font-size: 1.1rem;
}
.shop-pix textarea {
  width: 100%; margin: 8px 0 12px; min-height: 96px; resize: vertical;
}
.shop-pix .actions {
  display: grid; grid-template-columns: 1fr; gap: 8px;
}
.shop-pix .actions form { display: grid; }

.shop-footer {
  max-width: 720px; margin: 0 auto;
  padding: 28px max(var(--shop-pad), var(--safe-left)) calc(24px + var(--bottom-nav-h) + var(--safe-bottom)) max(var(--shop-pad), var(--safe-right));
  text-align: center; color: var(--ab-muted);
}
.shop-footer-logo { width: min(220px, 72%); height: auto; margin: 0 auto 10px; display: block; }
.shop-footer-tag {
  margin: 0; letter-spacing: 0.18em; text-transform: uppercase;
  font-size: 0.68rem; font-weight: 600; color: var(--ab-choc);
}
.shop-footer-motto {
  font-family: var(--font-display); font-style: italic; margin: 10px 0 0;
  color: var(--ab-choc-soft); font-size: 1.08rem;
}
.shop-footer-links {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  margin: 16px 0; font-weight: 600; color: var(--ab-choc);
  font-size: 0.8rem; letter-spacing: 0.04em;
}
.shop-footer-links a { padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center; }

.shop-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(250,246,241,.97); border-top: 1px solid var(--ab-line);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  backdrop-filter: blur(10px);
}
.shop-bottom a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .62rem; font-weight: 700; color: var(--ab-muted);
  padding: 8px 2px; min-height: 52px;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.shop-bottom a.active, .shop-bottom a:hover { color: var(--ab-choc); }
.shop-bottom span { font-size: 1.15rem; line-height: 1; text-transform: none; letter-spacing: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@keyframes shopFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shopRise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 380px) {
  .shop-card-body { padding: 8px 6px 10px; }
  .shop-card-body strong { font-size: .76rem; }
  .shop-hero-logo { width: min(100%, 260px); }
  .shop-cart-actions { grid-template-columns: 1fr 1fr; }
  .shop-cart-actions input[type=number] { grid-column: 1 / -1; }
}

@media (min-width: 600px) {
  .shop-account-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 760px) {
  .shop-body { --shop-pad: 18px; }
  .shop-brand img { height: 56px; }
  .shop-hero { min-height: min(86dvh, 760px); }
  .shop-hero-logo { width: min(100%, 440px); }
  .shop-hero-motto { max-width: none; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .shop-card-body strong { font-size: .95rem; }
  .shop-filters { grid-template-columns: 1.4fr 1fr 1fr auto; align-items: center; }
  .shop-product { grid-template-columns: 1fr 1fr; align-items: start; padding-bottom: 30px; }
  .shop-buy-sticky { display: none; }
  .shop-add-inline { display: inline-flex; }
  .shop-checkout-grid { grid-template-columns: 1.3fr .7fr; align-items: start; }
  .shop-nav { display: flex; }
  .shop-account-link { display: none; }
  .shop-cart-item { grid-template-columns: 1fr auto; align-items: center; }
  .shop-cart-actions { display: flex; flex-wrap: wrap; }
  .shop-cart-actions form { display: flex; gap: 8px; align-items: center; }
  .shop-cart-summary.shop-sticky-cta { position: static; box-shadow: none; }
  .shop-pix .actions { grid-template-columns: auto auto; justify-content: start; }
  .shop-cta .btn,
  .shop-cta .btn-ghost,
  .shop-cta .btn-primary { flex: 0 0 auto; }
  .shop-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); overflow: visible; }
  .shop-thumb { flex: none; width: auto; height: auto; aspect-ratio: 1; }
}

@media (min-width: 980px) {
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-bottom { display: none; }
  .shop-body { padding-bottom: 24px; }
  .shop-footer { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-hero, .shop-hero-logo, .shop-card { animation: none; transition: none; }
}
