/* ========================================================================
   Bloem Haven Base Styles (base.css)
   Modern, elegant, vibrant, natural, refined, user-friendly
   ======================================================================== */

/* ========================================================================
   1. CSS Variables (Design Tokens)
   ======================================================================== */

:root {
  /* Color Palette - Natural, floral & refined */
  --color-background: #f8faf8;
  --color-surface: #ffffff;
  --color-surface-soft: #f3f5f2;

  --color-text: #1f2521;
  --color-text-soft: #4b5a50;
  --color-text-muted: #7a887e;

  /* Accent & brand colors (floral-inspired) */
  --color-primary: #2f7b5a;      /* Deep botanical green */
  --color-primary-soft: #e0f1e7;
  --color-primary-strong: #226249;

  --color-success: #3b8c5f;      /* Healthy foliage */
  --color-warning: #d59629;      /* Warm golden pollen */
  --color-danger: #c6394a;       /* Deep rose red */

  /* Neutral grays */
  --gray-50: #f8faf8;
  --gray-100: #edf1ee;
  --gray-200: #d7dfd9;
  --gray-300: #c0cbc2;
  --gray-400: #a4b1a6;
  --gray-500: #879589;
  --gray-600: #6a786b;
  --gray-700: #505c51;
  --gray-800: #353f37;
  --gray-900: #1f2521;

  /* Borders & outlines */
  --color-border-subtle: var(--gray-200);
  --color-border-soft: var(--gray-300);
  --color-border-strong: var(--gray-500);
  --color-focus-ring: #f28a9b;   /* Soft floral pink */

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Times New Roman", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 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 */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* 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-7: 1.75rem;  /* 28px */
  --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 */

  /* Radii */
  --radius-none: 0;
  --radius-sm: 0.25rem;     /* 4px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-full: 9999px;

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

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  --transition-base: color var(--transition-normal),
                     background-color var(--transition-normal),
                     border-color var(--transition-normal),
                     box-shadow var(--transition-normal),
                     transform var(--transition-normal);
}

/* ========================================================================
   2. Reset & Normalize
   ======================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

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

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

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

img {
  height: auto;
}

textarea {
  resize: vertical;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:where(a) {
  color: inherit;
}

/* Remove default list styles on ul, ol elements that have a class */
ul[class], ol[class] {
  list-style: none;
}

/* ========================================================================
   3. Base Typography & Layout
   ======================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

/* Headings - modern & elegant with serif accents for hero if desired */

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

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.02em;
  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-md);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

/* Paragraphs - comfortable line length & breathing room */

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

p + p {
  margin-top: -0.25rem;
}

strong {
  font-weight: 600;
}

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

/* Links - refined, without default underline, subtle floral accent */

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

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

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

/* ========================================================================
   4. Accessibility & Motion
   ======================================================================== */

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  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;
  }
}

/* ========================================================================
   5. Layout Utilities
   ======================================================================== */

/* Container - for content alignment across breakpoints */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1200px;
}

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

/* Flex utilities */

.flex {
  display: flex;
}

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

.flex-row {
  flex-direction: row;
}

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

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

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

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

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

/* Grid utilities */

.grid {
  display: grid;
}

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

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

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

/* Simple spacing utilities for vertical rhythm */

.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--space-2) !important; }
.mt-sm { margin-top: var(--space-3) !important; }
.mt-md { margin-top: var(--space-4) !important; }
.mt-lg { margin-top: var(--space-6) !important; }
.mt-xl { margin-top: var(--space-8) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--space-2) !important; }
.mb-sm { margin-bottom: var(--space-3) !important; }
.mb-md { margin-bottom: var(--space-4) !important; }
.mb-lg { margin-bottom: var(--space-6) !important; }
.mb-xl { margin-bottom: var(--space-8) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Screen reader only utility */

.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;
}

/* ========================================================================
   6. Forms & Interactive Elements
   ======================================================================== */

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

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-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-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-soft);
}

/* ========================================================================
   7. Components
   ======================================================================== */

/* Buttons - primary, soft, ghost for refined e-commerce actions */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.btn:hover {
  background-color: var(--color-primary-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
  background-color: var(--gray-200);
  color: var(--gray-500);
  box-shadow: none;
  transform: none;
}

.btn--secondary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border-subtle);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--color-primary-soft);
}

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

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--color-text);
}

.btn--danger {
  background-color: var(--color-danger);
}

.btn--danger:hover {
  background-color: #a72f3e;
}

/* Card - for products, categories, highlights */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  border: 1px solid rgba(31, 37, 33, 0.03);
  transition: var(--transition-base);
}

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

.card__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

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

.card__body {
  flex: 1 1 auto;
}

.card__title {
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.card__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Tag / Pill - for categories like "Seizoensboeket", "Vandaag bezorgd" */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--gray-50);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pill--accent {
  background-color: var(--color-primary-soft);
  border-color: transparent;
  color: var(--color-primary-strong);
}

/* Badges for small notifications (e.g., cart count) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: var(--radius-full);
  background-color: var(--color-danger);
  color: #ffffff;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* ========================================================================
   8. Media & Imagery
   ======================================================================== */

/* Soft rounded corners for hero & product imagery */

.img-rounded {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.img-soft-shadow {
  box-shadow: var(--shadow-md);
}

/* ========================================================================
   9. Helper Classes for E-commerce Layout
   ======================================================================== */

/* Section spacing helpers */

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--soft {
  background-color: var(--color-surface-soft);
}

.section__header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.section__eyebrow {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.section__title {
  font-family: var(--font-serif);
  font-size: var(--font-size-3xl);
}

.section__subtitle {
  margin-top: var(--space-3);
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-soft);
  max-width: 45rem;
}

/* Price text */

.price {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

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

/* ========================================================================
   10. Misc
   ======================================================================== */

hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}

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

pre {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background-color: #111827;
  color: #e5e7eb;
  overflow-x: auto;
}

/* End of base.css */
