/* ========================================================================== 
   Variables
   ========================================================================== */
:root {
  /* Color Palette - warm, sophisticated, Dutch kitchen aesthetic */
  --color-bg: #f8f3eb; /* warm cream */
  --color-bg-alt: #fdfbf7; /* soft off-white */
  --color-surface: #ffffff; /* cards, panels */
  --color-text: #26231f; /* deep warm neutral */
  --color-text-muted: #6f675f;

  --color-primary: #b53d31; /* terracotta red */
  --color-primary-soft: #f3dfd9;

  --color-accent: #6b7b4b; /* olive green */
  --color-accent-soft: #e3e7d9;

  --color-success: #3c8c5b;
  --color-warning: #c27b25;
  --color-danger: #b53030;

  --color-border-subtle: #e0d6c9;
  --color-border: #c9b8a5;

  --color-neutral-50: #faf6f0;
  --color-neutral-100: #f2e8dd;
  --color-neutral-200: #e3d5c2;
  --color-neutral-300: #d4c3ac;
  --color-neutral-400: #b7a089;
  --color-neutral-500: #8f7862;
  --color-neutral-600: #6b5746;
  --color-neutral-700: #514133;
  --color-neutral-800: #392d23;
  --color-neutral-900: #251c15;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-sans-alt: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --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 */
  --font-size-5xl: 2.75rem;  /* 44px */

  --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.125rem;  /* 2px */
  --space-2: 0.25rem;   /* 4px */
  --space-3: 0.375rem;  /* 6px */
  --space-4: 0.5rem;    /* 8px */
  --space-5: 0.625rem;  /* 10px */
  --space-6: 0.75rem;   /* 12px */
  --space-8: 1rem;      /* 16px */
  --space-10: 1.25rem;  /* 20px */
  --space-12: 1.5rem;   /* 24px */
  --space-16: 2rem;     /* 32px */
  --space-20: 2.5rem;   /* 40px */
  --space-24: 3rem;     /* 48px */
  --space-28: 3.5rem;   /* 56px */
  --space-32: 4rem;     /* 64px */
  --space-40: 5rem;     /* 80px */
  --space-48: 6rem;     /* 96px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-round: 999px;

  /* Shadows - soft, layered for premium feel */
  --shadow-soft: 0 8px 24px rgba(24, 16, 8, 0.06);
  --shadow-medium: 0 16px 40px rgba(24, 16, 8, 0.08);
  --shadow-strong: 0 24px 60px rgba(24, 16, 8, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

/* ========================================================================== 
   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;
  color: inherit;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif-display);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 2vw + 1.8rem, 2.75rem);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.875rem, 1.4vw + 1.5rem, 2.25rem);
  margin-bottom: var(--space-12);
}

h3 {
  font-size: clamp(1.5rem, 1vw + 1.25rem, 1.875rem);
  margin-bottom: var(--space-10);
}

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

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

h6 {
  font-size: var(--font-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

p {
  margin-bottom: var(--space-10);
  color: var(--color-text);
}

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

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

strong {
  font-weight: 600;
}

a {
  position: relative;
  transition: color var(--transition-base);
}

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

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

/* Underline style for key links (optional utility class) */
.a-underline,
nav a,
.header a {
  text-decoration: none;
}

.a-underline::after,
nav a::after,
.header a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-base);
}

.a-underline:hover::after,
nav a:hover::after,
.header a:hover::after {
  width: 100%;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

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

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

/* Visually hidden but accessible to screen readers */
.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;
}

/* ========================================================================== 
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-16);
}

@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

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

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

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

/* 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-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

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

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

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

.gap-xl {
  gap: var(--space-24);
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-16);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-20);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-24);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-24);
}

@media (max-width: 960px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Simple spacing utilities (margin-bottom only for rhythm) */
.mb-0 {
  margin-bottom: 0 !important;
}

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

.mb-sm {
  margin-bottom: var(--space-8) !important;
}

.mb-md {
  margin-bottom: var(--space-12) !important;
}

.mb-lg {
  margin-bottom: var(--space-16) !important;
}

.mb-xl {
  margin-bottom: var(--space-24) !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

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

/* ========================================================================== 
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-round);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #fff!important;
  box-shadow: 0 10px 24px rgba(181, 61, 49, 0.22);
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
}

.btn:hover {
  background-color: #9c3429;
  box-shadow: 0 14px 32px rgba(181, 61, 49, 0.28);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(24, 16, 8, 0.18);
}

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

.btn--ghost {
  background-color: transparent;
  color: var(--color-text)!important;
  border-color: var(--color-border);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.btn--secondary {
  background-color: var(--color-accent);
  box-shadow: 0 10px 24px rgba(107, 123, 75, 0.22);
}

.btn--secondary:hover {
  background-color: #5d6c40;
}

.btn--full {
  width: 100%;
}

.btn[disabled],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Form elements */
.input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

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

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

label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-neutral-800);
}

.form-field {
  margin-bottom: var(--space-12);
}

.form-hint {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card - for curated product collections & content blocks */
.card {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 184, 165, 0.6);
  padding: var(--space-16);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card--soft {
  background: radial-gradient(circle at top left, #fdf7f1 0, #ffffff 60%);
}

.card--tight {
  padding: var(--space-12);
}

.card-header {
  margin-bottom: var(--space-10);
}

.card-title {
  font-family: var(--font-serif-display);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

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

.card-footer {
  margin-top: var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Tag / Pill for product labels */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-round);
  border: 1px solid rgba(181, 61, 49, 0.18);
  font-size: var(--font-size-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-neutral-700);
  background: rgba(248, 243, 235, 0.9);
}

.tag--accent {
  border-color: rgba(107, 123, 75, 0.2);
  background: rgba(227, 231, 217, 0.9);
}

/* Image wrappers for immersive photography */
.media-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

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

.media-raised {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

/* Background accents */
.surface-elevated {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-lg);
}

.surface-steel {
  background: linear-gradient(135deg, #f1f1f3 0, #d4d7dd 50%, #f4f5f7 100%);
  color: var(--color-neutral-900);
}

/* Badges for status (stock, shipping, etc.) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-round);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.badge--success {
  background-color: rgba(60, 140, 91, 0.12);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(194, 123, 37, 0.12);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(181, 48, 48, 0.12);
  color: var(--color-danger);
}

/* ========================================================================== 
   End of base.css
   ========================================================================== */
