/* Globalne tokeny, prymitywy i wspólna rama strony. */

/* Tokeny systemu wizualnego. */

:root {
  /* Kolor: role semantyczne, nie konkretne komponenty. */
  --color-text: #183c32;
  --color-text-muted: #635b52;
  --color-canvas: #f7f2e8;
  --color-surface: #fff;
  --color-surface-muted: #e8e3d8;
  --color-brand: #123f34;
  --color-brand-strong: #0b3028;
  --color-chocolate: #4a2f27;
  --color-accent: #b5904b;
  --color-accent-strong: #73551d;
  --color-border: #d5c9b7;
  --color-focus: #075eb5;
  --color-error: #a12622;
  --color-error-surface: #fcedeb;
  --color-success: #27613f;
  --color-success-surface: #e8f4ec;
  --color-info: #155785;
  --color-info-surface: #e8f2f9;
  --color-on-dark: #fff;

  /* Typografia oparta wyłącznie na fontach systemowych. */
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: clamp(2rem, 8vw, 3.75rem);
  --font-size-2xl: clamp(2.45rem, 12vw, 5.8rem);
  --line-height-tight: 1.05;
  --line-height-body: 1.55;

  /* Odstępy, promienie, cienie i warstwy. */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;
  --shadow-sm: 0 0.25rem 0.8rem rgb(40 31 23 / 10%);
  --shadow-lg: 0 1.4rem 3.5rem rgb(40 31 23 / 18%);
  --layer-base: 0;
  --layer-raised: 10;
  --layer-header: 100;
  --layer-overlay: 900;
  --layer-skip-link: 1000;
  --control-min-size: 2.75rem;
  --shell-max: 78rem;
  --motion-fast: 160ms;
  --motion-standard: 240ms;
  --ease-standard: ease;
}

/* Reset i domyślne zachowanie dokumentu. */

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

html {
  min-width: 20rem;
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
  text-rendering: optimizeLegibility;
}

body.menu-is-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 0.2rem solid var(--color-focus);
  outline-offset: 0.2rem;
}

[hidden] { display: none !important; }

[aria-disabled="true"] { cursor: not-allowed; }

/* Prymitywy layoutu i typografii. */

.shell {
  width: min(calc(100% - (2 * var(--space-4))), var(--shell-max));
  margin-inline: auto;
}

.sr-only,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: var(--layer-skip-link);
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  transform: translateY(-200%);
  background: var(--color-brand);
  color: var(--color-on-dark);
}

.skip-link:focus { transform: translateY(0); }

h1, h2, h3, .site-brand__name {
  font-family: var(--font-display);
  line-height: var(--line-height-tight);
  text-wrap: balance;
}

h1 { margin: 0; font-size: var(--font-size-2xl); letter-spacing: -0.045em; }
h2 { margin: 0; font-size: var(--font-size-xl); letter-spacing: -0.035em; }

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Komponenty wielokrotnego użytku. */

.button,
button.button,
input.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  position: relative;
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.2rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: var(--color-on-dark);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}

.button.button--primary,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--color-brand);
  color: var(--color-on-dark);
}

.button.button--secondary {
  border-color: var(--color-brand);
  background: transparent;
  color: var(--color-brand);
}

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

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

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--color-brand-strong);
  color: var(--color-on-dark);
}

.button--secondary:hover,
.button--ghost:hover { background: rgb(18 63 52 / 10%); color: var(--color-brand-strong); }
.button--danger:hover { background: #7d1c19; }

.button:active,
.woocommerce a.button:active,
.woocommerce button.button:active { transform: translateY(1px); }

.button:disabled,
.button[aria-disabled="true"],
.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce input.button:disabled {
  border-color: transparent;
  background: #d8d2c8;
  color: #625d55;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

.button.is-loading,
.button[aria-busy="true"] { color: transparent; pointer-events: none; }

.button.is-loading::after,
.button[aria-busy="true"]::after {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--color-on-dark);
  content: "";
  animation: gudy-vintage-spin 700ms linear infinite;
}

.button--secondary.is-loading::after,
.button--secondary[aria-busy="true"]::after,
.button--ghost.is-loading::after,
.button--ghost[aria-busy="true"]::after { color: var(--color-brand); }

.button:disabled[aria-busy="true"]::after { color: #625d55; }

@keyframes gudy-vintage-spin {
  to { transform: rotate(1turn); }
}

/* Każde główne CTA osadzone w bannerze trzyma ten sam, centralny układ. */
.banner__button { display: flex; width: max-content; margin-inline: auto; }

.field { display: grid; gap: var(--space-2); }
.field__label { font-weight: 700; }

.field__control,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

.field textarea { min-height: 8rem; resize: vertical; }
.field__control::placeholder,
.field input::placeholder,
.field textarea::placeholder { color: #746d64; opacity: 1; }

.field__control:hover,
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--color-text-muted); }

.field__control:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--color-focus); }

.field__help { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.field__error { color: var(--color-error); font-size: var(--font-size-sm); font-weight: 700; }

.field.has-error .field__control,
.field.has-error input,
.field.has-error select,
.field.has-error textarea,
[aria-invalid="true"] { border-color: var(--color-error); }

.field__control:disabled,
.field input:disabled,
.field select:disabled,
.field textarea:disabled { background: #eeeae3; color: #625d55; cursor: not-allowed; }

.card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.card__body { display: grid; padding: var(--space-5); gap: var(--space-3); }
.card__title { margin: 0; font-size: var(--font-size-lg); }

.empty-state {
  display: grid;
  justify-items: start;
  padding: var(--space-6);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  gap: var(--space-3);
}

.empty-state__title { margin: 0; font-size: var(--font-size-lg); }

.badge {
  display: inline-flex;
  width: fit-content;
  min-height: 1.75rem;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #2d2113;
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.badge--success { background: var(--color-success-surface); color: var(--color-success); }
.badge--sold-out { background: #e7e2dc; color: #514b44; }

.notice,
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  position: relative;
  padding: var(--space-4) var(--space-5);
  border: 1px solid currentcolor;
  border-radius: var(--radius-md);
  background: var(--color-info-surface);
  color: var(--color-info);
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message { padding-inline-start: 3.5rem; }

.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
  top: 1.05rem;
  left: var(--space-5);
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border: 2px solid currentcolor;
  border-radius: 50%;
  color: inherit;
  content: "i";
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.woocommerce-error::before { content: "!"; }
.woocommerce-message::before { content: "✓"; }

.notice--error,
.woocommerce-error { background: var(--color-error-surface); color: var(--color-error); }
.notice--success,
.woocommerce-message { background: var(--color-success-surface); color: var(--color-success); }
.notice__title { display: block; margin-bottom: var(--space-1); }

.modal {
  width: min(calc(100% - (2 * var(--space-4))), 38rem);
  max-height: min(85vh, 48rem);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.modal::backdrop { background: rgb(11 30 25 / 72%); }
.modal__header,
.modal__body,
.modal__footer { padding: var(--space-5); }
.modal__header { display: flex; align-items: start; justify-content: space-between; gap: var(--space-4); border-bottom: 1px solid var(--color-border); }
.modal__title { margin: 0; font-size: var(--font-size-lg); }
.modal__footer { display: flex; flex-wrap: wrap; justify-content: end; gap: var(--space-3); border-top: 1px solid var(--color-border); }

.skeleton {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #ddd7cd;
  color: transparent;
}

.skeleton::after {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 55%), transparent);
  content: "";
  animation: gudy-vintage-skeleton 1.4s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes gudy-vintage-skeleton {
  to { transform: translateX(100%); }
}

/* Nagłówek i główna nawigacja. */

.site-header {
  position: sticky;
  z-index: var(--layer-header);
  top: 0;
  border-bottom: 1px solid var(--color-border);
  background: rgb(247 242 232 / 94%);
  backdrop-filter: blur(0.75rem);
}

.site-header__bar {
  display: grid;
  min-height: 4.25rem;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  justify-self: center;
  color: var(--color-text);
  line-height: 0.85;
  text-align: center;
  text-decoration: none;
}

.site-brand__name { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.06em; }
.site-brand__suffix { margin-top: 0.25rem; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }

.icon-button {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle { flex-direction: column; gap: 0.3rem; }
.menu-toggle > span[aria-hidden] { width: 1.3rem; height: 2px; border-radius: 2px; background: currentcolor; }
.site-header__actions { justify-self: end; }
.site-header__cart { font-size: 1.7rem; text-decoration: none; }

.site-header__cart-count {
  position: absolute;
  top: 0.15rem;
  right: 0;
  display: grid;
  min-width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  padding-inline: 0.25rem;
  border-radius: 99px;
  background: var(--color-accent);
  color: #2d2113;
  font-size: 0.65rem;
  font-weight: 700;
}

.primary-navigation {
  position: fixed;
  inset: 4.25rem 0 0;
  display: none;
  overflow-y: auto;
  padding-block: 1rem 3rem;
  background: var(--color-canvas);
}

.primary-navigation.is-open { display: block; }
.primary-navigation ul { margin: 0; padding: 0; list-style: none; }

.primary-navigation a {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
}

/* Sekcje strony głównej. */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 13vw, 7rem);
  background: radial-gradient(circle at 85% 15%, rgb(181 144 75 / 20%), transparent 28%), linear-gradient(145deg, #e7ddca, #f7f2e8 62%);
}

.hero__grid { display: grid; gap: 2.5rem; }
.hero__content { position: relative; z-index: 2; }
.hero h1 { max-width: 11ch; }

.hero__lead {
  max-width: 37rem;
  margin: 1.25rem 0 1.75rem;
  color: var(--color-text-muted);
  font-size: clamp(1.05rem, 4.5vw, 1.3rem);
}

.hero__note { margin: 1rem 0 0; color: var(--color-text-muted); font-size: 0.78rem; text-align: center; }

.hero__visual {
  position: relative;
  width: min(100%, 30rem);
  min-height: 23rem;
  justify-self: center;
}

.hero__image {
  position: absolute;
  overflow: hidden;
  border: 0.45rem solid rgb(255 255 255 / 78%);
  border-radius: 45% 45% 1rem 1rem;
  box-shadow: var(--shadow-lg);
}

.hero__image img { width: 100%; height: 100%; object-fit: cover; }
.hero__image--main { inset: 0 18% 0 0; transform: rotate(-2deg); }
.hero__image--small { right: 0; bottom: 1.25rem; width: 44%; height: 48%; border-radius: 50% 50% 1rem 1rem; transform: rotate(4deg); }

.hero__stamp {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 0;
  display: grid;
  width: 6.5rem;
  height: 6.5rem;
  place-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #2d2113;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(8deg);
}

.hero__stamp strong { font-family: Georgia, serif; font-size: 1.05rem; letter-spacing: 0; text-transform: none; }

.category-section,
.products-section { padding-block: clamp(3.5rem, 12vw, 7rem); }
.products-section { padding-top: 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.text-link { display: inline-flex; min-height: var(--control-min-size); align-items: center; flex: 0 0 auto; font-weight: 700; }
.trust-strip { padding-block: 2.5rem; background: var(--color-brand); color: var(--color-on-dark); }
.trust-strip__grid { display: grid; gap: 1.5rem; }
.trust-strip__grid > div { display: grid; justify-items: center; gap: 0.2rem; text-align: center; }
.trust-strip span { color: rgb(255 255 255 / 72%); font-size: 0.9rem; }

/* Wspólne wrappery WordPressa i WooCommerce. */

.shop-content,
.content-page { min-height: 55vh; padding-block: 2.5rem 4rem; }

.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count { color: var(--color-text-muted); font-size: 0.85rem; }

.woocommerce .woocommerce-ordering select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.woocommerce .quantity .qty { min-height: 3.25rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
/* Stopka strony. */

.site-footer { margin-top: auto; padding-top: 3.5rem; background: var(--color-chocolate); color: var(--color-on-dark); }
.site-footer__grid { display: grid; gap: 2.5rem; text-align: center; }
.site-brand--footer { align-items: center; justify-self: center; color: #fff; text-align: center; }
.site-footer h2 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1rem; letter-spacing: 0; }
.site-footer p, .site-footer a { color: rgb(255 255 255 / 72%); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 0.65rem; }

.site-footer__legal {
  margin-top: 3rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 14%);
  color: rgb(255 255 255 / 55%);
  font-size: 0.8rem;
  text-align: center;
}

/* Responsywność i preferencje dostępnościowe. */

@media (max-width: 44.99rem) {
  .modal {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal__footer > .button { width: 100%; }
}

@media (max-width: 24rem) {
  .section-heading { align-items: start; flex-direction: column; }
  .text-link { min-height: var(--control-min-size); }
}

@media (min-width: 45rem) {
  .shell { width: min(calc(100% - (2 * var(--space-5))), var(--shell-max)); }
  .trust-strip__grid, .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 56.25rem) {
  body.menu-is-open { overflow: auto; }
  .banner__button { margin-inline: 0; }
  .site-header__bar { min-height: 5rem; grid-template-columns: 1fr auto 1fr; }
  .menu-toggle { visibility: hidden; }

  .primary-navigation {
    position: static;
    display: block;
    padding: 0;
    border-top: 1px solid var(--color-border);
    background: transparent;
  }

  .primary-navigation ul { display: flex; justify-content: center; gap: 2.25rem; }
  .primary-navigation a { min-height: 3.25rem; border: 0; font-size: 0.88rem; }

  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr); align-items: center; }
  .hero__note { text-align: left; }
  .hero__visual { width: 100%; min-height: 34rem; }
}

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

@media (forced-colors: active) {
  .button,
  .badge,
  .notice,
  .card { border: 1px solid ButtonText; }

  .skeleton { border: 1px solid CanvasText; }
}
