/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Colors */
  --color-bg: #f8f5f1; /* warm white */
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-text: #141414; /* matte black */
  --color-text-muted: #6e6e6e;
  --color-primary: #c89d63; /* champagne gold */
  --color-primary-soft: rgba(200, 157, 99, 0.12);
  --color-success: #45a776;
  --color-warning: #e0a540;
  --color-danger: #d64545;

  --color-border-subtle: #e0ded9;
  --color-border-strong: #b9b6b0;

  --color-neutral-50: #faf8f6;
  --color-neutral-100: #f0ede9;
  --color-neutral-200: #e2ded7;
  --color-neutral-300: #cfc9c0;
  --color-neutral-400: #b3aca1;
  --color-neutral-500: #958e84;
  --color-neutral-600: #736d64;
  --color-neutral-700: #545047;
  --color-neutral-800: #37342e;
  --color-neutral-900: #181612;

  --color-accent-bronze: #b57a4a; /* elegant bronze */
  --color-accent-soft: rgba(181, 122, 74, 0.18);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", "Cormorant Garamond", "Times New Roman", 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: 2rem;     /* 32px */
  --font-size-4xl: 2.5rem;   /* 40px */
  --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.125rem;  /* 2px */
  --space-2: 0.25rem;   /* 4px */
  --space-3: 0.375rem;  /* 6px */
  --space-4: 0.5rem;    /* 8px */
  --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-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows (soft, light-inspired) */
  --shadow-soft-xs: 0 4px 18px rgba(0, 0, 0, 0.04);
  --shadow-soft-sm: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-soft-md: 0 18px 45px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 40px rgba(255, 244, 224, 0.65);

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }

  *, *::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 {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

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

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

textarea {
  resize: vertical;
}

:focus {
  outline: none;
}

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

main {
  display: block;
}

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

h1 {
  font-size: var(--font-size-5xl);
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: var(--space-8);
}

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-base), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-accent-bronze);
}

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

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

strong {
  font-weight: 600;
}

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);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none !important;
}

.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 */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
  max-width: 1120px;
}

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

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

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

.section--muted {
  background-color: var(--color-neutral-50);
}

/* Flex helpers */
.flex {
  display: flex;
}

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

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

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

.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-end {
  justify-content: flex-end;
}

.gap-8 {
  gap: var(--space-8);
}

.gap-12 {
  gap: var(--space-12);
}

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

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

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

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

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

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

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Spacing utilities (margin/padding) */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mt-16 { margin-top: var(--space-16) !important; }
.mt-24 { margin-top: var(--space-24) !important; }
.mt-32 { margin-top: var(--space-32) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }
.mb-24 { margin-bottom: var(--space-24) !important; }
.mb-32 { margin-bottom: var(--space-32) !important; }

.pt-16 { padding-top: var(--space-16) !important; }
.pb-16 { padding-bottom: var(--space-16) !important; }
.pt-24 { padding-top: var(--space-24) !important; }
.pb-24 { padding-bottom: var(--space-24) !important; }

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

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

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

/* Background + subtle lighting accents */
.bg-surface {
  background-color: var(--color-surface);
}

.bg-muted {
  background-color: var(--color-neutral-50);
}

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

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

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

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

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

/* ========================================================================
   Components
   ======================================================================== */
/* Buttons */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: var(--color-primary);
  color: #fff !important;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast),
              border-color var(--transition-base);
}

.button:hover,
.btn:hover {
  background-color: var(--color-accent-bronze);
  box-shadow: var(--shadow-soft-sm);
  transform: translateY(-1px);
}

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

.button:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--color-primary-soft), var(--shadow-soft-sm);
}

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

/* Button variants */
.btn--ghost {
  background-color: transparent;
  color: var(--color-text) !important;
  border-color: var(--color-border-subtle);
}

.btn--ghost:hover {
  background-color: var(--color-primary-soft);
  color: var(--color-text) !important;
}

.btn--light {
  background-color: var(--color-bg-alt);
  color: var(--color-text) !important;
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-soft-xs);
}

.btn--light:hover {
  background-color: var(--color-neutral-50);
}

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

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

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

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

label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

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

.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 component – for product tiles, inspiration blocks, etc. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-soft-xs);
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

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

.card__media {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  margin-bottom: var(--space-12);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-base);
}

.card:hover .card__media img {
  transform: scale(1.03);
  filter: brightness(1.03);
}

.card__body {
  padding: var(--space-4) 0 0;
}

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

.card__meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-neutral-500);
  margin-bottom: var(--space-6);
}

.card__price {
  font-weight: 600;
  font-size: var(--font-size-md);
  color: var(--color-text);
}

/* Tag / pill – for labels like "Нова колекция", "Смарт осветление" */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-primary-soft);
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--color-neutral-700);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag--primary {
  background-color: var(--color-primary-soft);
  border-color: transparent;
  color: var(--color-neutral-900);
}

/* Hero / spotlight overlay – subtle gradient for lighting imagery */
.hero-overlay-soft {
  position: relative;
}

.hero-overlay-soft::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 246, 228, 0.7), transparent 55%),
              radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.35), transparent 60%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Badges for promos */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent-soft);
  color: var(--color-neutral-900);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.badge--success {
  background-color: rgba(69, 167, 118, 0.12);
  color: #256c42;
}

.badge--danger {
  background-color: rgba(214, 69, 69, 0.12);
  color: #9a2424;
}

/* Simple breadcrumb – useful for catalog navigation */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-neutral-500);
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb__separator {
  opacity: 0.55;
}

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