/* ==========================================================================
   Kwiaty z Sercem - landing page
   Spis treści:
   1. Zmienne
   2. Reset i style bazowe
   3. Układ i narzędzia
   4. Przyciski
   5. Nagłówek i nawigacja
   6. Hero
   7. Pasek zalet
   8. Sekcje (wspólne)
   9. Oferta
   9a. Katalog (gotowe kompozycje z arkusza)
  10. O nas
  11. Jak zamówić
  12. Galeria
  13. CTA końcowe
  14. Stopka
  15. Okno zamówienia i formularz
  16. Responsywność
  17. Preferencje użytkownika
   ========================================================================== */

/* 1. Zmienne
   ========================================================================== */
:root {
  --color-cream: #f8f3ec;
  --color-cream-dark: #f1e9df;
  --color-paper: #fffdf9;
  --color-white: #fff;
  --color-logo-bg: #fdfdfb;
  --color-olive: #3f4430;
  --color-gold: #b88a52;
  --color-gold-dark: #a87943;
  --color-gold-light: #d9b27c;
  --color-gold-pale: #f0d5ae;
  --color-burgundy: #8c2349;
  --color-text: #302d27;
  --color-muted: #777166;
  --color-footer: #34382a;
  --color-menu: rgba(48, 48, 39, 0.96);
  --color-overlay: rgba(20, 20, 16, 0.62);
  --color-success: #2e7d4f;
  --color-success-bg: #eef7f1;
  --color-success-text: #1f5a37;
  --text-shadow-hero: 0 1px 3px rgba(20, 18, 12, 0.5), 0 2px 18px rgba(20, 18, 12, 0.45);
  --color-line: rgba(63, 68, 48, 0.15);

  --shadow-soft: 0 8px 25px rgba(55, 45, 35, 0.05);
  --shadow-card: 0 20px 55px rgba(62, 52, 39, 0.12);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.25);

  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Arial, Helvetica, sans-serif;

  --radius-card: 18px;
  --radius-field: 10px;
  --radius-pill: 999px;

  --container-width: 1180px;
  --container-gutter: 40px;
  --transition: 0.2s ease;
}

/* 2. Reset i style bazowe
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-cream);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

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

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.08;
}

h1 {
  margin: 0 0 25px;
  font-size: clamp(48px, 6vw, 78px);
  text-shadow: var(--text-shadow-hero);
}

h2 {
  margin: 0 0 15px;
  color: var(--color-olive);
  font-size: clamp(38px, 4vw, 54px);
}

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

/* 3. Układ i narzędzia
   ========================================================================== */
.container {
  width: min(var(--container-width), calc(100% - var(--container-gutter)));
  margin-inline: auto;
}

.section {
  padding: 105px 0;
}

.skip-link {
  position: absolute;
  z-index: 200;
  top: 0;
  left: 20px;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-field) var(--radius-field);
  background: var(--color-white);
  color: var(--color-olive);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: none;
}

/* 4. Przyciski
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.btn--gold {
  background: var(--color-gold);
  color: var(--color-white);
}

.btn--gold:hover {
  background: var(--color-gold-dark);
  transform: translateY(-1px);
}

.btn--outline {
  border: 1px solid var(--color-gold);
  background: transparent;
  color: var(--color-gold);
}

.btn--block {
  width: 100%;
}

/* 5. Nagłówek i nawigacja
   ========================================================================== */
.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  color: var(--color-white);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  height: 92px;
}

.brand {
  align-self: flex-start;
  width: 172px;
  padding: 16px 10px 8px;
  border-radius: 0 0 14px 14px;
  background: var(--color-logo-bg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.brand img {
  width: 100%;
  height: auto;
}

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: var(--text-shadow-hero);
}

.nav__links a {
  opacity: 1;
  transition: color var(--transition), opacity var(--transition);
}

.nav__links a:hover {
  color: var(--color-gold-pale);
  opacity: 1;
}

/* Przycisk kontaktu w menu mobilnym (na desktopie jest osobny przycisk CTA obok linków). */
.nav__cta-mobile {
  display: none;
}

.nav__toggle {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-white);
  font-size: 27px;
  cursor: pointer;
}

.nav__toggle::before {
  content: "\2630";
}

.nav__toggle[aria-expanded="true"]::before {
  content: "\2715";
}

/* 6. Hero
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 730px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(38, 35, 28, 0.55) 0, rgba(38, 35, 28, 0) 190px),
    var(--hero-overlay),
    var(--hero-image) center / cover no-repeat;
  color: var(--color-white);
  --hero-image: url("../assets/images/hero-1600.webp");
  --hero-overlay: linear-gradient(
    90deg,
    rgba(38, 35, 28, 0.7) 0%,
    rgba(38, 35, 28, 0.55) 35%,
    rgba(38, 35, 28, 0.28) 58%,
    rgba(38, 35, 28, 0.05) 80%
  );
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  background: linear-gradient(transparent, var(--color-cream));
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 610px;
  padding-top: 85px;
}

.hero__eyebrow {
  margin: 0 0 18px;
  color: var(--color-gold-pale);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: var(--text-shadow-hero);
}

.hero__copy {
  max-width: 510px;
  margin: 0 0 32px;
  color: var(--color-white);
  font-size: 18px;
  text-shadow: var(--text-shadow-hero);
}

.hero__note {
  margin: 20px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: var(--text-shadow-hero);
}

/* 7. Pasek zalet
   ========================================================================== */
.trust {
  position: relative;
  z-index: 3;
  margin-top: -38px;
}

.trust__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: var(--radius-card);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--shadow-card);
}

.trust__item {
  padding: 25px 20px;
  border-right: 1px solid var(--color-line);
  text-align: center;
}

.trust__item:last-child {
  border-right: 0;
}

.trust__icon {
  margin-bottom: 6px;
  color: var(--color-gold);
  font-size: 24px;
}

.trust__label {
  display: block;
  color: var(--color-olive);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 8. Sekcje (wspólne)
   ========================================================================== */
.section-head {
  max-width: 760px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head p {
  margin: 0;
  color: var(--color-muted);
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--color-gold);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* 9. Oferta
   ========================================================================== */
.offers {
  background: var(--color-paper);
}

.offers__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.card__image {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.card__body {
  padding: 24px;
}

.card__title {
  margin: 0 0 9px;
  color: var(--color-olive);
  font-size: 28px;
}

.card__text {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 14px;
}

.offers .card__text:last-child {
  margin-bottom: 0;
}

.offers__cta {
  margin-top: 44px;
  text-align: center;
}

.card__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
}

/* 9a. Katalog (gotowe kompozycje z arkusza)
   ========================================================================== */
.catalog {
  background: var(--color-cream);
}

.catalog__filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 22px;
}

.catalog__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Reguły z display przesłaniają atrybut hidden, więc ukrywamy je jawnie. */
.catalog__filters[hidden],
.catalog__group[hidden] {
  display: none;
}

.catalog__label {
  color: var(--color-olive);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.catalog__label output {
  color: var(--color-gold-dark);
}

.catalog__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  padding: 9px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-olive);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.chip:hover {
  border-color: var(--color-gold);
}

.chip[aria-pressed="true"] {
  border-color: var(--color-olive);
  background: var(--color-olive);
  color: var(--color-white);
}

.catalog__range {
  width: 240px;
  accent-color: var(--color-gold);
}

.catalog__reset {
  padding: 0 0 2px;
  border: 0;
  background: none;
  color: var(--color-gold-dark);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-transform: uppercase;
  cursor: pointer;
}

.catalog__reset:disabled {
  opacity: 0.45;
  text-decoration: none;
  cursor: default;
}

/* Licznik i "Wyczyść filtry" w jednej linii, wyśrodkowane. Przycisk jest widoczny cały czas
   (przygaszony i nieaktywny, gdy nie ma filtrów), więc nic się nie przesuwa przy zmianie filtrów. */
.catalog__summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  min-height: 2em;
  margin: 0 0 24px;
}

.catalog__summary[hidden] {
  display: none;
}

.catalog__count {
  min-width: 200px;                  /* stała szerokość: zmiana tekstu ("1 kompozycja" / "9 kompozycji") nie przesuwa przycisku */
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  text-align: center;
}

/* Flex zamiast siatki: niepełny rząd (np. 2 karty po filtrowaniu) jest wyśrodkowany. */
.catalog__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
}

.catalog__grid > .product {
  flex: 0 1 calc((100% - 44px) / 3);
  min-width: 0;
}

.catalog__message {
  padding: 40px 20px;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-card);
  color: var(--color-muted);
  text-align: center;
}

.catalog__message-text {
  margin: 0 0 18px;
}

.product {
  display: flex;
  flex-direction: column;
}

.product__media {
  position: relative;
}

.product__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/* Ikona lupy w rogu zdjęcia (pojawia się po najechaniu lub fokusie). */
.product__zoom::after {
  content: "⤢";
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  color: var(--color-olive);
  font-size: 18px;
  opacity: 0;
  transition: opacity var(--transition);
}

.product__zoom:hover::after,
.product__zoom:focus-visible::after {
  opacity: 1;
}

.product__occasion,
.product__ribbon {
  pointer-events: none;                  /* klik w znaczek otwiera zdjęcie */
}

.product__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product__occasion {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 249, 0.92);
  color: var(--color-olive);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product__ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-gold);
  box-shadow: 0 6px 16px rgba(120, 84, 38, 0.35);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.product__title {
  margin: 0 0 9px;
  color: var(--color-olive);
  font-size: 26px;
}

.product__text {
  display: -webkit-box;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-line);
}

.product__price {
  color: var(--color-olive);
  font-family: var(--font-serif);
  font-size: 24px;
}

/* Wyróżnione: złota ramka, ciepłe tło, wstążka "Polecane", cena w kolorze bordo. */
.product--featured {
  border: 2px solid var(--color-gold);
  background: linear-gradient(180deg, #fff8ea, var(--color-white) 55%);
  box-shadow: 0 16px 44px rgba(184, 138, 82, 0.28);
}

.product--featured .product__price {
  color: var(--color-burgundy);
}

.product--skeleton {
  min-height: 430px;
  border: 0;
  background: linear-gradient(90deg, #f3ece2 25%, #fbf7f1 50%, #f3ece2 75%);
  background-size: 200% 100%;
  box-shadow: none;
  animation: skeleton-shimmer 1.4s linear infinite;
}

@keyframes skeleton-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* 10. O nas
   ========================================================================== */
.story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 560px;
  padding: 0;
  background: var(--color-cream-dark);
}

.story__image {
  min-height: 560px;
  background: url("../assets/images/story.webp") center / cover;
}

.story__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px max(40px, 7vw);
}

.story__title {
  font-size: 50px;
}

.story__text {
  max-width: 500px;
  margin: 0 0 1em;
  color: var(--color-muted);
}

.story__divider {
  width: 90px;
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--color-gold);
}

/* 11. Jak zamówić
   ========================================================================== */
.process {
  background: var(--color-paper);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  padding: 15px;
  text-align: center;
}

.step__number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  color: var(--color-gold);
  font-family: var(--font-serif);
  font-size: 20px;
}

.step__title {
  margin: 0 0 8px;
  color: var(--color-olive);
  font-size: 25px;
}

.step__text {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.process__cta {
  margin-top: 44px;
  text-align: center;
}

/* 12. Galeria
   ========================================================================== */
.gallery {
  background: var(--color-cream);
}

.gallery__rows {
  display: grid;
  gap: 80px;
}

.gallery__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.gallery__row--reverse .gallery__media {
  order: 2;
}

.gallery__media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.gallery__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.gallery__title {
  margin: 0 0 15px;
  color: var(--color-olive);
  font-size: clamp(30px, 3vw, 40px);
}

.gallery__text {
  max-width: 480px;
  margin: 0;
  color: var(--color-muted);
}

/* 13. CTA końcowe
   ========================================================================== */
.final-cta {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(46, 44, 35, 0.78), rgba(46, 44, 35, 0.35)),
    url("../assets/images/cta.webp") center / cover;
  color: var(--color-white);
}

.final-cta .container {
  display: flex;
  align-items: center;
  min-height: 430px;
}

.final-cta__copy {
  max-width: 600px;
}

.final-cta__title {
  color: var(--color-white);
  font-size: 54px;
}

.final-cta__text {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
}

/* 14. Stopka
   ========================================================================== */
.site-footer {
  padding: 55px 0 25px;
  background: var(--color-footer);
  color: #f4eee5;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.site-footer p {
  margin: 0 0 1em;
}

.site-footer a:hover {
  color: var(--color-white);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 35px;
}

.footer__logo {
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
}

.footer__title {
  margin: 0 0 1em;
  color: var(--color-gold-light);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer__copyright {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .footer__copyright p {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

/* 15. Okno zamówienia i formularz
   ========================================================================== */
.modal {
  width: min(560px, calc(100% - 40px));
  max-height: calc(100% - 40px);
  padding: 35px;
  overflow-y: auto;
  border: 0;
  border-radius: 20px;
  background: var(--color-paper);
  color: var(--color-text);
  box-shadow: var(--shadow-modal);
}

.modal::backdrop {
  background: var(--color-overlay);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-muted);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.modal__title {
  margin: 0 0 5px;
  color: var(--color-olive);
  font-size: 34px;
}

.modal__text {
  color: var(--color-muted);
  font-size: 14px;
}

.modal__product {
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: var(--radius-field);
  background: var(--color-cream);
  color: var(--color-olive);
  font-size: 14px;
}

.modal__product-id {
  color: var(--color-muted);
  font-size: 12px;
  white-space: nowrap;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  margin-top: 14px;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-olive);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field__control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-field);
  background: var(--color-white);
  color: var(--color-text);
}

.field__control:focus {
  border-color: var(--color-gold);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(184, 138, 82, 0.25);
}

textarea.field__control {
  min-height: 90px;
  resize: vertical;
}

.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.consent input {
  flex: none;
  margin: 3px 0 0;
  accent-color: var(--color-gold);
}

.form__error {
  margin: 16px 0 0;
  color: #9b2c2c;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.form .btn {
  margin-top: 20px;
}

.form__success {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid var(--color-success);
  border-radius: var(--radius-field);
  background: var(--color-success-bg);
  color: var(--color-success-text);
  font-size: 15px;
  font-weight: 600;
}

.form__success[hidden] {
  display: none;
}

.form__success-icon {
  flex: none;
  color: var(--color-success);
  animation: success-pop 0.4s ease-out;
}

@keyframes success-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 15a. Powiększone zdjęcie kompozycji (okno)
   ========================================================================== */
.lightbox {
  width: fit-content;
  max-width: min(94vw, 1040px);
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-text);
  box-shadow: var(--shadow-modal);
}

.lightbox::backdrop {
  background: rgba(20, 20, 16, 0.78);
}

.lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;                      /* auto + max: obraz nigdy nie jest powiększany ponad swój rozmiar */
  margin: 0 auto;
}

.lightbox__caption {
  margin: 0;
  padding: 16px 24px 20px;
  color: var(--color-olive);
  font-family: var(--font-serif);
  font-size: 22px;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  color: var(--color-olive);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* 16. Responsywność
   ========================================================================== */
@media (min-width: 1201px) {
  .hero {
    --hero-image: url("../assets/images/hero-2400.webp");
  }
}

@media (max-width: 1000px) {
  .catalog__grid > .product {
    flex-basis: calc((100% - 22px) / 2);
  }
}

@media (max-width: 640px) {
  .catalog__grid > .product {
    flex-basis: 100%;
  }

  .catalog__range {
    width: min(280px, 80vw);
  }
}

@media (max-width: 850px) {
  .nav__toggle {
    display: block;
  }

  .nav > .btn {
    display: none;
  }

  .nav__links {
    display: none;
  }

  .nav.is-open .nav__cta-mobile {
    display: block;
  }

  .nav__cta-mobile .btn {
    width: 100%;
  }

  .nav.is-open .nav__links {
    position: absolute;
    top: 80px;
    right: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 14px;
    background: var(--color-menu);
  }

  .hero {
    --hero-overlay: linear-gradient(rgba(38, 35, 28, 0.42), rgba(38, 35, 28, 0.42));
    min-height: 720px;
    background-position: 65% center;
  }

  .hero__content {
    padding-top: 120px;
  }

  .trust__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__item:nth-child(2) {
    border-right: 0;
  }

  .trust__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-line);
  }

  .offers__grid,
  .story {
    grid-template-columns: 1fr;
  }

  .story__image {
    min-height: 400px;
  }

  .steps,
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__rows {
    gap: 56px;
  }

  .gallery__row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gallery__row--reverse .gallery__media {
    order: 0;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--container-width), calc(100% - 28px));
  }

  .section {
    padding: 75px 0;
  }

  .nav {
    height: 78px;
  }

  .brand {
    width: 140px;
    padding: 12px 8px 6px;
  }

  .hero {
    min-height: 680px;
  }

  h1 {
    font-size: 46px;
  }

  .hero__copy {
    font-size: 16px;
  }

  .trust__item {
    padding: 18px 10px;
  }

  .steps,
  .footer__grid,
  .form__grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .story__copy {
    padding: 65px 25px;
  }

  .modal {
    padding: 28px 22px;
  }
}

/* 17. Preferencje użytkownika
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
