/* Vitrine Salva: layout de loja (banner, filtros, mosaico). Usa os tokens do system.css. */

/* a loja não segue a regra de uma seção por tela */
body.shop main > section { min-height: 0; height: auto; }
body.shop main > .shop-hero { padding: var(--s-6) 0 var(--s-6); }
body.shop main > .shop-list { padding: 0 0 var(--s-9, 96px); }
body.shop main > section.section { padding-block: var(--s-9, 96px); }

/* ---------- banner */
.shop-hero { padding: var(--s-6) 0 var(--s-7); }
.shop-hero__box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-7); align-items: stretch;
  background: var(--surface); border-radius: calc(var(--r-lg) * 1.5); padding: var(--s-7);
}
.shop-hero__text { display: flex; flex-direction: column; justify-content: center; gap: var(--s-5); padding: var(--s-4) 0; }
.shop-hero__text h1 { font-size: clamp(36px, 2.6vw + 18px, 60px); line-height: 1.04; max-width: 14ch; margin: 0; }
.shop-hero__lead { color: var(--muted); font-size: 18px; max-width: 44ch; margin: 0; }
.shop-hero__text .t-label { margin: 0; }
.trust { list-style: none; padding: var(--s-5) 0 0; margin: var(--s-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.trust li span { color: var(--accent); }

.shop-hero__pic { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: #fff; }
.shop-hero__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.shop-hero__pic--one { min-height: 460px; max-height: 620px; aspect-ratio: 1; justify-self: end; width: 100%; }
@media (hover: hover) { .shop-hero__pic:hover img { transform: scale(1.03); } }
.shop-hero__tag {
  position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-4);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in oklab, #fff 92%, transparent);
  color: #111; font-size: 15px; backdrop-filter: blur(8px);
}
.shop-hero__tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-hero__tag strong { font-size: 18px; flex: none; }
.shop-hero__collage { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s-4); min-height: 460px; }
.shop-hero__collage .shop-hero__pic:first-child { grid-row: span 2; }
.shop-hero__collage .pbadge { position: absolute; left: 12px; top: 12px; }

/* ---------- barra de filtros */
.shop-bar { position: sticky; top: var(--nav-h, 64px); z-index: 5; background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-bottom: var(--s-6); }
.shop-bar__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px; padding: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: 500 14px/1 var(--font-text); color: var(--ink); background: transparent; border: 1px solid var(--line-strong, var(--line));
  border-radius: 999px; padding: 0 16px; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.chip span { font-size: 12px; color: var(--muted); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.sort { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { font: 500 14px var(--font-text); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong, var(--line)); border-radius: 999px; padding: 0 14px; min-height: 40px; cursor: pointer; }

/* ---------- mosaico */
.shop-list { padding-bottom: var(--s-9, 96px); }
.mosaic { columns: 4 260px; column-gap: var(--s-5); }
.pcard { display: block; break-inside: avoid; margin-bottom: var(--s-6); color: inherit; text-decoration: none; transition: transform 300ms var(--ease); }
.pcard[hidden] { display: none; }
@media (hover: hover) { .pcard:hover { transform: translateY(-2px); } .pcard:hover img { transform: scale(1.03); } }
.pcard__media { position: relative; display: block; aspect-ratio: var(--ar, 1); overflow: hidden; border-radius: var(--r-lg); background: #fff; }
.pcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.pcard__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pbadge { display: inline-block; font: 600 12px/1 var(--font-text); padding: 6px 10px; border-radius: 999px; background: #fff; color: #111; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.pbadge--hot { background: var(--action); color: var(--action-ink); }
.pbadge--feat { background: var(--ink); color: var(--bg); }
.pcard__price {
  position: absolute; left: 10px; bottom: 10px; font: 700 16px/1 var(--font-text); font-variant-numeric: tabular-nums;
  padding: 8px 12px; border-radius: 999px; background: #fff; color: #111; box-shadow: 0 2px 10px rgb(0 0 0 / .14);
}
.pcard__body { display: grid; gap: 4px; padding: 10px 4px 0; }
.pcard__name { font: 500 15px/1.35 var(--font-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { font-size: 13px; color: var(--muted); }
.pcard__star { color: #e8a317; }
.mosaic__empty { color: var(--muted); }

/* ---------- tablet e celular */
@media (max-width: 1023px) {
  .shop-hero__box { grid-template-columns: 1fr; padding: var(--s-6); gap: var(--s-6); }
  .shop-hero__pic--one { min-height: 0; max-height: none; aspect-ratio: 4 / 3; justify-self: stretch; }
  .shop-hero__collage { min-height: 360px; }
}
@media (max-width: 639px) {
  .shop-hero { padding-top: var(--s-4); }
  .shop-hero__box { padding: var(--s-5); border-radius: var(--r-lg); }
  .shop-hero__text h1 { font-size: 34px; }
  .shop-hero__lead { font-size: 16px; }
  .shop-hero__text .btn-row .btn--secondary { display: none; }
  .trust { gap: 6px 16px; font-size: 13px; }
  .shop-hero__collage { min-height: 260px; }
  .shop-bar { top: var(--nav-h, 56px); }
  .shop-bar__in { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort { justify-content: space-between; }
  .mosaic { columns: 2; column-gap: 12px; }
  .pcard { margin-bottom: var(--s-5); }
  .pcard__price { font-size: 14px; padding: 6px 10px; left: 8px; bottom: 8px; }
  .pbadge { font-size: 11px; padding: 5px 8px; }
  .pcard__name { font-size: 14px; }
}

/* produto em fundo branco: inteiro, com respiro */
.pcard--cut .pcard__media img { object-fit: contain; padding: 8% 8% 18%; }

/* celular: banner curto, a foto em cima, os produtos logo depois */
@media (max-width: 639px) {
  .shop-hero__box { gap: var(--s-4); padding: 12px 12px var(--s-5); }
  .shop-hero__pic--one, .shop-hero__collage { order: -1; aspect-ratio: 16 / 10; min-height: 0; }
  .shop-hero__collage { grid-template-columns: 1.3fr 1fr; }
  .shop-hero__text { padding: 0 8px; gap: 12px; }
  .shop-hero__text h1 { font-size: 30px; }
  .shop-hero__tag { left: 10px; right: 10px; bottom: 10px; padding: 8px 12px; font-size: 13px; }
  .shop-hero__tag strong { font-size: 15px; }
  .trust { padding-top: 12px; }
  .trust li:not(:first-child) { display: none; }
}

/* a loja não usa a altura de tela das seções do kit; o banner começa abaixo do menu fixo */
body.shop main > section.shop-hero, body.shop main > section.shop-list { min-height: 0 !important; height: auto !important; }
body.shop main > section.shop-hero { padding-top: calc(var(--nav-h, 64px) + var(--s-5)) !important; display: block; }
body.shop main > section.shop-list { display: block; }

/* ---------- página de produto */
body.shop main > section.pdp { min-height: 0 !important; height: auto !important; display: block; padding: calc(var(--nav-h, 64px) + var(--s-5)) 0 var(--s-8, 80px) !important; }
body.shop main > section.pdp-more { padding-top: 0 !important; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: var(--s-5); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-8, 64px); align-items: start; }
.pdp__media { position: sticky; top: calc(var(--nav-h, 64px) + var(--s-5)); aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--r-lg) * 1.4); background: #fff; }
.pdp__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp__media.is-cut img { object-fit: contain; padding: 6%; }
.pdp__media .pcard__badges { left: 16px; top: 16px; }
.pdp__box { display: flex; flex-direction: column; gap: var(--s-4); padding-top: var(--s-3); }
.pdp__box .t-label { margin: 0; }
.pdp__box h1 { font-size: clamp(30px, 1.6vw + 18px, 44px); line-height: 1.1; margin: 0; }
.pdp__rating { margin: 0; color: var(--muted); font-size: 15px; }
.pdp__rating strong { color: var(--ink); }
.pdp__price { margin: var(--s-2) 0 0; font: 700 clamp(34px, 1.6vw + 20px, 46px)/1 var(--font-text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pdp__blurb { margin: 0; font-size: 17px; color: var(--muted); max-width: 52ch; }
.pdp__points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pdp__points li { font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--surface); }
.pdp__buy { justify-content: center; min-height: 56px; font-size: 17px; margin-top: var(--s-3); width: 100%; }
.pdp__note { margin: 0; font-size: 13px; color: var(--muted); }
.pdp__who { margin-top: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); }
.pdp__who h2 { font: 600 15px/1.3 var(--font-text); margin: 0 0 6px; letter-spacing: 0; }
.pdp__who p { margin: 0; }
.pdp__specs { margin: 0; display: grid; }
.pdp__specs div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pdp__specs dt { color: var(--muted); }
.pdp__specs dd { margin: 0; font-weight: 500; text-align: right; }
.pdp-more__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-7); margin-bottom: var(--s-6); border-top: 1px solid var(--line); }
.pdp-more__head h2 { font-size: clamp(26px, 1vw + 18px, 34px); margin: 0; }
@media (max-width: 1023px) {
  .pdp__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .pdp__media { position: relative; top: 0; }
}
@media (max-width: 639px) {
  .crumbs { font-size: 13px; margin-bottom: var(--s-4); }
  .pdp__box h1 { font-size: 26px; }
  .pdp__price { font-size: 32px; }
  .pdp__blurb { font-size: 16px; }
  .pdp-more__head { flex-direction: column; gap: 6px; }
}

/* ---------- blocos de produtos (home: um por vitrine; vitrine: um por categoria) */
.pgroup + .pgroup { margin-top: var(--s-8, 72px); }
.pgroup[hidden] { display: none; }
.pgroup__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px var(--s-4); padding-bottom: var(--s-4); margin-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.pgroup__head h2 { margin: 0; font-size: clamp(26px, 1vw + 18px, 34px); line-height: 1.1; }
.pgroup__line { color: var(--muted); font-size: 15px; }
.pgroup__more { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.pgroup__more:hover { text-decoration: underline; text-underline-offset: 4px; }
.pgroup__more .m-arrow { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.pgrid .pcard { margin: 0; }
.pgrid .pcard__media { aspect-ratio: 1; }
@media (max-width: 1023px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .pgroup + .pgroup { margin-top: var(--s-7, 56px); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) 12px; }
  .pgroup__head h2 { font-size: 24px; }
  .pgroup__more { margin-left: 0; width: 100%; font-size: 14px; }
}
