/* ============================
   Svadesha UI - Global Design System
   ============================ */

/* CSS Variables */
:root {
  /* Colors */
  --bg: #F5EFE6;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #0ea5e9;
  --accent-600: #0284c7;

  /* Radius */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;

  /* Shadows */
  --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-m: 0 6px 12px rgba(0, 0, 0, 0.08);
  --shadow-l: 0 12px 24px rgba(0, 0, 0, 0.12);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* Layout */
  --container: 1200px;
}

/* Reset / Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.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;
}

.container {
  width: 100%;
  max-width: var(--container);
  padding-inline: var(--space-4);
  margin-inline: auto;
}

/* ============================
   Header
   ============================ */
.main-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 2fr) 1fr;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-4);
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.country-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 0.375rem 0.75rem;
  background: #fff;
  color: var(--text);
}

.search-bar input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.5rem 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.header-right {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-4);
}
.header-link {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-s);
  transition: background-color 0.2s ease;
}
.header-link:hover,
.header-link:focus-visible {
  background: #f8fafc;
  outline: none;
}

/* ============================
   Primary Navigation
   ============================ */
.primary-nav {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.primary-nav .container {
  position: relative;
  padding-block: var(--space-3);
}
.primary-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.primary-nav li { margin: 0; }
.primary-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.375rem 0.25rem;
  border-radius: var(--radius-s);
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent-600);
  outline: none;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-s);
  padding: 0.5rem 0.75rem;
}

/* ============================
   Sections
   ============================ */
.section-header {
  display: grid;
  gap: 0.5rem;
  margin-block: var(--space-8) var(--space-6);
  text-align: center;
}
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: clamp(1.25rem, 1.2rem + 1vw, 2rem);
  margin: 0;
}
.section-subtitle {
  color: var(--muted);
  margin: 0;
}

/* ============================
   Product Grid and Cards
   ============================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}

.product-card {
  grid-column: span 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
  border-color: #dbe1e8;
}
.product-card:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

.product-link {
  display: grid;
  grid-template-rows: auto 1fr;
  color: inherit;
}

.product-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f1f5f9;
  overflow: hidden;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.3s ease;
}
.product-card:hover .product-media img {
  transform: scale(1.03);
}

.product-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(14, 165, 233, 0.95);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  box-shadow: var(--shadow-s);
}

.product-info {
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: grid;
  gap: var(--space-2);
}
.product-title {
  font-size: 1rem;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-top: 0.25rem;
  color: var(--muted);
}
.product-price {
  color: var(--text);
  font-weight: 600;
}

/* ============================
   About Page Components
   ============================ */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-600); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: #d1d5db;
  background: #f8fafc;
}

/* Hero Intro */
.hero-intro { padding-block: calc(var(--space-10) * 1.2); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.hero-content { display: grid; gap: var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-media {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-m);
  background: #f1f5f9;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Generic Card + Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-s);
}

.content-columns {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}
.content-columns .card { grid-column: span 6; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}
.values-grid .value-card { grid-column: span 4; }

.steps-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}
.step-card { grid-column: span 4; }
.step-index {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  margin-right: 0.5rem;
  color: var(--accent-600);
  font-weight: 700;
}

.materials-note {
  margin-top: var(--space-6);
  border-left: 4px solid var(--accent);
}

.quotes {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.quotes .quote-card { grid-column: span 6; }
.quote-card blockquote {
  margin: 0 0 var(--space-3) 0;
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
}

/* CTA */
.cta-section { text-align: center; padding-block: var(--space-10); }
.cta-actions {
  margin-top: var(--space-4);
  display: inline-flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Responsive for About page */
@media (max-width: 1200px) {
  .values-grid .value-card { grid-column: span 6; } /* 2 per row */
  .step-card { grid-column: span 6; } /* 2 per row */
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .content-columns .card { grid-column: span 12; }
  .values-grid { grid-template-columns: repeat(6, 1fr); }
  .values-grid .value-card { grid-column: span 6; }
  .steps-grid { grid-template-columns: repeat(6, 1fr); }
  .step-card { grid-column: span 6; }
  .quotes { grid-template-columns: repeat(6, 1fr); }
  .quotes .quote-card { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .hero-intro { padding-block: var(--space-8); }
}

/* ============================
   Contact Page
   ============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.form-field {
  display: grid;
  gap: 0.375rem;
  margin-bottom: var(--space-4);
}
.form-field label { font-weight: 600; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 0.625rem 0.75rem;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.req { color: #ef4444; }

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
input.is-valid,
select.is-valid,
textarea.is-valid {
  border-color: #16a34a;
}

.field-error {
  color: #b91c1c;
  font-size: 0.875rem;
}
.field-help,
.privacy-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-actions { margin-top: var(--space-4); }

.form-status {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-m);
  border: 1px solid transparent;
}
.form-status.status-success {
  background: rgba(22, 163, 74, 0.08);
  border-color: #16a34a;
  color: #065f46;
}
.form-status.status-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  color: #7f1d1d;
}

/* Direct contact aside */
.direct-contact .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.direct-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.direct-contact .icon { color: var(--accent-600); }

.map-placeholder {
  margin-top: var(--space-4);
  height: 180px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-l);
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* FAQ cards */
.faq-section .values-grid .card { grid-column: span 3; }
@media (max-width: 1200px) {
  .faq-section .values-grid .card { grid-column: span 6; }
}
@media (max-width: 768px) {
  .faq-section .values-grid .card { grid-column: 1 / -1; }
}

/* Social proof tiles (About > "Notes from our community and press") */
.social-proof .values-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}
.social-proof .values-grid .quote-card { grid-column: span 4; } /* 3 per row on desktop */
@media (max-width: 1200px) {
  .social-proof .values-grid .quote-card { grid-column: span 6; } /* 2 per row */
}
@media (max-width: 768px) {
  .social-proof .values-grid .quote-card { grid-column: 1 / -1; } /* 1 per row */
}
.social-proof .quote-card blockquote { margin: 0 0 var(--space-3) 0; }
.social-proof .quote-card figcaption { color: var(--muted); font-size: 0.9rem; }

/* ============================
   Footer
   ============================ */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-10);
  padding-block: var(--space-6);
  color: var(--muted);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 1200px) {
  .product-card { grid-column: span 4; } /* 3 per row */
}

@media (max-width: 900px) {
  .header-grid { grid-template-columns: 1fr auto auto; }
  .search-bar { order: 3; grid-column: 1 / -1; }
  .product-card { grid-column: span 6; } /* 2 per row */
}

@media (max-width: 768px) {
  .primary-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background-color: #fff;
    width: 100%;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-s);
    z-index: 10;
  }
  .primary-nav ul.show { display: flex; }
  .nav-toggle { display: inline-block; }

  .product-grid { grid-template-columns: repeat(6, 1fr); }
  .product-card { grid-column: 1 / -1; } /* 1 per row */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
