
:root {
  --bg: #f5f5f3;
  --card: #ffffff;
  --text: #1c1c1b;
  --muted: #6e6e6a;
  --line: rgba(0,0,0,0.08);
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --swatch-w: 96px;
  --swatch-h: 78px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
body { min-height: 100vh; }

.site-shell { max-width: 1600px; margin: 0 auto; padding: 20px; }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 680px);
  gap: 20px;
  align-items: end;
}
.brand-block, .search-card, .page-card, .single-result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.brand-block { padding: 24px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.brand-block h1 { margin: 0; font-size: 42px; line-height: 1; }
.subtitle { margin: 12px 0 0; color: var(--muted); max-width: 720px; }

.search-card { padding: 18px; min-width: 0; }
.search-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}
.search-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.search-row input {
  min-width: 0;
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #d4d4d0;
  background: #fff;
  text-align: center;
  font-size: 16px;
  padding: 0 10px;
}
.sep { color: #9a9a96; font-size: 18px; }
.search-row button {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #1c1c1b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.search-row button.secondary {
  background: #e9e9e4;
  color: #1c1c1b;
}

.content-area { margin-top: 20px; }
.results-bar { margin-bottom: 14px; color: var(--muted); font-size: 14px; }

.pages-container {
  display: grid;
  gap: 18px;
}

.page-card { padding: 16px; overflow: hidden; }
.page-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.page-title { margin: 0; font-size: 20px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 13px; }

.palette-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(14, var(--swatch-w));
  grid-template-rows: repeat(12, auto);
  gap: 4px 8px;
  min-width: max-content;
}
.swatch-card {
  width: var(--swatch-w);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.swatch-color {
  width: 100%;
  height: var(--swatch-h);
}
.swatch-label {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  background: #fff;
}

.single-result.hidden, .modal.hidden { display: none; }
.single-result-card { padding: 18px; max-width: 460px; }
.single-result-card .swatch-card { width: 100%; }
.single-result-card .swatch-color { height: 180px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.modal-card {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100vw - 24px));
  margin: 24px auto;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}
.close-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 3;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}
.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
}
.modal-swatch {
  min-height: 420px;
}
.modal-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.info-group { display: flex; flex-direction: column; gap: 6px; }
.info-label { margin: 0; color: var(--muted); font-size: 14px; }
.info-value { margin: 0; font-size: 24px; font-weight: 600; }
.info-value-primary { font-size: 34px; }
.break { word-break: break-all; }
.copy-btn {
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #1c1c1b;
  color: white;
  font-size: 14px;
  cursor: pointer;
}
.copy-feedback { margin: 0; min-height: 18px; color: var(--muted); font-size: 13px; }

/* Dica de deslizar — só aparece no mobile */
.swipe-hint {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.swipe-hint-text {
  font-size: 12px;
  color: var(--muted);
  white-space: normal;
  max-width: 80px;
  text-align: right;
  line-height: 1.4;
}
.swipe-hint-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .swipe-hint {
    display: flex;
  }
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr; }
  .search-row {
    grid-template-columns: 1fr auto 1fr auto 1fr;
  }
  .search-row button {
    grid-column: span 2;
  }
  .modal-layout { grid-template-columns: 1fr; }
  .modal-swatch { min-height: 280px; }
}

@media (max-width: 640px) {
  .site-shell { padding: 12px; }
  .brand-block h1 { font-size: 32px; }
  .search-row {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 8px;
  }
  .search-row button {
    grid-column: span 5;
    width: 100%;
  }
}
