/* =============================================
   CatalogThisWeek — Main Stylesheet
   ============================================= */

/* CSS Variables */
:root {
  --brand: #FF6B35;
  --brand-dark: #e05520;
  --brand-light: #fff3ee;
  --dark: #1e293b;
  --dark-2: #334155;
  --mid: #64748b;
  --light: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--dark);
}

ul {
  list-style: none;
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.nav-logo span:first-child {
  color: var(--brand);
}

.nav-logo span:last-child {
  color: var(--dark);
}

.nav-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  outline: none;
  background: var(--light);
  color: var(--dark);
  transition: border-color var(--transition), background var(--transition);
}

.nav-search input:focus {
  border-color: var(--brand);
  background: var(--white);
}

.nav-search input::placeholder {
  color: var(--mid);
}

.nav-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mid);
  font-size: 0.9rem;
  pointer-events: none;
}

.nav-badge {
  margin-left: auto;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  white-space: nowrap;
  border: 1px solid rgba(255,107,53,0.2);
}

/* =============================================
   HERO SECTIONS
   ============================================= */

.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--white);
  text-align: center;
  padding: 64px 20px 56px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,107,53,0.2);
  color: var(--brand);
  border: 1px solid rgba(255,107,53,0.35);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--brand);
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-country {
  background: linear-gradient(135deg, var(--dark) 0%, #2d3a4f 100%);
  padding: 48px 20px;
}

.hero-country-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.hero-flag {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: block;
}

.hero-category {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 44px 20px;
  text-align: center;
}

.hero-category h1 {
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.hero-category p {
  color: rgba(255,255,255,0.85);
  margin-top: 8px;
}

/* =============================================
   CONTAINER
   ============================================= */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-sm {
  padding: 36px 0;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--mid);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.section-header {
  margin-bottom: 28px;
}

/* =============================================
   COUNTRIES GRID
   ============================================= */

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-align: center;
}

.country-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--dark);
}

.country-card-flag {
  font-size: 2rem;
  line-height: 1;
}

.country-card-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
}

.country-card-local {
  font-size: 0.76rem;
  color: var(--mid);
}

.country-card.hidden {
  display: none;
}

/* =============================================
   CATEGORIES GRID
   ============================================= */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  transition: all var(--transition);
  text-align: center;
}

.category-card:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.category-card-name {
  font-size: 0.88rem;
  font-weight: 600;
}

/* =============================================
   STORES GRID & CARD
   ============================================= */

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

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  transition: all var(--transition);
  text-align: center;
}

.store-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--dark);
}

.store-card-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--light);
  padding: 6px;
  border: 1px solid var(--border);
}

.store-card-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  border: 1px solid rgba(255,107,53,0.2);
}

.store-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
}

.store-card-desc {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.4;
}

/* =============================================
   FLYERS GRID & CARD
   ============================================= */

.flyers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.flyer-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--dark);
  display: flex;
  flex-direction: column;
}

.flyer-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  color: var(--dark);
}

.flyer-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--light);
}

.flyer-card-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--light), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--mid);
}

.flyer-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flyer-card-store {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flyer-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.flyer-card-dates {
  font-size: 0.8rem;
  color: var(--mid);
  margin-top: auto;
}

.flyer-card-btn {
  display: block;
  margin: 0 16px 14px;
  padding: 9px;
  background: var(--brand);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
  text-decoration: none;
}

.flyer-card-btn:hover {
  background: var(--brand-dark);
  color: var(--white);
}

/* =============================================
   FEATURE CARDS (Home)
   ============================================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
}

.feature-card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.6;
}

/* =============================================
   SEO CONTENT BLOCK
   ============================================= */

.seo-block {
  background: var(--light);
  border-top: 1px solid var(--border);
  padding: 52px 0;
}

.seo-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--dark);
}

.seo-block .intro-text {
  font-size: 0.97rem;
  color: var(--dark-2);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 760px;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
  font-size: 0.9rem;
}

.seo-table th {
  background: var(--dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.seo-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
}

.seo-table tr:last-child td {
  border-bottom: none;
}

.seo-table tr:hover td {
  background: var(--brand-light);
}

.seo-faq-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.faq-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.65;
}

/* =============================================
   BREADCRUMB
   ============================================= */

.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--mid);
}

.breadcrumb a {
  color: var(--mid);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span {
  margin: 0 6px;
  color: var(--border);
}

/* =============================================
   EMPTY STATES
   ============================================= */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--mid);
}

.empty-state-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--dark-2);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.9rem;
}

/* =============================================
   BADGES & TAGS
   ============================================= */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-brand {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid rgba(255,107,53,0.25);
}

.badge-dark {
  background: var(--dark);
  color: var(--white);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 52px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .nav-logo {
  font-size: 1.2rem;
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--brand);
}

/* =============================================
   SECTION BACKGROUNDS
   ============================================= */

.bg-light {
  background: var(--light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* =============================================
   DIVIDERS
   ============================================= */

.divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .nav-badge {
    display: none;
  }

  .hero {
    padding: 44px 16px 36px;
  }

  .section {
    padding: 36px 0;
  }

  .countries-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .stores-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .seo-table {
    font-size: 0.82rem;
  }

  .seo-table th, .seo-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 400px) {
  .nav-search {
    display: none;
  }
}
