/* ShopLab — estilos compartilhados
   Direção: clean e moderno · Space Grotesk (títulos) + Inter (texto) */

:root {
  --ground: #F5F6F8;
  --surface: #FFFFFF;
  --surface-muted: #F9FAFB;
  --placeholder: #EEF0F3;
  --ink: #16181D;
  --ink-soft: #3A3F4B;
  --muted: #5B6170;
  --border: #E4E6EB;
  --border-strong: #D5D8DF;

  --accent: #2B4CE0;
  --accent-hover: #1C35A8;
  --accent-soft: #EBEFFD;

  --success: #157F3D;
  --success-soft: #E7F4EC;
  --warning: #9A4A07;
  --warning-soft: #FDF1E3;
  --danger: #B4232C;

  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;

  --radius-sm: 10px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--muted); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow--accent { color: var(--accent); }
.price { font-family: var(--font-display); font-weight: 700; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--ink);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { color: #fff; }
.btn--outline { border-color: var(--border-strong); background: var(--surface); }
.btn--outline-dark { border-color: var(--ink); background: var(--surface); }
.btn--sm { height: 44px; padding: 0 18px; }
.btn--block { width: 100%; }
.btn--icon {
  width: 44px; height: 44px; padding: 0;
  background: var(--accent-soft); color: var(--accent);
}

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.input, .select {
  height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 12px; font: inherit; color: var(--ink); background: var(--surface); min-width: 0;
}
.check { display: flex; align-items: center; gap: 10px; }

.chip {
  height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font: inherit; font-weight: 500; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge--ok { background: var(--success-soft); color: var(--success); }
.badge--warn { background: var(--warning-soft); color: var(--warning); }
.badge--off { background: var(--placeholder); color: #4A505C; }
.badge--run { background: var(--accent-soft); color: #2B3FA8; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}

.img-placeholder {
  background: var(--placeholder); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 500;
}

/* ---------- Cabeçalho da loja ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px;
}
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  color: var(--ink); text-decoration: none;
}
.logo:hover { color: var(--ink); }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 8px; height: 46px;
  padding: 0 14px; background: var(--ground); border: 1px solid var(--border); border-radius: var(--radius);
}
.search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; height: 44px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 500; }
.main-nav a { color: var(--ink); text-decoration: none; }
.cart-link { height: 44px; padding: 0 16px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; padding-bottom: 24px; color: var(--muted); font-size: 14px;
}

.page { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 40px; }

/* ---------- Home ---------- */
.hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 40px;
}
.hero__text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.hero__title { font-size: 52px; line-height: 1.05; }
.hero__lead { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 520px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { flex: 1 1 360px; height: 320px; border-radius: var(--radius-lg); background: var(--accent-soft); color: #3A4A8C; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.catalog { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.filters {
  flex: 1 1 220px; max-width: 280px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; gap: 24px;
}
.filters fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.filters legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.price-range { display: flex; gap: 8px; }
.price-range .field { flex: 1; font-size: 13px; color: var(--muted); font-weight: 400; }

.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.results__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.results__head h2 { font-size: 26px; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
}
.product-card__media { height: 180px; }
.product-card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.product-card__footer {
  margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.product-card__footer .price { font-size: 18px; }

/* ---------- Produto ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); }

.pdp { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; }
.gallery__main { height: 520px; border-radius: var(--radius-xl); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery__thumb {
  height: 96px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--placeholder); cursor: pointer;
}
.gallery__thumb[aria-pressed="true"] { border: 2px solid var(--accent); }

.pdp__info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pdp__title { font-size: 40px; line-height: 1.1; }
.pdp__price { font-size: 36px; }
.pdp__buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pdp__buy .btn { flex: 1 1 220px; height: 50px; }

.swatches { border: 0; margin: 0; padding: 0; }
.swatches legend { font-weight: 600; margin-bottom: 10px; }
.swatches__list { display: flex; gap: 12px; }
.swatch {
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--border-strong);
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--accent); }

.qty { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty output { min-width: 30px; text-align: center; font-weight: 600; }

.shipping { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.shipping__row { display: flex; gap: 8px; }
.shipping__row .input { flex: 1; }
.shipping__note { font-size: 14px; color: var(--success); }

.details { display: flex; flex-wrap: wrap; gap: 40px; }
.details__text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.details__text p { line-height: 1.6; color: var(--ink-soft); }
.specs { flex: 1 1 320px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.section-head h2 { font-size: 22px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.review__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.review p { line-height: 1.5; color: var(--ink-soft); }

/* ---------- Checkout ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 500; }
.steps li { display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--placeholder); color: var(--muted); }
.steps li.is-done { background: var(--success-soft); color: var(--success); }
.steps li[aria-current="step"] { background: var(--accent); color: #fff; }
.secure { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }

.checkout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.checkout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.checkout__main .card { display: flex; flex-direction: column; gap: 16px; }
.checkout__main h1 { font-size: 26px; }
.checkout__main h2 { font-size: 20px; }

.cart-item { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--placeholder); }
.cart-item__thumb { width: 88px; height: 88px; border-radius: 14px; background: var(--placeholder); flex-shrink: 0; }
.cart-item__info { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
.cart-item__info a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cart-item__remove { align-self: flex-start; margin-top: 4px; height: 32px; padding: 0; border: 0; background: none; color: var(--danger); font: inherit; font-size: 14px; cursor: pointer; }
.cart-item__total { min-width: 110px; text-align: right; font-size: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pay-method {
  height: 52px; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
}
.pay-method[aria-checked="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.pay-panel { padding: 20px; border-radius: 14px; background: var(--ground); color: var(--ink-soft); line-height: 1.5; }
.pay-panel--pix { display: flex; align-items: center; gap: 20px; }
.qr { width: 120px; height: 120px; border-radius: var(--radius-sm); background: var(--surface); border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); flex-shrink: 0; }
[hidden] { display: none !important; }

.summary { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.summary h2 { font-size: 20px; }
.summary__row { display: flex; justify-content: space-between; }
.summary__divider { height: 1px; background: var(--border); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; }
.summary__total .price { font-size: 28px; }
.coupon { display: flex; gap: 8px; }
.coupon .input { flex: 1; }

/* ---------- Admin ---------- */
.admin { min-height: 100vh; display: flex; flex-wrap: wrap; }
.admin-nav { flex: 1 1 240px; max-width: 280px; background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.admin-nav .logo { color: #fff; font-size: 20px; padding: 0 12px 20px; }
.admin-nav .logo small { font-size: 13px; font-weight: 500; color: #B9BDC7; }
.admin-nav a.admin-nav__item { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; color: #C7CBD4; }
.admin-nav a.admin-nav__item[aria-current="page"] { background: #2A2E37; color: #fff; }

.admin-main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.admin-main h1 { font-size: 30px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.admin-search input { border: 0; outline: none; font: inherit; width: 200px; }
.admin-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }

.table-card { flex: 999 1 560px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.table th { padding: 14px 12px; font-weight: 600; text-align: left; color: var(--muted); background: var(--surface-muted); }
.table td { padding: 14px 12px; border-top: 1px solid var(--placeholder); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table .num { text-align: right; }
.table .sku { color: var(--muted); font-family: ui-monospace, monospace; }
.table__product { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.table__thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--placeholder); flex-shrink: 0; }

.admin-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 24px; }
.admin-side .card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.admin-side h2 { font-size: 18px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  height: 160px; padding: 0 16px; border: 2px dashed #C9CDD6; border-radius: var(--radius-md);
  background: var(--surface-muted); color: var(--muted); text-align: center; cursor: pointer;
}
.dropzone strong { color: var(--ink); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.jobs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.jobs li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .hero { padding: 28px; }
  .hero__title { font-size: 36px; }
  .pdp__title { font-size: 30px; }
  .gallery__main { height: 340px; }
  .filters { max-width: none; }
  .admin-nav { max-width: none; }
  .admin-main { padding: 20px; }
  .card { padding: 20px; }
}
