/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #0f0f1a;
  --bg-surface: #1a1a2e;
  --bg-card: #22223a;
  --bg-card-hover: #2a2a45;
  --border: #333355;
  --border-light: #44446a;
  --text-primary: #eee8dd;
  --text-secondary: #b0a89a;
  --text-muted: #7a7488;
  --accent: #d4a853;
  --accent-light: #e8c77c;
  --accent-dark: #a67c3a;
  --success: #5cb85c;
  --danger: #d9534f;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent); color: var(--bg-deep);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-ghost {
  background: transparent; color: var(--accent-light);
  border-color: var(--border-light);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline {
  background: transparent; color: var(--text-secondary);
  border-color: var(--border);
  padding: 8px 16px; font-size: 0.85rem;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 6px 14px; font-size: 0.82rem; }

/* ===== HEADER ===== */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px; display: flex;
  align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent-light); font-weight: 700;
  font-size: 1.15rem; text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo-text { letter-spacing: 0.3px; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: var(--text-secondary); font-size: 0.9rem; }
.site-nav a:hover { color: var(--accent-light); }
.col-count { font-size: 0.8rem; color: var(--text-muted); }

/* ===== HERO ===== */
.hero {
  max-width: 1280px; margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15; font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 480px; margin-bottom: 28px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.wheel-decoration {
  position: relative; width: 280px; height: 280px;
}
.wheel-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid var(--border-light);
  animation: spin-slow 20s linear infinite;
}
.ring-1 { inset: 0; border-color: var(--accent); opacity: 0.3; }
.ring-2 { inset: 30px; border-color: var(--accent-light); opacity: 0.2; animation-duration: 15s; animation-direction: reverse; }
.ring-3 { inset: 60px; border-color: var(--border-light); opacity: 0.15; animation-duration: 25s; }
.wheel-center {
  position: absolute; inset: 90px;
  background: var(--bg-card); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; border: 2px solid var(--accent); opacity: 0.5;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ===== APP SHELL ===== */
.app-shell {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px 60px;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 32px;
}

/* Filter Panel */
.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; height: fit-content;
  position: sticky; top: 80px;
}
.panel-title {
  font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 14px;
}
.filter-group {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 20px;
}
.filter-btn {
  background: none; border: none; color: var(--text-secondary);
  text-align: left; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 0.9rem; cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.filter-btn.active {
  background: var(--accent); color: var(--bg-deep); font-weight: 600;
}
.filter-search input {
  width: 100%; padding: 8px 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.9rem; margin-bottom: 16px;
}
.filter-search input:focus { outline: none; border-color: var(--accent); }
.panel-actions { display: flex; flex-direction: column; gap: 8px; }

/* Results */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.results-title { font-size: 1.3rem; font-weight: 700; }
.results-count { color: var(--text-muted); font-size: 0.9rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.cocktail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.cocktail-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-family {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent);
  margin-bottom: 6px;
}
.card-name {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 10px; color: var(--text-primary);
}
.card-rim {
  font-size: 0.9rem; color: var(--text-secondary);
  margin-bottom: 4px;
}
.card-garnish {
  font-size: 0.85rem; color: var(--text-muted);
}
.card-bookmark {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--text-muted);
  transition: color var(--transition);
}
.card-bookmark:hover, .card-bookmark.saved { color: var(--accent); }

.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 16px; }

/* ===== DETAIL DRAWER ===== */
.detail-drawer { position: fixed; inset: 0; z-index: 200; }
.detail-drawer[hidden] { display: none; }
.drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 440px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  overflow-y: auto; padding: 32px 28px;
  animation: slide-in 0.3s ease;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.8rem; cursor: pointer; line-height: 1;
}
.drawer-close:hover { color: var(--text-primary); }
.drawer-content h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 4px;
}
.drawer-family {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent);
  margin-bottom: 20px;
}
.drawer-section { margin-bottom: 20px; }
.drawer-section h3 {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 6px;
}
.drawer-section p { color: var(--text-secondary); font-size: 0.95rem; }
.drawer-why {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 16px; border-left: 3px solid var(--accent);
}
.drawer-why p { color: var(--text-primary); font-size: 0.92rem; }
.drawer-actions {
  display: flex; gap: 10px; margin-top: 24px;
  flex-wrap: wrap;
}

/* ===== COLLECTION PANEL ===== */
.collection-panel {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.collection-panel[hidden] { display: none; }
.collection-inner {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 520px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  overflow-y: auto; padding: 32px 28px;
  animation: slide-in 0.3s ease;
}
.collection-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.collection-header h2 { font-size: 1.4rem; font-weight: 700; }
.collection-grid {
  display: grid; gap: 12px;
}
.collection-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.collection-card-info h3 { font-size: 1rem; font-weight: 600; }
.collection-card-info p { font-size: 0.82rem; color: var(--text-muted); }
.collection-remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.1rem;
}
.collection-remove:hover { color: var(--danger); }
.collection-empty {
  color: var(--text-muted); text-align: center; padding: 40px 20px;
}

/* ===== TECHNIQUE GUIDE ===== */
.technique-guide {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
}
.guide-inner { max-width: 1280px; margin: 0 auto; }
.guide-inner h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 32px;
  text-align: center;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.guide-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.guide-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.guide-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.guide-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ===== RIMMING KITS ===== */
.rimming-kits { padding: 64px 24px; }
.kits-inner { max-width: 1280px; margin: 0 auto; }
.kits-inner h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 12px;
  text-align: center;
}
.kits-intro {
  text-align: center; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 36px;
  font-size: 0.95rem;
}
.kits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.kit-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  position: relative; transition: all var(--transition);
}
.kit-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.kit-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 20px; font-weight: 700;
}
.kit-beginner .kit-badge { background: #2d5a2d; color: #8fd68f; }
.kit-intermediate .kit-badge { background: #5a4a1a; color: #e8c77c; }
.kit-advanced .kit-badge { background: #4a1a2a; color: #e87ca0; }
.kit-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.kit-card ul { list-style: none; margin-bottom: 14px; }
.kit-card li {
  padding: 4px 0; color: var(--text-secondary);
  font-size: 0.9rem; padding-left: 18px; position: relative;
}
.kit-card li::before {
  content: '·'; position: absolute; left: 0;
  color: var(--accent); font-weight: 700; font-size: 1.2rem;
}
.kit-card p { color: var(--text-muted); font-size: 0.88rem; }

/* ===== EDGE CASES ===== */
.edge-cases {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
}
.edge-inner { max-width: 1280px; margin: 0 auto; }
.edge-inner h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 12px;
  text-align: center;
}
.edge-intro {
  text-align: center; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 36px;
  font-size: 0.95rem;
}
.edge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.edge-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  border-top: 3px solid var(--accent);
}
.edge-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.edge-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ===== REFERENCE NOTES ===== */
.reference-notes { padding: 64px 24px; }
.notes-inner { max-width: 1280px; margin: 0 auto; }
.notes-inner h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 32px;
  text-align: center;
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.note-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.note-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ===== FAQ ===== */
.site-faq {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 64px 24px;
}
.faq-inner { max-width: 800px; margin: 0 auto; }
.faq-inner h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent-light); margin-bottom: 32px;
  text-align: center;
}
.faq-list { display: grid; gap: 24px; }
.faq-list dt {
  font-weight: 700; font-size: 1.05rem;
  color: var(--text-primary); margin-bottom: 6px;
}
.faq-list dd {
  color: var(--text-secondary); font-size: 0.93rem;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 20px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 400px; }
.footer-logo { font-weight: 700; color: var(--accent-light); font-size: 1.1rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--accent-light); }
.footer-meta { color: var(--text-muted); font-size: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 48px 20px 40px; }
  .hero-visual { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .filter-group { flex-direction: row; flex-wrap: wrap; }
  .filter-btn { font-size: 0.82rem; padding: 6px 10px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 12px 16px; }
  .logo-text { font-size: 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .drawer-panel { padding: 24px 20px; width: 100%; }
  .collection-inner { padding: 24px 20px; }
}

/* Print */
@media print {
  .site-header, .filter-panel, .hero-actions, .btn, .card-bookmark, .detail-drawer, .collection-panel, .site-footer, .hero-visual { display: none !important; }
  body { background: white; color: #111; }
  .cocktail-card { break-inside: avoid; border: 1px solid #ccc; background: white; }
  .card-name { color: #111; }
  .card-rim, .card-garnish { color: #444; }
  .hero { padding: 20px 0; }
  .hero h1 { color: #111; }
  .hero-sub { color: #444; }
}

/* Print card styles */
.print-card { display: none; }
@media print {
  .print-card { display: block; }
  .print-card .print-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 12px; margin-top: 16px;
  }
  .print-item {
    border: 1px solid #ccc; padding: 10px;
    break-inside: avoid;
  }
  .print-item strong { display: block; font-size: 0.85rem; margin-bottom: 4px; }
  .print-item span { font-size: 0.78rem; color: #555; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
