/* =========================================================
   Variables
   ========================================================= */
:root {
  /* Color palette - nature-inspired */
  --color-bg: #f5f3ee;              /* soft beige background */
  --color-surface: #ffffff;         /* clean white surface */
  --color-text: #222222;            /* primary text */
  --color-text-muted: #667081;      /* muted text */

  --color-primary: #3b7d3a;         /* leaf green */
  --color-primary-soft: #e0f1e0;    /* soft green tint */

  --color-accent: #3a7ca5;          /* sky blue */
  --color-accent-soft: #e1f0fa;

  --color-earth: #7a5a3a;           /* earthy brown */
  --color-earth-soft: #efe4d8;

  --color-success: #2e7d32;         /* success green */
  --color-warning: #f9a825;         /* warm yellow */
  --color-danger: #c62828;          /* error red */

  /* Neutral grays */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5f5;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-serif: "Merriweather", "Georgia", "Times New Roman", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 0.125rem; /* 2px */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 999px;

  /* Shadows - soft, natural */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.12),
    0 4px 6px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease-out;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding-x: 1.25rem; /* 20px, comfortable on mobile */
}

/* =========================================================
   Reset / Normalize
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove default link underlines but keep color inherit */
a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   Base Styles
   ========================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings - clear hierarchy, modern and welcoming */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--line-height-snug);
  color: var(--gray-900);
}

h1 {
  font-size: clamp(2rem, 3vw, var(--font-size-4xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, var(--font-size-3xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  /* comfortable line length */
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: 600;
}

/* Links - subtle, trustworthy */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-earth);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* =========================================================
   Accessibility & Motion
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   Utilities
   ========================================================= */

/* Layout container for content and product grids */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.section {
  padding-block: var(--space-10);
}

.section--tight {
  padding-block: var(--space-6);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

/* Grid helpers – useful for product listings */
.grid {
  display: grid;
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

/* Screen readers only */
.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;
}

/* Simple spacing utilities (vertical margins) */
.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

/* =========================================================
   Components
   ========================================================= */

/* Buttons - primary actions feel natural and trustworthy */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: #326933;
  --btn-color: #ffffff;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-inline: var(--space-4);
  padding-block: 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background-color: var(--btn-bg);
  color: var(--btn-color)!important;
  font-weight: 500;
  font-size: var(--font-size-sm);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background-color: var(--btn-bg-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.button:focus-visible,
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.button--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(59, 125, 58, 0.06);
  --btn-color: var(--color-primary);
  border-color: rgba(59, 125, 58, 0.25);
  box-shadow: none;
}

.button--secondary {
  --btn-bg: var(--color-earth-soft);
  --btn-bg-hover: #e3d5c4;
  --btn-color: var(--color-earth);
}

.button[disabled],
button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled],
input[type="reset"][disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Inputs & form fields - consistent and calm */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding-inline: var(--space-3);
  padding-block: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-soft);
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

label {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--gray-700);
}

/* Card - for product previews, filters, reviews */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.card--highlight {
  border: 1px solid var(--color-primary-soft);
  box-shadow: var(--shadow-md);
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
}

/* Tag / badge - e.g., seasonal, bestseller */
.badge {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-2);
  padding-block: 0.15rem;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.badge--outline {
  background-color: transparent;
  border: 1px solid var(--color-primary-soft);
}

/* Simple chip for filters */
.chip {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-3);
  padding-block: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-300);
  font-size: var(--font-size-sm);
  color: var(--gray-700)!important;
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.chip--active,
.chip:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-soft);
  color: var(--color-primary)!important;
}

/* Helper for image wrappers (e.g., lifestyle product imagery) */
.image-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.image-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Subtle section dividers that feel organized but not harsh */
.divider {
  border: 0;
  border-top: 1px solid var(--gray-200);
  margin-block: var(--space-6);
}
