:root {
  /* Colors */
  --color-background: #f5f1eb; /* warm beige */
  --color-surface: #ffffff;
  --color-text: #222222; /* charcoal black */
  --color-text-muted: #6b6b6b; /* soft gray */
  --color-primary: #7a8b6a; /* muted olive green */
  --color-primary-soft: #c7d1c0;
  --color-success: #3d7c4f;
  --color-warning: #b9802a;
  --color-danger: #b5453c;
  --color-border-subtle: #ded6cc; /* light beige/gray */
  --color-border-strong: #9c8a77;
  --color-overlay: rgba(0, 0, 0, 0.55);

  /* Neutral grays (warm-leaning) */
  --gray-50: #f8f5f1;
  --gray-100: #f1ebe4;
  --gray-200: #e2d7c8;
  --gray-300: #d1c3b0;
  --gray-400: #b7a48a;
  --gray-500: #9c8a77;
  --gray-600: #7a6a5a;
  --gray-700: #5a4c3f;
  --gray-800: #3b3027;
  --gray-900: #1f1813;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", "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 */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows (soft, premium) */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.16);

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

  /* Layout */
  --container-width-narrow: 960px;
  --container-width: 1200px;
  --container-width-wide: 1440px;
}

/*======================================
  RESET / NORMALIZE
======================================*/
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 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;
}

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

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

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

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

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

[hidden] {
  display: none !important;
}

/*======================================
  BASE STYLES
======================================*/
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-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.5rem, 2.3vw, 1.875rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

h1 + p,
h2 + p,
h3 + p {
  margin-top: var(--space-2);
}

strong, b {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

a {
  position: relative;
  transition: color var(--transition-normal);
}



a:not(.btn):not(.button):hover {
  color: var(--color-primary);
}

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

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

pre {
  white-space: pre-wrap;
}

/*======================================
  ACCESSIBILITY
======================================*/
:focus {
  outline: none;
}

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

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

.container--narrow {
  max-width: var(--container-width-narrow);
}

.container--wide {
  max-width: var(--container-width-wide);
}

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

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

.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 {
  flex-direction: column;
}

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

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

@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; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }

/*======================================
  COMPONENTS
======================================*/
/* Buttons */
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

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

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

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn--outline:hover {
  background-color: var(--gray-900);
  color: #ffffff;
  border-color: var(--gray-900);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: transparent;
}

.btn--ghost:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

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

.btn:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Inputs & form controls */
.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="number"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

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

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

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

label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

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

.form-helper {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

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

/* Card */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

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

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

.card__media {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-8);
}

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

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

/* Image emphasis for high-end photography */
.media-framed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

/* Simple tag / pill, useful for labels like "Nowość", "Bestseller" */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-full);
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill--accent {
  background-color: var(--color-primary-soft);
  color: var(--gray-900);
}

/* Overlay, e.g., for image captions or quick-view */
.overlay-soft {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
  color: #ffffff;
}

.overlay-centered {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-overlay);
  color: #ffffff;
}

/* Utility for subtle dividers between product sections */
.divider-soft {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08), transparent);
}
