/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --font: 'Outfit', sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-blur: 16px;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  --accent: #111111;
  --accent-2: #555555;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --gradient: linear-gradient(135deg, #667eea 0%, #e0729f 50%, #f6a06b 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(224,114,159,0.08) 50%, rgba(246,160,107,0.08) 100%);
  --gradient-text: linear-gradient(135deg, #667eea 0%, #d963a0 60%, #f6a06b 100%);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Glass effect */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Masonry grid */
.masonry {
  column-count: 2;
  column-gap: 18px;
  padding: 0 16px;
  max-width: 1500px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .masonry {
    column-count: 3;
    column-gap: 20px;
    padding: 0 20px;
  }
}

@media (min-width: 1200px) {
  .masonry {
    column-count: 4;
    column-gap: 22px;
    padding: 0 24px;
  }
}

.masonry-item {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 18px;
}

.masonry-item:nth-child(2n) {
  margin-top: 10px;
}

@media (min-width: 768px) {
  .masonry-item:nth-child(2n) {
    margin-top: 0;
  }
  .masonry-item:nth-child(3n + 2) {
    margin-top: 14px;
  }
  .masonry-item:nth-child(3n) {
    margin-top: 24px;
  }
}

@media (min-width: 1200px) {
  .masonry-item:nth-child(3n + 2),
  .masonry-item:nth-child(3n) {
    margin-top: 0;
  }
  .masonry-item:nth-child(4n + 2) {
    margin-top: 14px;
  }
  .masonry-item:nth-child(4n + 3) {
    margin-top: 6px;
  }
  .masonry-item:nth-child(4n) {
    margin-top: 26px;
  }
}

/* Card clean palette */
.card-color-0, .card-color-1, .card-color-2,
.card-color-3, .card-color-4, .card-color-5 {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Staggered fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0.01;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.4s ease-out both;
}

/* Pill badges */
.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pill-vibe {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
}

/* Layout helpers */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container { padding: 0 24px; }
}

@media (min-width: 1200px) {
  .container { padding: 0 32px; }
}

/* Logo */
.logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-style: italic;
  position: relative;
  text-decoration: none;
  color: var(--text-primary);
}

/* Cards */
.card {
  position: relative;
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.card-body { margin-bottom: 16px; }
.card-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.card-brand { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.card-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.card-vibe {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Card Image */
.card-image-wrapper {
  margin: -24px -24px 16px -24px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card-image-fallback {
  width: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 40%),
    linear-gradient(145deg, #f5f5f5 0%, #ececec 100%);
}

.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-16-10 { aspect-ratio: 16 / 10; }

/* Buy Buttons */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.buy-button {
  flex: 1;
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.buy-button:hover { opacity: 0.85; }

.buy-amazon {
  background: #1a1a1a;
  color: white;
}

.buy-direct {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.buy-direct:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* SEO-specific classes */
.seo-header {
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.seo-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  gap: 14px;
}

.seo-nav .nav-link {
  font-size: 0.85rem;
  color: var(--link);
  text-decoration: none;
}

.page-intro {
  text-align: center;
  padding: 48px 24px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.page-intro p {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.page-intro p:last-child {
  margin-bottom: 0;
}

.page-intro h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-family: Georgia, 'Times New Roman', serif;
}

.byline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 12px 0 20px;
}

.hook {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
}

.card-why-picked {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

.personalize-cta {
  text-align: center;
  padding: 48px 24px;
  margin: 48px auto;
  max-width: 600px;
}

.personalize-cta h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.personalize-cta p {
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  padding: 14px 28px;
  background: var(--gradient);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.85;
}

.faq-section {
  max-width: 700px;
  margin: 48px auto;
  padding: 0 24px;
}

.faq-section h2 {
  margin-bottom: 16px;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.faq-item summary {
  font-weight: 400;
  font-size: 1rem;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "\25BE";
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  color: var(--text-secondary);
  padding: 0 0 16px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.related-guides {
  max-width: 700px;
  margin: 48px auto;
  padding: 0 24px;
}

.related-guides ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-guides a {
  color: var(--link);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.6;
}

.related-guides a:hover {
  color: var(--link-hover);
}

.seo-footer {
  text-align: center;
  padding: 64px 24px 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 64px;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-nav a {
  color: #8f8f8f;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 300;
}

.footer-nav a:hover {
  color: #777777;
}

.affiliate-disclosure {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Logo gradient styles */
.logo::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 3px;
  border-radius: 999px;
  background: var(--gradient);
  opacity: 0.85;
}

.logo-gold {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header right group (search + sign in) */
.header-right {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header search bar — slim & minimal */
.header-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  padding: 2px 3px 2px 12px;
  background: transparent;
  transition: border-color 0.2s;
}

.header-search:focus-within {
  border-color: rgba(0, 0, 0, 0.2);
}

.header-search-input {
  padding: 4px 6px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--text-primary);
  outline: none;
  width: 180px;
}

.header-search-input:focus {
  width: 240px;
  transition: width 0.2s;
}

.header-search-input::placeholder { color: #ccc; font-size: 0.78rem; }

.header-search-submit-muted {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #888;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.header-search-submit-muted:hover {
  background: #ddd;
}

.header-auth-link {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  color: var(--link);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.header-auth-link:hover {
  border-color: rgba(102, 126, 234, 0.3);
  color: var(--link-hover);
}

/* Mobile responsive */
@media (max-width: 767px) {
  .page-intro h1 { font-size: 1.75rem; }
}
