/* ===================================================
   NewGiftsAndGadgets.com — Design Tokens & Base Styles
   =================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --brand-primary: hsl(220, 65%, 38%);
  --brand-primary-hover: hsl(220, 65%, 30%);
  --brand-secondary: hsl(160, 50%, 45%);
  --brand-secondary-hover: hsl(160, 50%, 38%);
  --brand-accent: hsl(32, 95%, 55%);
  --brand-accent-hover: hsl(32, 95%, 48%);
  --brand-dark: hsl(220, 25%, 15%);
  --brand-light: hsl(220, 20%, 97%);
  --surface: hsl(0, 0%, 100%);
  --border: hsl(220, 15%, 90%);
  --text-primary: hsl(220, 25%, 20%);
  --text-secondary: hsl(220, 10%, 45%);
  --text-muted: hsl(220, 10%, 60%);
  --danger: hsl(0, 75%, 55%);
  --star-gold: hsl(45, 95%, 55%);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--brand-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--brand-primary-hover); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-family: var(--font-heading); font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
p { margin-bottom: var(--space-md); }

@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.container--narrow { max-width: var(--container-narrow); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 75, 142, 0.25);
}
.btn--primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 75, 142, 0.35);
  color: #fff;
}
.btn--secondary {
  background: transparent;
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
}
.btn--secondary:hover {
  background: var(--brand-primary);
  color: #fff;
}
.btn--accent {
  background: var(--brand-secondary);
  color: #fff;
}
.btn--accent:hover {
  background: var(--brand-secondary-hover);
  color: #fff;
}
.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--lg { padding: 18px 36px; font-size: 1.125rem; }
.btn--block { width: 100%; justify-content: center; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.card__body { padding: var(--space-xl); }
.card__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}
.card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.card__excerpt {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Product Card --- */
.product-card { position: relative; }
.product-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  z-index: 2;
}
.badge--pick { background: var(--brand-accent); }
.badge--value { background: var(--brand-secondary); }
.badge--premium { background: var(--brand-primary); }
.badge--new { background: hsl(270, 60%, 55%); }
.badge--sale { background: var(--danger); }

.product-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f8f9fa;
  padding: var(--space-lg);
}
.product-card__body { padding: var(--space-lg); }
.product-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  color: var(--star-gold);
  font-size: 0.875rem;
}
.product-card__rating span { color: var(--text-muted); font-weight: 500; }
.product-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.product-card__price .original-price {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: var(--space-sm);
  font-weight: 400;
}

/* --- Star Rating --- */
.stars { color: var(--star-gold); letter-spacing: 2px; }
.stars .empty { color: var(--border); }

/* --- Badges & Tags --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag--office { background: hsl(220, 90%, 95%); color: var(--brand-primary); }
.tag--smart { background: hsl(160, 60%, 93%); color: var(--brand-secondary); }
.tag--kitchen { background: hsl(32, 90%, 93%); color: hsl(32, 80%, 40%); }

/* --- Section Styles --- */
.section {
  padding: var(--space-3xl) 0;
}
.section--alt { background: var(--surface); }
.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section__header h2 { margin-bottom: var(--space-sm); }
.section__header p {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 576px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Pros/Cons Box --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
@media (min-width: 576px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}
.pros-cons__list {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}
.pros-cons__list--pros {
  background: hsl(160, 60%, 95%);
  border: 1px solid hsl(160, 50%, 85%);
}
.pros-cons__list--cons {
  background: hsl(0, 60%, 97%);
  border: 1px solid hsl(0, 50%, 90%);
}
.pros-cons__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}
.pros-cons__list ul {
  list-style: none;
  padding: 0;
}
.pros-cons__list li {
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
  font-size: 0.9375rem;
}
.pros-cons__list--pros li::before { content: '✓'; position: absolute; left: 0; color: var(--brand-secondary); font-weight: 700; }
.pros-cons__list--cons li::before { content: '✗'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-table th,
.comparison-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  background: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table tr:hover { background: hsl(220, 20%, 98%); }
.comparison-table .winner {
  background: hsl(160, 60%, 96%);
  border-left: 3px solid var(--brand-secondary);
}

/* --- CTA Block --- */
.cta-block {
  background: linear-gradient(135deg, var(--brand-primary) 0%, hsl(240, 50%, 45%) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  color: #fff;
  margin: var(--space-2xl) 0;
}
.cta-block h3 { color: #fff; margin-bottom: var(--space-sm); }
.cta-block p { color: rgba(255,255,255,0.85); margin-bottom: var(--space-lg); }
.cta-block .btn {
  background: #fff;
  color: var(--brand-primary);
  font-weight: 700;
}
.cta-block .btn:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

/* --- Product Box (inline affiliate) --- */
.product-box {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
  align-items: center;
}
.product-box--featured { border-color: var(--brand-accent); border-width: 2px; }
.product-box__image {
  flex: 0 0 180px;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.product-box__info { flex: 1; }
.product-box__title { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--space-xs); }
.product-box__meta { color: var(--text-muted); font-size: 0.875rem; margin-bottom: var(--space-sm); }

@media (max-width: 576px) {
  .product-box { flex-direction: column; text-align: center; }
  .product-box__image { flex: none; width: 150px; margin: 0 auto; }
}

/* --- Navigation --- */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  min-height: 70px;
}
.site-nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.site-nav__logo span { color: var(--brand-primary); }
.site-nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}
.site-nav__links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color 0.2s;
}
.site-nav__links a:hover,
.site-nav__links a.active {
  color: var(--brand-primary);
}
.site-nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-primary);
  transition: width 0.25s ease;
}
.site-nav__links a:hover::after,
.site-nav__links a.active::after { width: 100%; }

/* Mobile Nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: var(--space-md);
  }
  .site-nav__links.active { display: flex; }
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, hsl(220, 65%, 95%) 0%, hsl(160, 40%, 94%) 50%, hsl(32, 60%, 95%) 100%);
  padding: var(--space-4xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34,75,142,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
}
.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero { padding: var(--space-3xl) 0; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.0625rem; }
}

/* --- Footer --- */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
.footer-brand p { margin-top: var(--space-sm); font-size: 0.9375rem; line-height: 1.6; color: rgba(255,255,255,0.5); }
.footer-col h4 { color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-md); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-sm); }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.9375rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Newsletter Section --- */
.newsletter-section {
  background: linear-gradient(135deg, var(--brand-primary), hsl(240, 50%, 45%));
  padding: var(--space-3xl) 0;
  text-align: center;
  color: #fff;
}
.newsletter-section h2 { color: #fff; margin-bottom: var(--space-sm); }
.newsletter-section p { color: rgba(255,255,255,0.85); max-width: 500px; margin: 0 auto var(--space-lg); }
.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 450px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { outline: none; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.newsletter-form button {
  padding: 14px 28px;
  background: #fff;
  color: var(--brand-primary);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.newsletter-form button:hover { background: rgba(255,255,255,0.9); transform: translateY(-1px); }

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand-primary); }
.breadcrumbs span { margin: 0 var(--space-xs); }

/* --- Affiliate Disclosure --- */
.affiliate-notice {
  background: hsl(220, 20%, 96%);
  border-left: 3px solid var(--brand-primary);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-xl);
}
