/* Catálogo e cabeçalho/rodapé das páginas de modelo.
   Usa os tokens e componentes de /assets/css/base.css. */

.catalog-page { min-height: 100vh; }
.catalog-page svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cabeçalho ---------- */
.catalog-header__nav { display: flex; align-items: center; gap: 6px; }
.catalog-header__nav .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Abertura ---------- */
.catalog-intro { position: relative; isolation: isolate; display: grid; justify-items: start; gap: 16px; padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 40px); }
.catalog-intro .aurora { inset: -40px -50vw; }
.catalog-intro .aurora span { opacity: 0.4; }

/* ---------- Busca, ordenação e filtros ---------- */
.catalog-controls { display: grid; gap: 14px; margin: 0 0 8px; padding: 14px 0; scroll-margin-top: 72px; }
.catalog-toolbar { display: flex; gap: 10px; }
.catalog-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); color: var(--muted); transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.catalog-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.catalog-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.catalog-search input::placeholder { color: var(--faint); }
.catalog-sort select { height: 54px; padding: 0 40px 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; appearance: none; -webkit-appearance: none; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.catalog-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.catalog-filters::-webkit-scrollbar { display: none; }
.catalog-filters .chip { min-height: 38px; padding: 0 16px; }
.catalog-results { color: var(--muted); font-size: 13px; }

/* ---------- Grade ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 10px 0 8px; }
.product-card { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.product-card__image { position: relative; display: block; aspect-ratio: 1 / 0.92; background: #fff; overflow: hidden; }
.product-card__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform 0.7s var(--ease), opacity 0.3s ease; }
.product-card__image img.is-fading { opacity: 0; }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__off { position: absolute; z-index: 2; top: 14px; left: 14px; }
.product-card__stock { position: absolute; z-index: 2; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.product-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 4px 20px 20px; }
.product-card__meta { color: var(--muted); font-size: 12px; }
.product-card h2 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.25; }
.product-card__body > p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.catalog-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.catalog-swatch { position: relative; width: 24px; height: 24px; border-radius: 50%; padding: 4px; }
.catalog-swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--swatch-color); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.catalog-swatch::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ink); transform: scale(0.6); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.25s ease; }
.catalog-swatch.is-selected::after { transform: none; opacity: 1; }
.catalog-colors__name { margin-left: 4px; color: var(--muted); font-size: 12px; }
.product-card__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.product-card__details { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-alt); color: var(--ink); transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease); }
.product-card:hover .product-card__details { background: var(--ink); color: #fff; transform: rotate(-45deg); }

/* Entrada dos cards ao filtrar/buscar */
.catalog-grid.is-entering .product-card { animation: card-in 0.55s var(--ease) both; animation-delay: calc(min(var(--i, 0), 10) * 45ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(4px); } }

/* ---------- Vazio ---------- */
.catalog-empty { display: grid; justify-items: center; gap: 10px; padding: 64px 16px; text-align: center; }
.catalog-empty p { color: var(--muted); }
.catalog-empty .btn { margin-top: 8px; }

/* ---------- Atendimento ---------- */
.catalog-store { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: clamp(56px, 8vw, 96px); padding: clamp(24px, 4vw, 48px); }
.catalog-store__intro { display: grid; justify-items: start; gap: 14px; }
.catalog-store__intro p { color: var(--muted); }
.catalog-store__details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.catalog-store__details > div { display: grid; align-content: start; gap: 10px; padding: 20px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); }
.catalog-store__label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.catalog-store__details ul { display: grid; gap: 8px; list-style: none; }
.catalog-store__details li { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14.5px; }
.catalog-store__details li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.catalog-store__details p { color: var(--muted); font-size: 13.5px; }
.catalog-store .chip { white-space: normal; padding: 6px 12px; line-height: 1.4; justify-self: start; }

.catalog-disclaimer { margin: 20px auto 0; color: var(--faint); font-size: 12px; text-align: center; }
.catalog-footer { margin-top: 48px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.catalog-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog-footer strong { color: var(--ink); }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-store, .catalog-store__details { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand small { display: none; }
  .catalog-header__nav .btn--ghost { display: none; }
  .catalog-controls { margin-bottom: 4px; padding-top: 4px; }
  .catalog-search { height: 50px; padding: 0 16px; }
  .catalog-sort select { width: 124px; height: 50px; padding: 0 32px 0 14px; background-position: right 10px center; font-size: 13px; }
  .catalog-grid { gap: 10px; }
  .product-card { border-radius: 20px; }
  .product-card__body { padding: 2px 12px 14px; gap: 4px; }
  .product-card h2 { font-size: 15px; }
  .product-card__body > p, .catalog-colors__name { display: none; }
  .catalog-swatch { width: 20px; height: 20px; padding: 3px; }
  .product-card__off { top: 10px; left: 10px; }
  .product-card .price strong { font-size: 16px; }
  .product-card .price del { font-size: 11.5px; }
  .product-card__details { width: 34px; height: 34px; }
}

/* Quiz "Descubra seu modelo ideal" (src/model-finder.js), nas cores da Rafa Electric Mob. */
.finder-banner { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; padding: 18px 18px 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: radial-gradient(circle at 0% 50%, rgba(255, 106, 0, .1), transparent 42%), var(--surface); box-shadow: var(--shadow); }
.finder-banner__icon { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--orange-grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(255, 90, 0, .6); }
.finder-banner__icon svg { width: 24px; height: 24px; }
.finder-banner__text { min-width: 0; margin-right: auto; }
.finder-banner h2 { margin: 0; color: var(--ink); font-family: var(--font-title); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.finder-banner p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.finder-banner__button { display: inline-flex; min-height: 50px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--orange-grad); color: #fff; cursor: pointer; font-family: var(--font-title); font-size: 15px; font-weight: 700; box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 24px -10px rgba(255, 90, 0, .6); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.finder-banner__button:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 16px 32px -12px rgba(255, 90, 0, .7); }
.finder-banner svg, .finder svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

html.finder-lock { overflow: hidden; }
.finder { inset: 0; width: min(560px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-lg); font-family: var(--font-body); }
.finder::backdrop { background: rgba(10, 10, 10, .55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.finder[open] { animation: finder-in .22s ease-out; }
.finder__panel { position: relative; max-height: calc(100dvh - 34px); overflow-y: auto; padding: 22px 24px 26px; overscroll-behavior: contain; scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
.finder__close { position: absolute; z-index: 2; top: 16px; right: 16px; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .18s ease, color .18s ease; }
.finder__close:hover { border-color: var(--orange); color: var(--orange-text); }
.finder__top { display: flex; min-height: 40px; align-items: center; gap: 12px; padding-right: 52px; }
.finder__back { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 0 12px 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; }
.finder__back:hover { background: var(--bg-alt); color: var(--ink); }
.finder__count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.finder__progress { height: 4px; margin: 10px 0 0; overflow: hidden; border-radius: 99px; background: var(--bg-alt); }
.finder__progress span { display: block; height: 100%; border-radius: inherit; background: var(--orange-grad); transition: width .3s ease; }
.finder__intro { margin-top: 22px; text-align: center; }
.finder__badge { display: inline-grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--orange-grad); color: #fff; }
.finder__badge svg { width: 26px; height: 26px; }
.finder__intro p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.finder__intro .finder__hello { margin-top: 12px; color: var(--ink); font-family: var(--font-title); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.finder__intro .finder__time { color: var(--orange-text); font-size: 13px; font-weight: 600; }
.finder__step { margin-top: 22px; animation: finder-step .24s ease-out; }
.finder__step h2 { margin: 0; outline: none; font-family: var(--font-title); font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.finder__intro + .finder__step h2 { text-align: center; font-size: 16px; }
.finder__note { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.finder__options { display: grid; gap: 10px; margin-top: 16px; }
.finder__option { display: flex; width: 100%; min-height: 60px; align-items: center; gap: 12px; padding: 12px 16px 12px 18px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.finder__option > span { display: grid; min-width: 0; gap: 3px; margin-right: auto; }
.finder__option strong { font-family: var(--font-title); font-size: 15px; font-weight: 700; }
.finder__option small { color: var(--muted); font-size: 12.5px; }
.finder__option > svg { color: var(--faint); transition: color .18s ease, transform .18s ease; }
.finder__option:hover, .finder__option.is-selected { border-color: var(--orange); background: var(--orange-soft); }
.finder__option:hover > svg, .finder__option.is-selected > svg { color: var(--orange-text); transform: translateX(2px); }
.finder__option:active { transform: scale(.99); }

.finder-results { display: grid; gap: 12px; margin-top: 16px; }
.finder-result { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px 14px; padding: 10px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); }
.finder-result.is-top { border-color: var(--orange); box-shadow: 0 14px 30px -18px rgba(255, 90, 0, .45); }
.finder-result__image { display: grid; align-self: start; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; border-radius: 14px; background: var(--bg-alt); }
.finder-result__image img { width: 100%; height: 100%; object-fit: contain; }
.finder-result__body { display: grid; min-width: 0; align-content: start; gap: 4px; padding: 2px 4px 0 0; }
.finder-result__tag { justify-self: start; margin-bottom: 2px; padding: 4px 9px; border-radius: 99px; background: var(--orange-grad); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.finder-result__type { color: var(--muted); font-size: 12px; font-weight: 600; }
.finder-result h3 { margin: 0; font-family: var(--font-title); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.finder-result__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; color: var(--orange-text); font-family: var(--font-title); font-size: 17px; font-weight: 800; }
.finder-result__price del { color: var(--faint); font-size: 12.5px; font-weight: 500; }
.finder-result ul { display: grid; gap: 5px; margin: 6px 0 0; padding: 0; list-style: none; }
.finder-result li { display: flex; align-items: flex-start; gap: 7px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.finder-result li svg { width: 15px; height: 15px; margin-top: 2px; color: var(--orange); stroke-width: 2.4; }
.finder-result li.is-warning { color: var(--muted); }
.finder-result li.is-warning svg { color: #c98a00; stroke-width: 2; }
.finder-result__actions { display: flex; grid-column: 2; flex-wrap: wrap; gap: 8px; }
.finder-result__actions > a { white-space: nowrap; }
.finder-result__details, .finder-result__whatsapp, .finder__restart, .finder__all { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-family: var(--font-title); font-size: 13px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.finder-result__details, .finder__restart, .finder__all { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.finder-result__details:hover, .finder__restart:hover, .finder__all:hover { border-color: rgba(17, 17, 17, .28); }
.finder-result__whatsapp { border: 0; background: var(--orange-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(255, 90, 0, .6); }
.finder-result__whatsapp:hover { box-shadow: 0 12px 24px -12px rgba(255, 90, 0, .7); }
.finder__footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.finder__disclaimer { margin: 14px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.45; }

@keyframes finder-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes finder-step { from { opacity: 0; transform: translateX(10px); } }

@media (max-width: 700px) {
  .finder-banner { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .finder-banner__icon { width: 44px; height: 44px; }
  .finder-banner__text { flex: 1 1 200px; margin-right: 0; }
  .finder-banner h2 { font-size: 18px; }
  .finder-banner p { font-size: 13px; }
  .finder-banner__button { width: 100%; justify-content: center; }
}
@media (max-width: 520px) {
  .finder { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .finder__panel { max-height: calc(100dvh - 18px); padding: 18px 16px 22px; }
  .finder-result { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .finder-result__actions { grid-column: 1 / -1; }
  .finder-result__actions > a { flex: 1 1 auto; }
  .finder-result__actions .finder-result__whatsapp { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .finder[open], .finder__step { animation: none; }
}
