/* =============================================================
   Variables
   ============================================================= */
:root {
  /* Color palette - neutral, elegant, refined */
  --color-bg: #f6f5f3;
  --color-surface: #ffffff;
  --color-surface-alt: #f0eeea;
  --color-text: #1f252b;
  --color-text-muted: #777e86;

  --color-primary: #c49a6c;           /* soft metallic gold */
  --color-primary-soft: #e4d2b8;
  --color-primary-strong: #9b784f;

  --color-success: #3d8b6d;
  --color-warning: #b88730;
  --color-danger: #b84a4a;

  --color-gray-50: #f8f7f5;
  --color-gray-100: #f0eeea;
  --color-gray-200: #e1ddd6;
  --color-gray-300: #cac4ba;
  --color-gray-400: #a79f94;
  --color-gray-500: #857d72;
  --color-gray-600: #676057;
  --color-gray-700: #4b4640;
  --color-gray-800: #33302c;
  --color-gray-900: #1f1c19;

  --color-border-subtle: rgba(31, 37, 43, 0.08);
  --color-border-strong: rgba(31, 37, 43, 0.16);
  --color-overlay: rgba(8, 10, 12, 0.32);

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --font-mono: "JetBrains 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-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 */

  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --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 */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows - soft, elegant */
  --shadow-sm: 0 4px 10px rgba(15, 16, 19, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 16, 19, 0.08);
  --shadow-lg: 0 22px 60px rgba(15, 16, 19, 0.12);

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

/* Respect user color-scheme if needed (hook) */
@media (prefers-color-scheme: dark) {
  :root[data-theme="dark"] {
    --color-bg: #111214;
    --color-surface: #181a1d;
    --color-surface-alt: #202329;
    --color-text: #f5f3ee;
    --color-text-muted: #a4a8b0;
    --color-border-subtle: rgba(250, 248, 242, 0.08);
    --color-border-strong: rgba(250, 248, 242, 0.22);
    --color-overlay: rgba(0, 0, 0, 0.5);
  }
}


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

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

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

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

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

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

/* Remove default link underlines; handle in base styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Improve text rendering */
body,
input,
textarea,
button,
select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


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

main {
  display: block;
}

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

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

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

h3 {
  font-size: clamp(1.5rem, 1.8vw, var(--font-size-2xl));
  margin-bottom: var(--space-2);
}

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);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-2);
}

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

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

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

a {
  color: var(--color-primary-strong);
  text-decoration: none;
  transition: color var(--transition-base),
    opacity var(--transition-base),
    text-decoration-color var(--transition-base);
  text-underline-offset: 3px;
}

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

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

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

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


/* =============================================================
   Accessibility & Motion
   ============================================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  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 helpers */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

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

.grid {
  display: grid;
}

.grid-center {
  display: grid;
  place-items: center;
}

.w-full {
  width: 100%;
}

.max-w-full {
  max-width: 100%;
}

/* Simple spacing utilities (y-axis) */
.stack-xs > * + * {
  margin-top: var(--space-2);
}

.stack-sm > * + * {
  margin-top: var(--space-3);
}

.stack-md > * + * {
  margin-top: var(--space-4);
}

.stack-lg > * + * {
  margin-top: var(--space-6);
}

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

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

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

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


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

/* Buttons */
.button,
button.button,
input[type="submit"].button,
input[type="button"].button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base),
    color var(--transition-base),
    opacity var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.button:hover {
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

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

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

.button--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
  background: var(--color-surface-alt);
}

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

.button--icon {
  padding-inline: 0.85rem;
}


/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color 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 1px rgba(196, 154, 108, 0.4);
}

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

label {
  display: inline-block;
  margin-bottom: 0.3rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-gray-800);
}

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

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

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


/* Card (for product tiles, info blocks, etc.) */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.card--interactive {
  cursor: pointer;
}

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

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

.card__title {
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  margin: 0 0 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-4);
}


/* Badge / pill (e.g., for availability, promo) */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.badge--success {
  border-color: rgba(61, 139, 109, 0.22);
  color: var(--color-success);
  background-color: rgba(61, 139, 109, 0.04);
}

.badge--warning {
  border-color: rgba(184, 135, 48, 0.22);
  color: var(--color-warning);
  background-color: rgba(184, 135, 48, 0.04);
}

.badge--danger {
  border-color: rgba(184, 74, 74, 0.22);
  color: var(--color-danger);
  background-color: rgba(184, 74, 74, 0.04);
}


/* Helper for subtle metallic divider */
.meta-divider {
  border: 0;
  border-top: 1px solid rgba(196, 154, 108, 0.28);
  width: 100%;
}


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