:root {
  /* =============================
     Variables
     ============================= */

  /* Colors */
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f1f4;
  --color-text: #151821;
  --color-text-muted: #6c7280;

  --color-primary: #1f5fff; /* clean urban blue */
  --color-primary-soft: #edf2ff;

  --color-success: #2eaf6b;
  --color-warning: #e9a93a;
  --color-danger: #e25353;

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

  /* Subtle metallic accent */
  --color-metallic-soft: #c4c7d0;
  --color-metallic-warm: #d0bfa6;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", 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 */

  --line-height-tight: 1.2;
  --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-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

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

  /* Shadows */
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-subtle: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-elevated: 0 16px 40px rgba(15, 23, 42, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-width: 1200px;
  --container-padding-x: 20px;
}

/* =============================
   Reset / Normalize
   ============================= */

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

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

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

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

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

/* Remove tap highlight on mobile for a cleaner feel */
* {
  -webkit-tap-highlight-color: transparent;
}

/* =============================
   Base Styles
   ============================= */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1 {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-12);
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-10);
}

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

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

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

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

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

a:hover {
  color: var(--gray-900);
}

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

strong,
b {
  font-weight: 600;
}

::selection {
  background-color: rgba(31, 95, 255, 0.14);
  color: var(--color-text);
}

/* =============================
   Accessibility
   ============================= */

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

/* Respect reduced motion preference */
@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;
  }
}

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

/* =============================
   Layout & Utilities
   ============================= */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.container--wide {
  max-width: 1440px;
}

/* Spacing utilities (core subset suitable for product grids & sections) */

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

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

.m-auto {
  margin: auto;
}

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

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

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

/* Flex helpers for clean, structured layouts */

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

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

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

/* Grid helpers for product galleries */

.grid {
  display: grid;
}

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

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

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

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

/* Elevation utilities */

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

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

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

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

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

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

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background-color: var(--gray-900);
  color: #ffffff;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #384bff);
  box-shadow: 0 10px 24px rgba(31, 95, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(31, 95, 255, 0.45);
}

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

.btn-ghost:hover {
  background-color: var(--gray-100);
}

.btn-tonal {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: transparent;
}

.btn-tonal:hover {
  background-color: #dde6ff;
}

.btn-metallic {
  background: linear-gradient(135deg, #e1e3e8, #c4c7d0);
  color: var(--gray-900);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(12, 14, 24, 0.18);
}

.btn-metallic:hover {
  box-shadow: 0 16px 38px rgba(12, 14, 24, 0.22);
}

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

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

/* Inputs & form controls */

.input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  padding: 0.7rem 0.9rem;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.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), 0 0 0 4px rgba(31, 95, 255, 0.12);
}

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

/* Checkbox & radio minimal tweaks for alignment */

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

/* Cards (for product tiles, info blocks, etc.) */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-12);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    border-color var(--transition-base);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.card--hoverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(148, 163, 184, 0.32);
}

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

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

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

/* Badges for product status (e.g., Nowość, Bestseller) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.badge-soft {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

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

.badge-metallic {
  background: linear-gradient(135deg, #f1f2f6, #d0d3dd);
  color: var(--gray-800);
}

/* Simple tag-like price highlight */

.price-tag {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--gray-900);
}

.price-tag--muted {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  text-decoration: line-through;
}

/* Minimalist top bar / nav helpers */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(245, 246, 248, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-block: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-size: var(--font-size-sm);
}

.nav-link {
  position: relative;
  color: var(--color-text);
  padding-block: 0.2rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-metallic-soft), var(--color-primary));
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link--active::after {
  width: 100%;
}

/* Search bar shell for robust search tools */

.search-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.search-bar input[type="search"] {
  border: none;
  padding: 0.3rem 0.2rem;
  background: transparent;
}

.search-bar input[type="search"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.search-bar-icon {
  color: var(--gray-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Footer shell for trustworthy feel */

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.14), transparent);
  padding-block: var(--space-20);
}

.footer-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Utility: subtle divider */

.hr-soft {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin-block: var(--space-16);
}

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