/* Loja digital — usa os tokens e o cabeçalho/rodapé de styles.css */
.store-main { padding-top: calc(var(--header-h) + clamp(28px, 5vw, 64px)); }
.store-wrap { padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2)) var(--section-y); }

.store-hero { padding-bottom: clamp(8px, 2vw, 24px); }
.store-hero h1 { font-size: clamp(2.5rem, 6vw, 5.4rem); margin-top: 18px; }
.store-hero h1 span { color: var(--mustard); }
.store-hero .section-note { max-width: 46ch; color: var(--muted); }

.store-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: clamp(24px, 3vw, 40px); }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(24px, 3vw, 40px) clamp(18px, 2.4vw, 32px); }
.store-card { display: flex; flex-direction: column; min-width: 0; color: inherit; }
.store-card-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.store-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); -webkit-user-drag: none; user-select: none; }
.store-card:hover .store-card-media img, .store-card:focus-visible .store-card-media img { transform: scale(1.04); }
.store-kind-tag { position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(10, 22, 27, .78); backdrop-filter: blur(6px); font: 700 .66rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.store-card-body { padding-top: 16px; display: grid; gap: 6px; }
.store-card-title { font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
.store-card-formats { font-size: .8rem; color: var(--muted); }
.store-card-price { margin-top: 4px; font: 700 .95rem/1.2 var(--body); color: var(--mustard); }
.store-card-price small { font-weight: 500; color: var(--muted); margin-right: 4px; }

.store-state { padding: clamp(40px, 8vw, 96px) 0; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.store-state strong { font: 400 clamp(1.4rem, 3vw, 2rem)/1.1 var(--site-display-font); text-transform: uppercase; color: var(--cream); }

/* Página de produto */
.product-back { display: inline-flex; gap: 8px; margin-bottom: 24px; font: 600 .75rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.product-back:hover { color: var(--mustard); }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.product-gallery { display: grid; gap: 12px; }
.product-stage { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.product-stage img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.product-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.product-thumbs button { width: 76px; aspect-ratio: 4 / 3; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--ink-2); opacity: .7; }
.product-thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--mustard); }
.product-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { display: grid; gap: 18px; }
.product-info h1 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
.product-description { color: #D6D2C4; white-space: pre-line; max-width: 58ch; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.product-meta span { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .78rem; color: var(--muted); }

.license-list { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.license-list legend { padding: 0; margin-bottom: 10px; font: 600 .75rem/1.3 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--mustard); }
.license-option { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: start; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .2s, background-color .2s; }
.license-option:hover { border-color: var(--cream); }
.license-option:has(input:checked) { border-color: var(--mustard); background: rgba(192, 146, 77, .09); }
.license-option input { margin-top: 4px; accent-color: var(--mustard); }
.license-option strong { font-size: .95rem; }
.license-option .license-price { font: 700 1.05rem/1.2 var(--body); color: var(--mustard); }
.license-option p { grid-column: 2 / -1; font-size: .82rem; color: var(--muted); line-height: 1.5; }

.buy-box { display: grid; gap: 10px; }
.buy-button { justify-content: center; border: 0; width: 100%; padding: 18px 28px; }
.buy-button[disabled] { opacity: .55; cursor: not-allowed; background: var(--sage); }
.buy-button[disabled]:hover { background: var(--sage); color: #fff; }
.buy-note { font-size: .8rem; color: var(--muted); }
.product-trust { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.product-trust li { display: flex; gap: 10px; }
.product-trust li::before { content: "✓"; color: var(--mustard); font-weight: 700; }

@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .store-card-media img { transition: none; }
}


/* v20.0 — dados de pagamento publicados pelo administrador, somente quando habilitados. */
.store-payment-info { display:grid; gap:12px; margin-top:18px; padding:clamp(18px,3vw,26px); border:1px solid rgba(192,146,77,.45); border-radius:var(--radius); background:rgba(192,146,77,.06); }
.store-payment-info h2 { font:600 1rem/1.25 var(--body); color:var(--mustard); margin:0; }
.store-payment-intro,.store-payment-delivery-note,.store-payment-instructions { color:var(--muted); font-size:.84rem; line-height:1.55; margin:0; white-space:pre-line; }
.store-payment-row { display:grid; grid-template-columns:minmax(105px,.6fr) minmax(0,1.4fr); gap:6px 14px; align-items:start; padding:10px 0; border-bottom:1px solid var(--line); }
.store-payment-label { color:var(--muted); font-size:.78rem; }
.store-payment-value { min-width:0; overflow-wrap:anywhere; color:var(--cream); font-size:.88rem; font-weight:650; }
.store-pix-row { grid-template-columns:minmax(105px,.6fr) minmax(0,1.4fr); }
.store-copy-pix { grid-column:2; justify-self:start; border:1px solid rgba(192,146,77,.65); border-radius:999px; background:transparent; color:var(--mustard); padding:7px 12px; font:700 .75rem/1.2 var(--body); cursor:pointer; }
.store-copy-pix:hover { background:rgba(192,146,77,.12); }
.store-copy-status { grid-column:2; color:var(--muted); font-size:.74rem; }
.store-payment-delivery-note { padding-top:8px; border-top:1px solid var(--line); }
@media (max-width:520px) { .store-payment-row,.store-pix-row { grid-template-columns:1fr; gap:4px; } .store-copy-pix,.store-copy-status { grid-column:1; } }

/* v20.1 — checkout Mercado Pago incorporado à página do produto. */
.store-checkout-panel { display:grid; gap:16px; margin-top:18px; padding:clamp(18px,3vw,26px); border:1px solid rgba(192,146,77,.55); border-radius:var(--radius); background:rgba(10,22,27,.88); scroll-margin-top:calc(var(--header-h) + 20px); }
.store-checkout-panel[hidden] { display:none !important; }
.store-checkout-panel h2 { margin:0; font:600 clamp(1.2rem,2vw,1.55rem)/1.2 var(--body); color:var(--cream); }
.store-checkout-intro,.store-checkout-status { margin:0; color:var(--muted); font-size:.86rem; line-height:1.55; }
.store-checkout-status.success { color:#8fe1b2; }
.store-checkout-status.error { color:#ffb8a8; }
.store-payment-brick { min-width:0; background:#fff; color:#111; border-radius:12px; padding:clamp(8px,2vw,18px); }
.store-checkout-results { display:grid; gap:10px; }
.store-checkout-qr { display:grid; gap:12px; justify-items:start; }
.store-checkout-qr-image { width:min(240px,100%); height:auto; background:#fff; padding:10px; border-radius:10px; }
.store-checkout-pix-code { width:100%; max-width:100%; box-sizing:border-box; color:var(--cream); background:rgba(255,255,255,.05); border:1px solid var(--line-strong); border-radius:10px; padding:12px; resize:vertical; }
.store-checkout-panel .buy-button { justify-content:center; }
.store-payment-info { gap:12px; }
.store-payment-info .store-payment-row:not(.store-pix-row) { display:none !important; }
@media (max-width:520px) { .store-payment-brick { padding:6px; } }


/* Documento PIX mostrado apenas quando o Payment Brick não fornece CPF/CNPJ. */
.store-pix-document { margin: 1rem 0; padding: 1rem; border: 1px solid rgba(14,45,58,.24); border-radius: 12px; min-width: 0; }
.store-pix-document[hidden] { display: none !important; }
.store-pix-document legend { padding: 0 .35rem; font-weight: 700; }
.store-pix-document p { color: #52646a; font-size: .9rem; }
.store-pix-document label { display: grid; gap: .35rem; margin-top: .75rem; font-size: .9rem; font-weight: 600; }
.store-pix-document input, .store-pix-document select { box-sizing: border-box; width: 100%; min-height: 44px; padding: .7rem .8rem; border: 1px solid rgba(14,45,58,.34); border-radius: 8px; background: #fff; color: #0e2d3a; font: inherit; }
.store-recovery-email { margin: 1rem 0; padding: .85rem; border: 1px solid rgba(14,45,58,.18); border-radius: 10px; }
.store-recovery-email p { margin: .25rem 0 .75rem; }

/* v21.0 — ajustes de leitura, prévias e compra móvel */
.store-card-media { aspect-ratio: 4 / 5; }
.store-card-media img { object-fit: contain; padding: 8px; box-sizing: border-box; }
.store-card--vertical .store-card-media { aspect-ratio: 4 / 5; background: color-mix(in srgb, var(--cream) 7%, var(--ink-2)); }
.store-card--vertical .store-card-media img { object-fit: contain; padding: 10px; }
.store-card-price small:empty { display: none; margin: 0; }
.store-toolbar { align-items: flex-start; }
.store-search-sort { display: flex; flex: 0 1 420px; min-width: min(100%, 280px); gap: 10px; }
.store-search, .store-sort { min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 14px; background: var(--ink-2); color: var(--cream); font: 500 .84rem/1.2 var(--body); }
.store-search { flex: 1 1 220px; }
.store-sort { flex: 0 1 160px; }
.store-search::placeholder { color: var(--muted); }
.product-info h1.product-title { max-width: 17ch; font-size: clamp(2rem, 4vw, 3.65rem); line-height: .99; text-wrap: pretty; overflow-wrap: anywhere; }
.product-info h1.product-title--long { font-size: clamp(1.8rem, 3.1vw, 2.75rem); line-height: 1.04; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.product-description { overflow-wrap: anywhere; }
.license-list--single .license-fixed-label { display: block; margin-bottom: -2px; font: 600 .75rem/1.3 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--mustard); }
.license-option--fixed { cursor: default; grid-template-columns: minmax(0,1fr) auto; }
.license-option--fixed strong { grid-column: 1; }
.license-option--fixed .license-price { grid-column: 2; grid-row: 1; }
.license-option--fixed p { grid-column: 1 / -1; }
.product-sticky-buy { display: none; }
.store-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.store-state--loading { padding-top: 24px; }
.store-skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; width: 100%; margin-top: 18px; }
.store-skeleton-product { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; width: 100%; margin-top: 18px; }
.store-skeleton-card { display: grid; gap: 10px; text-align: left; min-width: 0; }
.store-skeleton-media, .store-skeleton-line { display: block; border-radius: 10px; background: linear-gradient(100deg, rgba(238,230,211,.04) 20%, rgba(238,230,211,.12) 38%, rgba(238,230,211,.04) 56%); background-size: 220% 100%; animation: store-skeleton-shimmer 1.4s ease-in-out infinite; }
.store-skeleton-media { aspect-ratio: 4 / 5; }
.store-skeleton-line { height: 14px; width: 82%; }
.store-skeleton-line--short { width: 48%; }
@keyframes store-skeleton-shimmer { to { background-position-x: -220%; } }
@media (max-width: 640px) {
  .store-toolbar { gap: 12px; }
  .store-search-sort { flex: 1 1 100%; min-width: 0; width: 100%; }
  .store-search { min-width: 0; }
  .store-sort { flex-basis: 135px; }
  .store-skeleton-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .store-skeleton-product { grid-template-columns: 1fr; }
  .store-skeleton-product .store-skeleton-card { grid-template-columns: 1fr; }
  .product-sticky-buy { position: fixed; z-index: 95; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 52px; padding: 13px 18px; border: 0; border-radius: 999px; background: var(--mustard); color: #0A161B; box-shadow: 0 8px 28px rgba(0,0,0,.35); font: 700 .88rem/1.2 var(--body); cursor: pointer; }
  .product-sticky-buy[disabled] { opacity: .65; cursor: not-allowed; }
  body.product-buy-visible .product-sticky-buy { display: none; }
  body:not(.product-buy-visible) .product-sticky-buy { display: flex; }
  body.product-sticky-fallback .product-sticky-buy { display: flex; }
  body.product-sticky-fallback.product-buy-visible .product-sticky-buy { display: none; }
  body:has(.product-sticky-buy) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-footer { gap: 10px; }
  .store-footer-links { gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .store-skeleton-media, .store-skeleton-line { animation: none; }
}
.product-full-title { margin-top: -10px; color: var(--muted); font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
