/* =====================================================================
   Loja
   ===================================================================== */
.preview-note { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; white-space: normal; line-height: 1.4; }
.preview-note svg { width: 16px; height: 16px; flex: none; }
.panel-enter { animation: panel-in .35s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }

.shop-section { padding-top: clamp(28px, 4vw, 44px); }
.shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }

/* categorias */
.shop-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.shop-side > * { min-width: 0; }
/* acompanha a rolagem só quando cabe inteira na tela */
@media (min-width: 861px) and (min-height: 700px) { .shop-side { position: sticky; top: calc(var(--header-h) + 20px); } }
.side-title { font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 2px; }
.shop-cats { list-style: none; display: grid; gap: 6px; }
.shop-cats button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px;
  font: 600 15px var(--body); color: var(--text-2); text-align: left;
  background: var(--plate); border: 2px solid var(--line); transition: border-color .15s, color .15s, background-color .15s;
}
.shop-cats button svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.shop-cats button:hover { border-color: var(--line-2); color: var(--text); }
.shop-cats .n { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--muted); }
.shop-cats button[aria-pressed="true"] { border-color: var(--orange); color: var(--text); background: linear-gradient(90deg, rgba(252,145,58,.14), transparent 80%), var(--plate); }
.shop-cats button[aria-pressed="true"] svg, .shop-cats button[aria-pressed="true"] .n { color: var(--orange); }

/* busca e ordenação */
.shop-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.shop-search { position: relative; flex: 1 1 240px; }
.shop-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.shop-search .input { padding-left: 42px; }
.shop-sort { display: flex; align-items: center; gap: 10px; }
.shop-sort label { font-size: 14px; color: var(--muted); }
.shop-sort .select { width: auto; min-width: 170px; }
.shop-meta { margin: 14px 0 18px; font-size: 14px; color: var(--muted); }

/* itens */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product {
  position: relative; display: flex; flex-direction: column; background: var(--plate); border: 2px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s var(--ease);
}
.product:hover { border-color: color-mix(in srgb, var(--tier) 45%, var(--line)); transform: translateY(-3px); box-shadow: 0 6px 0 #0A0706; }
/* quadro da imagem: a imagem inteira, centralizada, ocupando o quadro até a borda de respiro */
.p-frame {
  position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  padding: 8% 10%; overflow: hidden; isolation: isolate; border-bottom: 2px solid var(--line);
}
.p-frame::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tier); }
.p-frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 65% 70% at 50% 55%, color-mix(in srgb, var(--tier) 16%, transparent), transparent 75%); }
.p-frame img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .35s var(--ease); }
.product:hover .p-frame img { transform: scale(1.05); }
.p-body { display: grid; gap: 10px; padding: 16px 18px 18px; }
.p-body h3 { font-size: 17px; }
.p-price { display: flex; align-items: baseline; gap: 8px; }
.p-price strong { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; color: var(--text); }
.p-price span { font-size: 14px; color: var(--muted); }
.product { cursor: pointer; }
.p-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 4px; }
.p-actions .btn { margin-bottom: 4px; padding-inline: 12px; }

/* ---------- saiba mais ---------- */
.item-dlg { width: min(760px, calc(100vw - 32px)); }
.item-dlg .dialog-head { border-top: 4px solid var(--tier); }
.item-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.item-frame {
  display: flex; align-items: center; justify-content: center; padding: 28px; min-height: 260px; isolation: isolate; position: relative;
  border-right: 2px solid var(--line);
}
.item-frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 65% 60% at 50% 50%, color-mix(in srgb, var(--tier) 18%, transparent), transparent 75%); }
.item-frame img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; }
.item-info { display: grid; gap: 16px; align-content: start; padding: 24px; }
.item-about { color: var(--text-2); font-size: 16px; line-height: 1.6; }
.item-perks { list-style: none; display: grid; gap: 10px; }
.item-perks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 15px; }
.item-perks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--tier); stroke-width: 3; }
.item-perks b { color: var(--tier); }
.item-info .btn { margin-top: 4px; }
@media (max-width: 640px) {
  .item-body { grid-template-columns: 1fr; }
  .item-frame { border-right: 0; border-bottom: 2px solid var(--line); min-height: 0; padding: 20px; }
  .item-frame img { max-height: 180px; }
}

.shop-empty { display: flex; align-items: center; gap: 16px; padding: 28px; background: var(--plate); border: 2px solid var(--line); }
.shop-empty .px { width: 44px; height: 44px; }

@media (max-width: 860px) {
  .shop { grid-template-columns: 1fr; }
  .side-title { display: none; }
  .shop-cats { display: flex; gap: 8px; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .shop-cats::-webkit-scrollbar { display: none; }
  .shop-cats button { width: auto; white-space: nowrap; min-height: 44px; }
  .shop-sort label { display: none; }
  .shop-sort { flex: 1 1 160px; }
  .shop-sort .select { width: 100%; min-width: 0; }
}
@media (max-width: 420px) { .shop-grid { grid-template-columns: 1fr; } }


/* ---------- carrinho ---------- */
.toast-region { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.cart-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px;
  font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--text);
  background: var(--plate-2); border: 2px solid var(--line-2); box-shadow: 0 5px 0 #0A0706, 0 14px 30px rgba(0,0,0,.4);
  transition: transform .15s var(--ease), border-color .15s, box-shadow .15s;
}
.cart-fab svg { width: 20px; height: 20px; }
.cart-fab:hover { border-color: var(--yellow); transform: translateY(-2px); }
.cart-fab .count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; background: var(--line-2); color: var(--text); font-size: 13px; }
.cart-fab.has-items .count { background: var(--orange); color: #1A0E06; }
.cart-fab.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: translateY(-6px) scale(1.06); } }

.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(420px, 100vw); border-width: 0 0 0 2px; flex-direction: column; }
.drawer[open] { display: flex; animation: drawer-in .28s var(--ease) both; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer .dialog-head { flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-foot { flex: none; display: grid; gap: 16px; padding: 20px 22px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid var(--line); background: var(--plate-2); }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total span { color: var(--muted); }
.total strong { font-family: var(--display); font-weight: 700; font-size: 26px; }
.checkout-note { font-size: 13px; color: var(--muted); text-align: center; }
.cart-empty { display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--muted); padding: 48px 0; }
.cart-empty .px { width: 56px; height: 56px; opacity: .8; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 2px solid var(--line); }
.cart-item .thumb { display: grid; place-items: center; width: 56px; height: 48px; padding: 4px; background: var(--bg); border: 2px solid var(--line); border-top-color: var(--tier); }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-item .name { font-family: var(--display); font-weight: 700; font-size: 14px; }
.cart-item .sub { font-size: 13px; color: var(--muted); }
.qty { display: flex; align-items: center; border: 2px solid var(--line-2); }
.qty button { display: grid; place-items: center; width: 36px; height: 36px; background: var(--plate-2); border: 0; color: var(--text-2); }
.qty button:hover { color: var(--yellow); }
.qty button svg { width: 16px; height: 16px; }
.qty output { min-width: 30px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 14px; }

/* ---------- meta do mês e top doador ---------- */
.goal-card, .donor-card { background: var(--plate); border: 2px solid var(--line); padding: 16px; }
.goal-card { display: grid; gap: 14px; align-content: center; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.goal-top h2, .donor-card h2 { font-size: 16px; }
.goal-nums { color: var(--muted); font-size: 15px; }
.goal-nums strong { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--yellow); }
/* barra em blocos, no degradê da marca */
.goal-bar { position: relative; height: 22px; background: var(--bg-deep); border: 2px solid #000; box-shadow: inset 0 0 0 2px var(--plate-3); }
.goal-bar span { position: absolute; inset: 2px auto 2px 2px; width: 0; max-width: calc(100% - 4px); background: linear-gradient(90deg, #FF4E50, #FC913A 50%, #F9D423); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(122,46,16,.3); transition: width 1.2s var(--ease); }
.goal-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), #000 calc(10% - 2px) 10%); pointer-events: none; }
.goal-foot { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.goal-foot #goal-pct { font-family: var(--display); font-weight: 700; color: var(--text-2); }

.donor-card { display: grid; gap: 12px; align-content: start; }
.donors { list-style: none; display: grid; gap: 8px; }
.donors li { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-weight: 700; color: var(--text-2); }
.donors .nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donors .pos { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--muted); }
.donors .val { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--muted); }
.donors img { image-rendering: pixelated; }
/* 1º lugar: cabeça maior, valor embaixo do nome */
.donors li.is-top { grid-template-columns: 24px 44px minmax(0, 1fr); row-gap: 0; padding-bottom: 12px; margin-bottom: 2px; border-bottom: 2px solid var(--line); color: var(--text); font-size: 17px; }
.donors li.is-top .pos, .donors li.is-top img { grid-row: span 2; }
.donors li.is-top .val { grid-column: 3; }
.donors li.is-top .pos { color: var(--yellow); font-size: 16px; }
.donors li.is-top .val { color: var(--yellow); font-size: 18px; }
@media (max-width: 860px) { .shop-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shop-side nav { grid-column: 1 / -1; } }
@media (max-width: 560px) { .shop-side { grid-template-columns: 1fr; } }

/* ---------- destaque (VIP Natal) ---------- */
#shop-featured:empty { display: none; }
.featured {
  position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; margin: 24px 0 8px; cursor: pointer;
  background: var(--plate); border: 2px solid color-mix(in srgb, var(--tier) 55%, var(--line)); overflow: hidden; isolation: isolate;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
/* faixa de cima em vermelho e verde, como fita de presente */
.featured::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 1; background: repeating-linear-gradient(90deg, #D61F2C 0 20px, #FFFFFF 20px 24px, #2DA555 24px 44px, #FFFFFF 44px 48px); }
.featured:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #0A0706; border-color: var(--tier); }
.f-frame { position: relative; display: flex; align-items: center; justify-content: center; height: 140px; padding: 16px 18px 12px; }
.f-frame::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 65% 70% at 50% 55%, rgba(214, 31, 44, .2), transparent 72%); }
.f-frame img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--ease); }
.featured:hover .f-frame img { transform: scale(1.05); }
.f-body { display: flex; flex-direction: column; justify-content: center; padding: 16px 18px 16px 4px; }
.f-badge { align-self: flex-start; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 4px 8px; color: #fff; background: #D61F2C; box-shadow: 0 3px 0 #6E0A10; }
.f-body h3 { font-size: 20px; }
/* nome e preço juntos, com o fim do preço alinhado ao fim dos botões */
.f-name { display: grid; gap: 6px; margin-top: 10px; margin-bottom: 4px; }
.f-about { color: var(--muted); font-size: 14px; }
.f-buy { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.f-buy .p-price strong { font-size: 22px; }
.f-buy .p-actions { grid-template-columns: auto auto; margin: 0; }
.f-buy .btn { min-height: 40px; padding: 7px 14px; font-size: 13px; }
@media (max-width: 760px) {
  .featured { grid-template-columns: 1fr; }
  .f-frame { height: 120px; }
  .f-body { padding: 4px 16px 16px; }
}
.donors-empty { display: block !important; font-weight: 500 !important; font-size: 14px; color: var(--muted) !important; }
