/* ========================================================================
   Kitchen Furnio Base Styles
   Modern, minimalist, elegant, functional, trustworthy, warm
   ======================================================================== */

/* ========================================================================
   1. CSS Custom Properties (Variables)
   ======================================================================== */

:root {
  /* Color Palette -------------------------------------------------------- */
  --color-bg: #f5f5f7;                 /* Soft, neutral background */
  --color-surface: #ffffff;            /* Default surface / cards */
  --color-surface-muted: #f0f1f3;      /* Subtle panels / sections */

  --color-text: #15171a;               /* Primary text */
  --color-text-muted: #6b7078;         /* Secondary text */
  --color-border-subtle: #e0e2e6;     
  --color-border-strong: #c4c7cf;

  /* Warm wood-inspired accents (not literal background images, just tone) */
  --color-primary: #c28a5b;            /* Warm wood accent */
  --color-primary-soft: #ead8c7;       /* Soft tint of primary */
  --color-primary-strong: #9f6c3e;     /* Hover / active primary */

  --color-success: #1e8f5b;
  --color-success-soft: #e0f4eb;

  --color-warning: #b37b00;
  --color-warning-soft: #fff3d9;

  --color-danger: #c23838;
  --color-danger-soft: #fde2e2;

  /* Neutral Grays -------------------------------------------------------- */
  --gray-50:  #f9fafb;
  --gray-100: #f2f3f5;
  --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",
    "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Root font sizing is set on html for accessibility */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px - comfortable for body */
  --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.75;

  /* 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-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-9: 2.25rem;  /* 36px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-14: 3.5rem;  /* 56px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius --------------------------------------------------------------- */
  --radius-none: 0;
  --radius-xs: 0.125rem;     /* 2px */
  --radius-sm: 0.25rem;      /* 4px */
  --radius-md: 0.5rem;       /* 8px */
  --radius-lg: 0.75rem;      /* 12px */
  --radius-xl: 1rem;         /* 16px */
  --radius-full: 9999px;

  /* Shadows -------------------------------------------------------------- */
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-mild: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 18px 45px rgba(15, 23, 42, 0.18);

  /* Transitions & Motion ------------------------------------------------- */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease;

  /* Layout --------------------------------------------------------------- */
  --container-width: 1200px;   /* Max width for desktop containers */
  --container-padding-x: var(--space-4);

  /* Focus ring ----------------------------------------------------------- */
  --focus-ring-color: rgba(194, 138, 91, 0.7); /* warm primary */
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
}

/* ========================================================================
   2. Reset / Normalize
   ======================================================================== */

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

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

body {
  margin: 0;
}

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

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

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

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

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

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

/* Allow percentage-based heights in the application */
html,
body {
  height: 100%;
}

/* Remove default list styles */
ul[role="list"],
ol[role="list"],
ul,
ol {
  list-style: none;
}

/* ========================================================================
   3. Base Styles
   ======================================================================== */

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

/* Headings: refined, slightly editorial but minimalist */

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

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-3);
}

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  /* Comfortable line length for reading */
}

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

strong,
b {
  font-weight: 600;
}

/* Link styles: subtle, elegant accent color */

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

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

a:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Horizontal rules */

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

/* Selection */

::selection {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
}

/* ========================================================================
   4. Accessibility & Motion
   ======================================================================== */

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

:focus:not(:focus-visible) {
  outline: none;
}

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

/* Screen reader only */

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

/* ========================================================================
   5. Layout Utilities
   ======================================================================== */

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

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

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

/* Flex utilities -------------------------------------------------------- */

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

.gap-xs {
  gap: var(--space-2);
}

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

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

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

/* Grid utilities -------------------------------------------------------- */

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

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

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

@media (max-width: 960px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Width helpers --------------------------------------------------------- */

.w-full {
  width: 100%;
}

/* Spacing utilities (margin & padding) ---------------------------------- */

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-2); }
.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }
.mt-xl { margin-top: var(--space-10); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }
.mb-xl { margin-bottom: var(--space-10); }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: var(--space-3); }
.pt-md { padding-top: var(--space-4); }
.pt-lg { padding-top: var(--space-6); }
.pt-xl { padding-top: var(--space-10); }

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: var(--space-3); }
.pb-md { padding-bottom: var(--space-4); }
.pb-lg { padding-bottom: var(--space-6); }
.pb-xl { padding-bottom: var(--space-10); }

/* Text utilities -------------------------------------------------------- */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }

/* ========================================================================
   6. Form & Interactive Components
   ======================================================================== */

/* Buttons --------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast);
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.button:hover {
  background-color: var(--color-primary-strong);
  box-shadow: var(--shadow-mild);
  transform: translateY(-1px);
}

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

.button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.button--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-subtle);
  box-shadow: none;
}

.button--ghost:hover {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: var(--color-border-strong);
}

.button--secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
}

.button--secondary:hover {
  background-color: var(--color-surface-muted);
}

.button--danger {
  background-color: var(--color-danger);
  color: #ffffff;
}

.button--danger:hover {
  background-color: #a32d2d;
}

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

/* Inputs & Textareas ---------------------------------------------------- */

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

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

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(194, 138, 91, 0.25);
  outline: none;
}

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

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

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

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

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

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

/* ========================================================================
   7. Card & Surface Components
   ======================================================================== */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.card--muted {
  background-color: #fbfbfc;
}

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

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

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

.card-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

/* Subtle elevated surfaces useful for navigation / info bars */

.surface-elevated {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
}

/* ========================================================================
   8. Media & Imagery Helpers
   ======================================================================== */

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

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

.image-soft-border {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

/* Simple gallery layout for product imagery */

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4);
}

.gallery-grid__main {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery-grid__thumbs {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

/* ========================================================================
   9. Helper Classes for Polish-language Site Patterns
   ======================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

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

.price {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.price--muted {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
}

/* Utility for subtle borders (e.g., feature blocks, delivery info) */

.border-subtle {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

/* End of Kitchen Furnio base.css */
