:root {
  /* Color palette - serene, soft, trustworthy */
  --color-background: #f7f8fb; /* soft, airy background */
  --color-surface: #ffffff; /* clean white for cards */
  --color-text: #1f2933; /* deep but soft charcoal */
  --color-text-muted: #6b7280; /* gentle gray for secondary text */

  --color-primary: #7ca9e6; /* soft blue */
  --color-primary-soft: #dbe7fb; /* light blue tint */
  --color-accent-lavender: #c3b3e6; /* lavender accent */
  --color-accent-beige: #f3e6d4; /* warm beige accent */

  --color-success: #79c39b; /* calm green */
  --color-warning: #f5c16c; /* soft amber */
  --color-danger: #e97a7a; /* gentle red */

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

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-heading: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-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-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --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-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-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows - soft, subtle */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
li,
fieldset,
legend,
pre {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

img {
  height: auto;
}

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

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

ul,
ol {
  list-style: none;
}

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

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

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !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: radial-gradient(circle at top, #edf2ff 0, transparent 55%),
              linear-gradient(to bottom, #f5f3ff 0, var(--color-background) 32%, var(--color-background) 100%);
  -webkit-font-smoothing: antialiased;
}

/* A gentle max width for readable text blocks */
body > main,
body > div,
body > section {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
  letter-spacing: 0.01em;
}

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

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

h3 {
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

h5 {
  font-size: 1.125rem;
  margin-bottom: var(--space-1);
}

h6 {
  font-size: 1rem;
  margin-bottom: var(--space-1);
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  /* comfortable line length */
}

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

strong {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

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

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

/* Underline appears on hover/focus for clarity, but hidden by default */
a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-lavender));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

a:hover::after,
a:focus-visible::after {
  transform: scaleX(1);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

pre {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background-color: var(--gray-50);
  overflow: auto;
}

/* ========================================
   ACCESSIBILITY & FOCUS
   ======================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

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

/* ========================================
   UTILITIES
   ======================================== */

/* Layout container for serene, centered layouts */
.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: 1024px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* 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-column {
  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-2);
}

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

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

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

.grid-auto-fit-min-200 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.grid-auto-fit-min-260 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
}

/* Alignment & width utilities */
.text-center {
  text-align: center;
}

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

.w-full {
  width: 100%;
}



.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Spacing utilities (margin-bottom for vertical rhythm) */
.mb-0 {
  margin-bottom: 0;
}

.mb-xs {
  margin-bottom: var(--space-2);
}

.mb-sm {
  margin-bottom: var(--space-4);
}

.mb-md {
  margin-bottom: var(--space-6);
}

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

.mb-xl {
  margin-bottom: var(--space-12);
}

.pt-section {
  padding-top: var(--space-12);
}

.pb-section {
  padding-bottom: var(--space-12);
}

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

/* Soft, subtle divider */
.hr-soft {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-8) 0;
}

/* ========================================
   BASIC COMPONENTS
   ======================================== */

/* Buttons - calm, rounded, accessible */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-lavender));
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-normal);
}

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

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

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

.button--ghost {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text)!important;
  border-color: rgba(124, 169, 230, 0.5);
  box-shadow: var(--shadow-xs);
}

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

.button--secondary {
  background: var(--color-accent-beige);
  color: var(--gray-800)!important;
  border-color: rgba(219, 231, 251, 0.6);
}

.button--outline {
  background: transparent;
  color: var(--color-primary)!important;
  border-color: rgba(124, 169, 230, 0.7);
  box-shadow: none;
}

.button--outline:hover {
  background: rgba(219, 231, 251, 0.35);
}

/* Form controls - minimalist, soft focus */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: rgba(255, 255, 255, 0.9);
  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,
.textarea::placeholder {
  color: var(--gray-400);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(124, 169, 230, 0.25);
  background-color: #ffffff;
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  background-color: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

.label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  margin-bottom: var(--space-1);
}

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

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

/* Card - used for products, sections, etc. */
.card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.7);
  backdrop-filter: blur(6px);
}

.card--subtle {
  background: linear-gradient(135deg, rgba(219, 231, 251, 0.25), rgba(243, 230, 212, 0.18));
  border-color: rgba(209, 213, 219, 0.8);
}

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

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

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

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

/* Tag / pill - for labels like "Nowość", "Bestseller" */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(124, 169, 230, 0.12);
  color: var(--gray-700);
}

.pill--accent {
  background: rgba(195, 179, 230, 0.14);
}

/* ========================================
   IMAGE & MEDIA TREATMENT
   ======================================== */

.img-soft-rounded {
  border-radius: 18px;
}

.img-shadow-soft {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

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

/* ========================================
   SECTION BACKGROUNDS FOR MOOD
   ======================================== */

.section-soft-blue {
  background: radial-gradient(circle at top left, rgba(219, 231, 251, 0.9), transparent 55%),
              linear-gradient(to bottom, #f5f7ff, #f8fafc);
}

.section-soft-beige {
  background: linear-gradient(135deg, #f9f5ee, #fdfbf8);
}

.section-soft-lavender {
  background: linear-gradient(135deg, #f4f1ff, #f8f5ff);
}

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

/* ========================================
   TOAST / ALERT (BASIC)
   ======================================== */

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert--success {
  background-color: rgba(121, 195, 155, 0.08);
  border: 1px solid rgba(121, 195, 155, 0.3);
  color: var(--gray-800);
}

.alert--warning {
  background-color: rgba(245, 193, 108, 0.08);
  border: 1px solid rgba(245, 193, 108, 0.3);
  color: var(--gray-800);
}

.alert--danger {
  background-color: rgba(233, 122, 122, 0.08);
  border: 1px solid rgba(233, 122, 122, 0.3);
  color: var(--gray-800);
}

/* ========================================
   MISC
   ======================================== */

.badge-dot {
  position: relative;
  padding-left: 0.75rem;
}

.badge-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-success);
}

/* Gentle overlay (e.g., for modals / image zoom) */
.overlay-soft {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
}

