/*
================================================================================
ARQUIVO: site/css/style.css
PROJETO: Cantinho da Boneca (MyDoll)
AUTOR: Antonio Verna Neto
DATA CRIAÇÃO: 03/12/2026
DESCRIÇÃO: Folha de estilos Dark-Contrast baseada na identidade logo_android.png
           (#0F1115 grafite, #FBBF24 amarelo solar, #D97706 âmbar queimado).
HISTÓRICO DE MODIFICAÇÕES:
  - 03/12/2026: Criação inicial dos tokens de cor, layout responsivo e modais.
================================================================================
*/

:root {
  --bg-main: #0F1115;
  --bg-card: #181B22;
  --bg-elevated: #20242E;
  --border-subtle: #2A2F3D;

  --primary: #FBBF24;
  --primary-hover: #F59E0B;
  --secondary: #D97706;
  --metal-blue: #64748B;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dark: #0F1115;

  --status-green: #10B981;
  --status-amber: #F59E0B;
  --status-gray: #475569;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.accent-amber {
  color: var(--primary);
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 17, 21, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle, #252A36 0%, #14171F 100%);
  border: 1.5px solid var(--secondary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.search-box {
  flex: 1;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BOTÕES */
.btn-primary {
  background: var(--primary);
  color: var(--text-dark);
  border: none;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  background: var(--status-gray);
  color: #CBD5E1;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--primary);
  border: 1px solid var(--secondary);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: rgba(217, 119, 6, 0.18);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: var(--metal-blue);
}

.btn-sacola {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge-count {
  background: var(--text-dark);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
}

/* HERO */
.hero {
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, #141821 0%, #0F1115 65%, #1E1912 100%);
  padding: 24px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-copy {
  max-width: 680px;
}

.pill-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-copy h1 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-pill {
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

.hero-art img {
  width: 155px;
  height: 155px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(217, 119, 6, 0.25));
}

/* FILTROS */
.filtros-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.filtros-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filtro-grupo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-filtro {
  background: var(--bg-main);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-filtro:hover {
  color: var(--text-main);
  border-color: var(--secondary);
}

.chip-filtro.active {
  background: var(--primary);
  color: var(--text-dark);
  border-color: var(--primary);
}

.filtro-categoria select {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

/* VITRINE & CARDS */
.vitrine-main {
  padding: 24px 16px 48px;
}

.vitrine-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.vitrine-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.contador-texto {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.grid-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}

.card-produto {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.card-produto:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
}

.card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #12151C;
  overflow: hidden;
  cursor: pointer;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-origem {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-dtf {
  background: rgba(245, 158, 11, 0.92);
  color: var(--text-dark);
}

.badge-proprio {
  background: rgba(16, 185, 129, 0.9);
  color: var(--text-dark);
}

.badge-afiliado {
  background: rgba(100, 116, 139, 0.92);
  color: var(--text-main);
}

.badge-esgotado {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #CBD5E1;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.card-title:hover {
  color: var(--primary);
}

.card-compat {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-variacoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.var-pill {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  cursor: pointer;
}

.var-pill.selected {
  border-color: var(--primary);
  color: var(--primary);
}

.var-pill.sem-estoque {
  text-decoration: line-through;
  opacity: 0.45;
  cursor: not-allowed;
}

.card-personalizacao input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--secondary);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.card-price.consulta {
  font-size: 0.95rem;
  color: var(--primary);
}

.aviso-afiliado {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* MODAL & DRAWER */
.hidden {
  display: none !important;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.drawer-backdrop {
  justify-content: flex-end;
  padding: 0;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

.drawer-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.btn-close-modal {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-card .btn-close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sacola-item {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.drawer-frete {
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
}

.drawer-frete label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.frete-row {
  display: flex;
  gap: 8px;
}

.frete-row input {
  flex: 1;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.frete-resultado {
  font-size: 0.82rem;
  color: var(--primary);
  margin-top: 6px;
}

.drawer-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resumo-linha {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.resumo-linha.total {
  font-size: 1.08rem;
  color: var(--text-main);
  padding-top: 4px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .search-box {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .hero-art {
    display: none;
  }
}