/* shishatobaccos.com — minimal, mobile-first */

:root {
  --bg:        #0e0e10;
  --bg-2:      #18181b;
  --bg-3:      #27272a;
  --fg:        #fafafa;
  --fg-2:      #a1a1aa;
  --fg-3:      #71717a;
  --accent:    #f59e0b;
  --accent-2:  #fbbf24;
  --border:    #27272a;
  --radius:    10px;
  --gap:       12px;
  --maxw:      1120px;
  --fs-sm:     0.875rem;
  --fs-xs:     0.75rem;
  --shadow:    0 2px 8px rgba(0,0,0,.25);
}

[data-theme="light"] {
  --bg:        #fafafa;
  --bg-2:      #ffffff;
  --bg-3:      #f4f4f5;
  --fg:        #0e0e10;
  --fg-2:      #52525b;
  --fg-3:      #71717a;
  --accent:    #b45309;
  --accent-2:  #d97706;
  --border:    #e4e4e7;
  --shadow:    0 2px 8px rgba(0,0,0,.06);
}

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

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.hdr {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}
.hdr__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}
.hdr__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 600;
  font-size: 1.05rem;
}
.hdr__logo { font-size: 1.4rem; }
.hdr__tools { display: flex; gap: 8px; align-items: center; }
.hdr__sub {
  max-width: var(--maxw);
  margin: 6px auto 0;
  color: var(--fg-2);
  font-size: var(--fs-sm);
}

/* ---------- Buttons / Inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg-2); border-color: var(--fg-3); }
.btn--primary { background: var(--accent); color: #0e0e10; border-color: var(--accent); font-weight: 600; }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; }
.btn--icon { padding: 8px 10px; }

.select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-sm);
}

/* ---------- Main ---------- */
.view {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
}

/* ---------- Search bar ---------- */
.searchbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.searchbar__input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--fg);
  font-size: 1rem;
}
.searchbar__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* ---------- Facets ---------- */
.facets {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) { .facets { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .facets { grid-template-columns: repeat(3, 1fr); } }

.facet h3 {
  margin: 0 0 6px;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  font-weight: 600;
}
.facet__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: var(--fs-xs);
  cursor: pointer;
  user-select: none;
}
.chip:hover { border-color: var(--fg-3); color: var(--fg); }
.chip--on { background: var(--accent); color: #0e0e10; border-color: var(--accent); font-weight: 600; }
.chip__count { color: inherit; opacity: .7; }

.facet__actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.facet__reset,
.facet__copy {
  font-size: var(--fs-xs);
  background: transparent;
  border: none;
  color: var(--fg-3);
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}
.facet__reset:hover,
.facet__copy:hover { color: var(--accent); }
.facet__copy.is-copied { color: var(--accent); font-weight: 600; }

.results-count {
  margin: 8px 2px;
  color: var(--fg-3);
  font-size: var(--fs-sm);
}

/* ---------- Grid ---------- */
.grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  transition: transform .12s, border-color .12s;
}
.card:hover { border-color: var(--fg-3); transform: translateY(-1px); }
.card__img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: #fff;
  border-radius: 6px;
  display: block;
}
.card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  font-size: 1.6rem;
  background: var(--bg-3);
}
.card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card__brand {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.card__name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.card__tag {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--fg-2);
}
.card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: var(--fs-sm);
  color: var(--fg-2);
}
.card__strength {
  display: inline-flex;
  gap: 2px;
}
.card__strength span {
  width: 6px; height: 10px;
  background: var(--bg-3);
  border-radius: 1px;
}
.card__strength span.on { background: var(--accent); }
.card__strength--estimate span.on {
  background: var(--accent);
  opacity: 0.45;
}
.hint {
  color: var(--fg-3);
  font-size: 0.85em;
  font-style: italic;
}
.card__open {
  color: var(--accent);
  font-size: var(--fs-sm);
}

/* ---------- Detail view ---------- */
.detail {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .detail { grid-template-columns: 220px 1fr; }
}
.detail__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
}
div.detail__img {
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  font-size: 3rem;
}
.detail__head h1 { margin: 0 0 4px; }
.detail__brand { color: var(--fg-3); font-size: var(--fs-sm); }
.detail__facts {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: var(--fs-sm);
}
.detail__facts dt { color: var(--fg-3); }
.detail__facts dd { margin: 0; }
.detail__back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--fg-2);
  font-size: var(--fs-sm);
}

/* ---------- Footer ---------- */
.ftr {
  margin-top: 32px;
  padding: 20px 16px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  color: var(--fg-3);
  font-size: var(--fs-xs);
  text-align: center;
}
.ftr__warn {
  color: var(--fg-2);
  font-weight: 600;
  margin: 0 0 4px;
}
.ftr__disclaimer { margin: 0 0 8px; }
.ftr__links {
  margin: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.ftr__links a { color: var(--fg-2); }
.ftr__links a:hover { color: var(--accent); }

.ftr__lang-note {
  margin: 6px 0 0;
  color: var(--fg-3);
  font-size: var(--fs-xs);
  font-style: italic;
}
html[lang="de"] .ftr__lang-note { display: none; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 24px;
  color: var(--fg);
  line-height: 1.6;
}
.legal h1 { font-size: 1.8rem; margin: 0 0 16px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 8px; color: var(--accent); }
.legal h3 { font-size: 1rem;   margin: 18px 0 6px; color: var(--fg); }
.legal p  { margin: 0 0 10px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 4px; }
.legal code {
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal__updated {
  margin-top: 28px;
  color: var(--fg-3);
}

.age-gate__links {
  margin: 12px 0 0;
  font-size: var(--fs-xs);
  display: flex;
  gap: 8px;
  justify-content: center;
}
.age-gate__links a { color: var(--fg-3); }
.age-gate__links a:hover { color: var(--accent); }

/* ---------- Age gate ---------- */
.age-gate {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.age-gate__card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
}
.age-gate__card h1 { margin: 0 0 8px; font-size: 2rem; color: var(--accent); }
.age-gate__card p { color: var(--fg-2); }
.age-gate__actions {
  display: flex;
  gap: 8px;
  margin: 16px 0 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.age-gate__warn {
  margin: 8px 0 0;
  font-size: var(--fs-xs);
  color: var(--fg-3);
}
