/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Color Palette - Nature-inspired, calming, premium */
  --color-bg: #f6f7f4;              /* soft, airy background */
  --color-surface: #ffffff;         /* primary surface/cards */
  --color-text: #1f2933;            /* main text: deep neutral */
  --color-text-muted: #6b7280;      /* secondary text */

  --color-primary: #2f7c5a;         /* natural, trustworthy green */
  --color-primary-soft: #e3f3ea;    /* subtle primary-tinted background */
  --color-primary-dark: #245f45;    /* for hover / emphasis */

  --color-success: #2f855a;         /* confirmations, success states */
  --color-warning: #d97706;         /* alerts, low stock, etc. */
  --color-danger: #b91c1c;          /* errors, destructive actions */

  /* Neutral Grays */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Accent blues for trusted / informational elements */
  --color-info: #2563eb;
  --color-info-soft: #e1effe;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

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

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

  /* Shadows - soft, premium */
  --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.10);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);

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

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-base: 0s;
    --transition-slow: 0s;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


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

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

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

body {
  min-height: 100vh;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: 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;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}


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

main {
  display: block;
}

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

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

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-6);
}

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

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

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

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

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

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

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

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

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

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

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


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

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

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* ========================================================================
   Utilities
   ======================================================================== */
/* Layout Containers */
.container {
  width: 100%;
  max-width: 72rem; /* ~1152px, comfortable for product grids */
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

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

/* 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;
}

/* Grid Helpers */
.grid {
  display: grid;
}

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

/* Spacing Utilities (subset; expand as needed) */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.pt-8 { padding-top: var(--space-8) !important; }
.pb-8 { padding-bottom: var(--space-8) !important; }

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

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

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

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


/* ========================================================================
   Form Elements & Inputs
   ======================================================================== */
label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-300);
  background-color: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), 0 0 0 2px rgba(47, 124, 90, 0.25);
}

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

::file-selector-button {
  border: none;
  padding: 0.5rem 0.75rem;
  margin-right: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-gray-100);
  color: var(--color-text);
  cursor: pointer;
}


/* ========================================================================
   Buttons
   ======================================================================== */
.button,
button[type="button"],
button[type="submit"],
button[type="reset"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

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

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

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

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

.button--secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-gray-300);
  box-shadow: var(--shadow-xs);
}

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

.button--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: transparent;
  box-shadow: none;
}

.button--ghost:hover {
  background-color: var(--color-primary-soft);
}

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

.button--danger:hover {
  background-color: #991b1b;
}


/* ========================================================================
   Card Component
   ======================================================================== */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.card--soft {
  background-color: var(--color-primary-soft);
  border-color: transparent;
}

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

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

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

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

.card__footer {
  margin-top: var(--space-5);
}


/* ========================================================================
   Misc. Structural Helpers
   ======================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge--success {
  background-color: rgba(47, 133, 90, 0.1);
  color: var(--color-success);
}

.badge--warning {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--color-warning);
}

.badge--danger {
  background-color: rgba(185, 28, 28, 0.1);
  color: var(--color-danger);
}

.alert {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--font-size-sm);
}

.alert--info {
  background-color: var(--color-info-soft);
  color: var(--color-info);
}

.alert--success {
  background-color: rgba(47, 133, 90, 0.08);
  color: var(--color-success);
}

.alert--warning {
  background-color: rgba(217, 119, 6, 0.08);
  color: var(--color-warning);
}

.alert--danger {
  background-color: rgba(185, 28, 28, 0.08);
  color: var(--color-danger);
}


/* ========================================================================
   Image Treatments (for premium product imagery)
   ======================================================================== */
.img-rounded {
  border-radius: var(--radius-lg);
}

.img-elevated {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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


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