/* ========================================================================== *
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-bg: #fdf9f7; /* soft cream */
  --color-bg-alt: #f8f2ee; /* subtle blush-cream */
  --color-surface: #ffffff; /* cards, panels */
  --color-text: #3e3230; /* warm deep brown */
  --color-text-soft: #7a625c; /* muted body / meta */

  --color-primary: #d9a27c; /* warm rose gold */
  --color-primary-soft: rgba(217, 162, 124, 0.14);
  --color-primary-dark: #b27e5c;

  --color-success: #5fa88a; /* soft green */
  --color-success-soft: rgba(95, 168, 138, 0.12);

  --color-warning: #d9a15c; /* honey gold */
  --color-warning-soft: rgba(217, 161, 92, 0.12);

  --color-danger: #c76a6a; /* rose red */
  --color-danger-soft: rgba(199, 106, 106, 0.12);

  /* Neutral grays (warm) */
  --gray-50: #fbf7f5;
  --gray-100: #f3e7e1;
  --gray-200: #e7d4cc;
  --gray-300: #d8c0b5;
  --gray-400: #c4a79a;
  --gray-500: #a38272;
  --gray-600: #816359;
  --gray-700: #5f4941;
  --gray-800: #3e3230;
  --gray-900: #241c1b;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "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-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.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-28: 3.5rem;  /* 56px */
  --space-32: 4rem;    /* 64px */
  --space-40: 5rem;    /* 80px */
  --space-48: 6rem;    /* 96px */

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

  /* Shadows (soft, luxurious) */
  --shadow-xs: 0 4px 10px rgba(36, 28, 27, 0.06);
  --shadow-sm: 0 12px 30px rgba(36, 28, 27, 0.08);
  --shadow-md: 0 18px 45px rgba(36, 28, 27, 0.1);
  --shadow-soft-gold: 0 0 0 1px rgba(212, 178, 142, 0.3);

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

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 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
   ========================================================================== */
html {
  box-sizing: border-box;
  font-size: 100%;
  scroll-behavior: smooth;
}

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

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

ul,
ol {
  padding: 0;
  list-style: none;
}

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

textarea {
  resize: vertical;
}

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

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

:focus {
  outline: none;
}

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

main {
  display: block;
}

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

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

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

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

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-soft);
  }

p + p {
  margin-top: var(--space-6);
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Links: understated with soft accent */
a {
  position: relative;
  transition: color var(--transition-normal);
}

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

a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(217, 162, 124, 0.8), rgba(217, 162, 124, 0));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

a:not(.btn):hover::after {
  transform: scaleX(1);
}

/* ========================================================================== *
   Accessibility & Focus
   ========================================================================== */
:focus-visible {
  outline: 2px solid rgba(217, 162, 124, 0.85);
  outline-offset: 3px;
}

/* Visually hidden, but accessible to screen readers */
.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;
}

/* ========================================================================== *
   Layout Utilities
   ========================================================================== */
.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: 1200px;
  }
}

/* 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-col {
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

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

/* Grid helpers */
.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);
  }
}

/* Spacing utilities (a small curated set) */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-8); }
.mt-md { margin-top: var(--space-16); }
.mt-lg { margin-top: var(--space-24); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-16); }
.mb-lg { margin-bottom: var(--space-24); }

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

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #e0b894, #c9936b);
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
}

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

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

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--color-text);
  border-color: rgba(212, 178, 142, 0.4);
  backdrop-filter: blur(4px);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(212, 178, 142, 0.7);
}

.btn-outline:hover {
  background-color: var(--color-primary-soft);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn-icon {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-pill);
}

/* Form elements */
.input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 178, 142, 0.45);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: rgba(122, 98, 92, 0.7);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: rgba(217, 162, 124, 0.9);
  box-shadow: 0 0 0 1px rgba(217, 162, 124, 0.7);
  outline: none;
  background-color: #ffffff;
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: rgba(243, 231, 225, 0.5);
  cursor: not-allowed;
}

label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.form-field + .form-field {
  margin-top: var(--space-10);
}

.form-help {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

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

/* Card */
.card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 242, 238, 0.96));
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(212, 178, 142, 0.24);
}

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

.card-soft {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.card-header {
  margin-bottom: var(--space-12);
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.card-body {
  font-size: var(--font-size-base);
}

/* Tags / Pills (useful for categories like skincare, makeup) */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212, 178, 142, 0.6);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  background-color: rgba(255, 255, 255, 0.8);
}

/* Badges for highlight labels (e.g., Bestseller, Nowość) */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.badge--gold {
  background: linear-gradient(135deg, #f0dfc4, #e0c696);
  color: #604631;
}

/* Helper for soft section dividers */
.section-soft {
  background: radial-gradient(circle at top left, rgba(217, 162, 124, 0.14), transparent 55%),
              radial-gradient(circle at bottom right, rgba(225, 170, 142, 0.18), transparent 55%),
              var(--color-bg);
}

/* Hero-like overlay helper (for photography emphasis) */
.overlay-soft {
  position: relative;
}

.overlay-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(253, 249, 247, 0.6), transparent 65%),
              linear-gradient(to bottom, rgba(36, 28, 27, 0.16), transparent 45%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* ========================================================================== *
   Misc Helpers
   ========================================================================== */
.shadow-soft {
  box-shadow: var(--shadow-sm);
}

.rounded-full {
  border-radius: var(--radius-pill);
}

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

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

.bg-blush {
  background-color: #f7e1d6;
}

.text-soft {
  color: var(--color-text-soft);
}

.text-gold {
  color: #c89a68;
}
