/* ========================================================================== */
/* Variables                                                                  */
/* ========================================================================== */

:root {
  /* Color Palette - Nature Inspired */
  --color-background: #0b1410; /* deep forest background */
  --color-surface: #111a16; /* elevated surface */
  --color-surface-alt: #18231d; /* subtle alt surface */
  --color-text: #f4f7f5; /* primary text on dark */
  --color-text-muted: #c4cec8;
  --color-border-subtle: #2a3a32;

  --color-primary: #2f7f4f; /* forest green */
  --color-primary-soft: #244e38;
  --color-primary-light: #6fc28b;

  --color-success: #3fa46a;
  --color-warning: #f2b35d;
  --color-danger: #e4675f;

  /* Neutral grays for UI elements (on mixed backgrounds) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Semantic background helpers */
  --bg-elevated: var(--color-surface);
  --bg-muted: #0f1813;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-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.15;
  --line-height-snug: 1.3;
  --line-height-base: 1.6;
  --line-height-relaxed: 1.8;

  /* 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-32: 4rem;     /* 64px */
  --space-40: 5rem;     /* 80px */
  --space-48: 6rem;     /* 96px */

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

  /* Shadows - subtle premium feel */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);

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

/* ========================================================================== */
/* Reset / Normalize                                                          */
/* ========================================================================== */

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

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

body {
  margin: 0;
}

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

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

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

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

img,
video {
  height: auto;
}

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

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

/* Remove list styles on ul, ol elements with a list role */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* ========================================================================== */
/* Base                                                                       */
/* ========================================================================== */

body {
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-snug);
  color: #ffffff;
}

h1 {
  font-size: clamp(2.25rem, 3vw, 2.75rem);
  margin-bottom: var(--space-16);
}

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

h3 {
  font-size: clamp(1.5rem, 2vw, 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);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

strong,
 b {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

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

a:hover {
  color: #8fdba5;
}

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

code,
 pre {
  font-family: var(--font-mono);
}

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

/* ========================================================================== */
/* Accessibility                                                              */
/* ========================================================================== */

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

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

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

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

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

/* Layout helpers */

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

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

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

.grid {
  display: grid;
}

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

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

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

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

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

.m-auto {
  margin: auto;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mb-16 { margin-bottom: var(--space-16); }

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

@media (min-width: 768px) {
  .py-section {
    padding-top: var(--space-40);
    padding-bottom: var(--space-40);
  }
}

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

/* Buttons */

.button,
 button,
 [type="button"],
 [type="submit"],
 [type="reset"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 0.65rem 1.4rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-normal);
}

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

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

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

.button--ghost {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--color-text);
  box-shadow: none;
}

.button--ghost:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.button--secondary {
  background-color: var(--color-surface-alt);
  border-color: var(--color-border-subtle);
  color: var(--color-text);
}

/* Form controls */

.input,
 textarea,
 select,
 input[type="text"],
 input[type="email"],
 input[type="password"],
 input[type="search"],
 input[type="tel"],
 input[type="url"],
 input[type="number"] {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  color: var(--color-text);
  padding: 0.6rem 0.9rem;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

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

.input:focus-visible,
 textarea:focus-visible,
 select:focus-visible,
 input[type="text"]:focus-visible,
 input[type="email"]:focus-visible,
 input[type="password"]:focus-visible,
 input[type="search"]:focus-visible,
 input[type="tel"]:focus-visible,
 input[type="url"]:focus-visible,
 input[type="number"]:focus-visible {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary-light);
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gray-400) 50%),
    linear-gradient(135deg, var(--gray-400) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 3px),
    calc(100% - 9px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

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

/* Card */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-xs);
  padding: var(--space-16);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

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

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

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

/* Badges (optional, useful for inventory / promo labels) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--success {
  background-color: rgba(63, 164, 106, 0.15);
  color: #9ae6b4;
}

.badge--warning {
  background-color: rgba(242, 179, 93, 0.15);
  color: #fbd38d;
}

.badge--danger {
  background-color: rgba(228, 103, 95, 0.15);
  color: #feb2b2;
}

/* Promotional banner helper (for homepage deals) */

.promo-banner {
  background: linear-gradient(120deg, #244e38, #205067, #3b6f42);
  color: #fdfdfd;
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

@media (max-width: 640px) {
  .promo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Product image wrapper for consistent aspect ratio */

.aspect-ratio-4-3 {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 */
  overflow: hidden;
  border-radius: var(--radius-md);
}

.aspect-ratio-4-3 > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Price text */

.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: #ffffff;
}

.price--old {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  text-decoration: line-through;
}

.price--highlight {
  color: var(--color-primary-light);
}

/* End of base.css */
