/* =========================================================
   Variables
   ========================================================= */

:root {
  /* Color palette - light, natural, premium */
  --color-bg: #f5f3f0;              /* main background, warm and soft */
  --color-surface: #ffffff;         /* cards, panels */
  --color-text: #1f2933;            /* main text */
  --color-text-muted: #6b7280;      /* secondary text */

  --color-primary: #2f6f7e;         /* calm, premium teal/blue */
  --color-primary-soft: #e0edf0;    /* subtle primary tint */
  --color-success: #2f855a;         /* positive actions */
  --color-warning: #b7791f;         /* warnings */
  --color-danger: #c53030;          /* errors */

  /* Neutral grays */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Typography - clean, legible, modern */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  /* Font sizes */
  --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 heights */
  --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-pill: 999px;

  /* Shadows - soft and subtle to reflect premium product shots */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06),
    0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 15px 35px rgba(15, 23, 42, 0.12);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 250ms ease-out;

  /* Layout */
  --container-max-width: 1200px;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}


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

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

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

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

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

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

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

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

textarea {
  resize: vertical;
}

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

main {
  min-height: 60vh;
}

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

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

h2 {
  font-size: clamp(1.5rem, 2.5vw, var(--font-size-3xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.25rem, 2vw, var(--font-size-2xl));
  margin-bottom: var(--space-2);
}

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

p {
  margin-bottom: var(--space-3);
  /* comfortable line length */
  color: var(--color-text);
}

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

a {
  color: var(--color-primary);
  text-decoration: none; /* minimal, modern */
  transition: color var(--transition-base);
}

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

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

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

strong {
  font-weight: 600;
}

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


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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* =========================================================
   Utilities
   ========================================================= */

/* Layout containers */

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

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

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

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

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

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

/* Grid helpers */

.grid {
  display: grid;
}

.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: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Spacing utilities (commonly used) */

.mt-4 {
  margin-top: var(--space-4);
}

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

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

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

.p-4 {
  padding: var(--space-4);
}

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

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

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

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

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

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


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

/* Buttons - minimal, premium, accessible */

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

.button:hover {
  background-color: #275a66;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

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

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

.button--ghost:hover {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.button--secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-gray-200);
  box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
  border-color: var(--color-gray-300);
  background-color: var(--color-gray-50);
  color: var(--color-text);
}

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

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

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

/* Form inputs - calm, precise, consistent */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  background-color: #ffffff;
  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(--color-text-muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
  outline: none;
}

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

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

.field-description {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

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

/* Card - for product presentation */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  border: 1px solid rgba(15, 23, 42, 0.03);
}

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

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

.card-title {
  font-size: var(--font-size-lg);
  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-3);
}

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Product-specific subtle price style */

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

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

/* Tag / badge for categories like "Prémium", "Új" */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

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

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