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

:root {
  --primary: #3a8fd4;
  --primary-dark: #2a6fa8;
  --primary-light: #66b7e5;
  --gradient-start: #3a8fd4;
  --gradient-mid: #4da3e0;
  --gradient-end: #66b7e5;
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg, #f8fafc);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s;
}

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  padding: 0.5rem 1rem 0;
  position: relative;
  text-align: center;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ===== Brand Section ===== */
.brand-section {
  margin-bottom: 0.5rem;
  text-align: center;
}

.brand-logo {
  max-height: 160px;
  width: auto;
  margin-bottom: 0;
}

/* Disclaimer above product grid (Option A) */
.grid-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}


/* ===== Wave ===== */
.wave {
  position: relative;
  z-index: 1;
  margin-top: -1px;
}

.wave svg {
  display: block;
  width: 100%;
  height: 40px;
}

/* ===== Search ===== */
.search-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto 0.5rem;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  outline: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s;
}

.search-input:focus {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* ===== Category Tabs ===== */
.categories-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
}

.categories-wrapper::-webkit-scrollbar {
  display: none;
}

.categories {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: max-content;
  padding: 0 1rem;
}

.category-tab {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid var(--tab-border, rgba(255,255,255,0.4));
  background: var(--tab-bg, rgba(255,255,255,0.15));
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  user-select: none;
}

.category-tab:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.6);
}

.category-tab.active {
  background: var(--tab-active-bg, #ffffff);
  color: var(--tab-active-text, var(--primary));
  border-color: var(--tab-active-bg, #ffffff);
  font-weight: 600;
}

/* ===== Main Content ===== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

/* ===== Seasonal Heading ===== */
.seasonal-heading {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
}

.heading-emoji {
  font-size: 1.75rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.heading-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  vertical-align: middle;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ===== Product Card ===== */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeInUp 0.4s ease both;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.product-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  background: var(--border, #f1f5f9);
  overflow: hidden;
}

.product-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.05);
}

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45em;
}

/* ===== Fade In Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Loader ===== */
.loader {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.loader.hidden {
  display: none;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.no-results p {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
  color: var(--text);
}

.no-results span {
  font-size: 0.875rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--footer-bg, #1e293b);
  color: var(--footer-text, #94a3b8);
  padding: 2rem 1rem;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.affiliate-disclosure {
  font-size: 0.8rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  font-size: 0.75rem;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand {
    font-size: 1.5rem;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
  .header {
    padding: 0.5rem 0.75rem 0;
  }

  .brand {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-info {
    padding: 8px;
  }

  .product-name {
    font-size: 0.8rem;
  }

  .seasonal-heading {
    margin-bottom: 1rem;
  }

  .heading-emoji {
    font-size: 1.25rem;
  }

  .heading-text {
    font-size: 1.25rem;
  }

  .search-input {
    padding: 10px 14px 10px 42px;
    font-size: 0.9rem;
  }

  .category-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .categories {
    justify-content: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .product-name {
    font-size: 0.75rem;
  }
}
