/* Cases Maxx — catálogo de iPhones. Usa as variáveis de styles.css. */

.cat-main { padding-block: 40px 96px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumb a { text-underline-offset: 3px; }
.crumb svg { opacity: .5; }

.cat-hero { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 36px; }
.cat-hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
.cat-hero p { color: var(--muted); font-size: 17px; max-width: 60ch; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.toolbar__count { margin-left: auto; font-size: 14px; color: var(--muted); }
.search { position: relative; flex: 1 1 260px; max-width: 340px; }
.search input { width: 100%; min-height: 48px; padding: 0 16px 0 44px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); font: inherit; font-size: 15px; color: var(--text); }
.search input::placeholder { color: #9B9B95; }
.search svg { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.chips { display: flex; gap: 8px; }
.chip { min-height: 48px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.sort { position: relative; }
.sort select { appearance: none; min-height: 48px; padding: 0 40px 0 16px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.sort svg { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }

.grid-prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 20px; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 26px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow-card); transition: box-shadow 180ms var(--ease), translate 180ms var(--ease); }
.pcard:hover { box-shadow: var(--shadow-card-hover); translate: 0 -2px; }
.pcard__img { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #F7F6F2, #EFEEE8); display: grid; place-items: center; padding: 16px; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; transition: scale 320ms var(--ease); }
.pcard:hover .pcard__img img { scale: 1.045; }
.pcard__tag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(11, 11, 12, .86); color: var(--on-ink); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(6px); }
.pcard__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.pcard__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; }
.pcard__model { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.pcard__meta { font-size: 13px; color: var(--muted); }
.pcard__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pcard__price small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pcard__price strong { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pcard__inst { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcard__arrow { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--tile); color: var(--ink); transition: background-color 150ms var(--ease); }
.pcard:hover .pcard__arrow { background: var(--yellow); }

.empty { padding: 56px 0; text-align: center; color: var(--muted); }
.empty b { display: block; font-size: 18px; color: var(--text); margin-bottom: 6px; }

.cat-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 56px; padding: 32px; border-radius: 26px; background: var(--ink); color: var(--on-ink); }
.cat-cta p { color: var(--on-ink-muted); max-width: 52ch; margin-top: 6px; }
.cat-cta h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.025em; font-weight: 600; }

/* ---------- pagina do produto ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 56px; align-items: start; }
.gal { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.gal__main { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 24px; border-radius: 28px; background: linear-gradient(180deg, #F7F6F2, #EDECE6); box-shadow: var(--shadow-card); overflow: hidden; }
.gal__main img { width: 100%; height: 100%; object-fit: contain; }
.gal__thumbs { display: flex; gap: 10px; }
.gal__thumbs button { flex: 1 1 0; aspect-ratio: 1 / 1; padding: 8px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; }
.gal__thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.gal__thumbs button[aria-current="true"] { box-shadow: 0 0 0 2px var(--ink); }

.pdp__info { display: flex; flex-direction: column; gap: 22px; }
.pdp__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tile); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pill--green { background: rgba(61, 220, 132, .16); color: #16723F; }
.pdp h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.03; letter-spacing: -.035em; font-weight: 600; }
.pdp__sub { font-size: 16px; color: var(--muted); margin-top: -8px; }

.opts { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }
.opt__label { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.opt__label b { font-size: 14px; letter-spacing: -.01em; text-transform: none; color: var(--text); font-weight: 600; }
.opt__row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px 0 12px; border: 0; border-radius: 13px; background: var(--card); box-shadow: var(--shadow-card); font: inherit; font-size: 15px; font-weight: 500; color: var(--text); transition: box-shadow 140ms var(--ease), scale 140ms var(--ease); }
.swatch i { display: block; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .14); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.cap { min-height: 46px; padding: 0 18px; border: 0; border-radius: 13px; background: var(--card); box-shadow: var(--shadow-card); font: inherit; font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.cap[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.cap:disabled { opacity: .38; cursor: not-allowed; }

.price { display: flex; flex-direction: column; gap: 2px; padding: 22px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-card); }
.price small { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.price strong { font-size: clamp(30px, 3.2vw, 38px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; font-variant-numeric: tabular-nums; }
.price span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.buy { display: flex; flex-direction: column; gap: 10px; }
.buy .btn { width: 100%; }
.buy__note { font-size: 13px; color: var(--muted); text-align: center; }

.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 18px; background: rgba(11, 11, 12, .08); }
.specs div { padding: 14px 16px; background: var(--card); }
.specs dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 3px 0 0; font-size: 15px; font-weight: 500; }

.trust { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); }
.trust li { display: flex; align-items: flex-start; gap: 10px; }
.trust svg { color: #16723F; margin-top: 2px; }

.others { margin-top: 88px; }
.others__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.others h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; font-weight: 600; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 20px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }

.cat-foot { margin-top: 72px; padding-top: 28px; border-top: 1px solid rgba(11, 11, 12, .1); display: flex; flex-wrap: wrap; gap: 16px 32px; font-size: 14px; color: var(--muted); }
.cat-foot a { text-underline-offset: 3px; }
.cat-foot span { margin-left: auto; }

@media (max-width: 960px) {
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .gal { position: static; }
  .toolbar__count { margin-left: 0; width: 100%; }
  .search { max-width: none; }
}
@media (max-width: 620px) {
  .cat-main { padding-block: 24px 72px; }
  .grid-prod { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard { border-radius: 20px; }
  .pcard__body { padding: 12px 13px 15px; }
  .pcard__model { font-size: 15px; }
  .pcard__price strong { font-size: 17px; }
  .pcard__arrow { display: none; }
  .cat-cta { padding: 24px; }
  .specs { grid-template-columns: 1fr; }
}

/* aviso de estoque (aparece quando a consulta ao vivo diz que o modelo saiu) */
.aviso { padding: 14px 16px; border-radius: 14px; background: rgba(255, 229, 0, .16); box-shadow: inset 0 0 0 1px rgba(11, 11, 12, .08); font-size: 14px; }
.aviso a { font-weight: 600; text-underline-offset: 3px; }
