/* ============================================================
   STRONA GŁÓWNA — Herbarium · Partia 1 redesign (wg Figma)
   Czysty, responsywny arkusz scoped pod .hp (bez kolizji z main.css)
   Slidery produktów + pasek korzyści: port z modliteczki.
   ============================================================ */

.hp {
  --ink:        #2c2a26;
  --muted:      var(--taupe);   /* #7C7A76 — globalna */
  --soft:       #525252;
  --pink:       var(--rose);    /* #C97B8A — globalna */
  --pink-light: #f2d9de;
  --green:      #4a7c5f;
  --green-ink:  #2d5a3d;
  /* --cream (#FAF8F5) i --cream-2 (#F0EAE0) dziedziczone z :root (main.css) */
  --sand:       #e8d5c0;
  --line:       #e7e7e7;
  --dark:       #3d3d3d;
  --r-sm: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --maxw: 1240px;

  font-family: "Jost", system-ui, sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
}
.hp *, .hp *::before, .hp *::after { box-sizing: border-box; }

.hp h1, .hp h2, .hp h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}

.hp__wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* — przyciski — */
.hp .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 12px 24px; border: 0; border-radius: 0;
  font-family: "Jost", sans-serif; font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.hp .btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.hp .btn--pink  { background: var(--pink); color: #fff; }
.hp .btn--pink:hover { background: #b96a79; }
.hp .btn--ghost, .hp .btn--outline { background: transparent; color: var(--green-ink); border: 1px solid var(--green); }
.hp .btn--ghost:hover, .hp .btn--outline:hover { background: var(--green); color: #fff; }
.hp .btn--pink-light { background: var(--pink-light); color: var(--ink); }
.hp .btn--pink-light:hover { background: #ecc7ce; }

/* — wspólny nagłówek sekcji — */
.hp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.hp-head__title { font-size: 30px; }
.hp-head__lead { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.hp-head__link { display: inline-flex; align-items: center; gap: 8px; color: var(--green-ink); font-size: 14px; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.hp-head__link:hover { text-decoration: underline; }

/* ============================================================
   1. HERO
   ============================================================ */
.hp-hero { background: var(--cream); overflow: hidden; }
/* Obraz wycieka do prawej krawędzi okna; tekst wyrównany do krawędzi kontenera (jak na modliteczce). */
.hp-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch; min-height: 500px; }
.hp-hero__copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; padding: 48px 48px 48px max(24px, calc((100vw - var(--maxw)) / 2 + 24px)); }
.hp-hero__title { font-size: clamp(28px, 4vw, 40px); }
.hp-hero__sub { margin: 0; color: var(--muted); font-size: 18px; }
.hp-hero__media { position: relative; overflow: hidden; }
.hp-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   2. PASEK KORZYŚCI (logo-strip — auto-karuzela na mobile)
   ============================================================ */
.hp .logo-strip { background: #fff; padding: 16px 0; }
.hp .logo-strip__benefits { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hp .logo-strip__item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.hp .logo-strip__item svg { width: 24px; height: 24px; color: var(--green-ink); flex-shrink: 0; }

/* ============================================================
   3. KATEGORIE
   ============================================================ */
.hp-cats { background: #fdfdfd; padding: 56px 0 32px; }
.hp-cats__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hp-cats__track::-webkit-scrollbar { display: none; }
.hp-cats__dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; }
.hp-cats__dots:empty { display: none; }
.hp-cats__dots .dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--cream-2); cursor: pointer; transition: background .18s ease, width .18s ease; }
.hp-cats__dots .dot.active { width: 22px; background: var(--pink); }
.hp-cat-card { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px; border-radius: var(--r-sm); background: var(--cream); text-decoration: none; color: var(--ink); }
.hp-cat-card__img { width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); background: #fff center/cover no-repeat; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hp-cat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.hp-cat-card__img-fallback { font-family: "Playfair Display", serif; font-size: 44px; color: var(--sand); }
.hp-cat-card__name { font-size: 15px; font-weight: 500; text-align: center; }

/* ============================================================
   4. SEKCJE PRODUKTÓW — slider (port modliteczki)
   ============================================================ */
.hp .cat-sections { background: #fff; }
.hp .cat-section { padding: 44px 0; background: #fff; }
.hp .cat-section--alt { background: var(--cream-2); }
.hp .cat-section__inner { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: flex-start; }
.hp .cat-section__head { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.hp .cat-section__title { font-size: clamp(30px, 3.4vw, 42px); }
.hp .cat-section__desc { margin: 0; color: var(--muted); font-size: 16px; }
.hp .cat-section__head .btn { align-self: flex-start; }

.hp .cat-slider-nav { display: inline-flex; align-items: center; border: 1px solid var(--cream-2); border-radius: var(--r-sm); overflow: hidden; align-self: flex-start; }
.hp .cat-slider-nav__btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); cursor: pointer; border: 0; transition: background .15s, color .15s; }
.hp .cat-slider-nav__btn--next { color: var(--pink); }
.hp .cat-slider-nav__btn:hover:not(:disabled) { background: rgba(0,0,0,.04); }
.hp .cat-slider-nav__btn:disabled { color: var(--muted); cursor: not-allowed; opacity: .5; }
.hp .cat-slider-nav__btn--prev { border-right: 1px solid var(--cream-2); }
.hp .cat-slider-nav__btn--next { border-left: 1px solid var(--cream-2); }
.hp .cat-slider-nav__indicator { padding: 0 20px; font-size: 14px; font-weight: 700; line-height: 44px; min-width: 72px; text-align: center; letter-spacing: .5px; color: var(--muted); }
.hp .cat-slider-nav__sep { color: var(--muted); margin: 0 4px; }

.hp .cat-section__slider { overflow: hidden; position: relative; }
.hp .cat-slider-track { display: flex; gap: 32px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; transition: transform .35s ease; }
.hp .cat-slider-track::-webkit-scrollbar { display: none; }
.hp .cat-slider-track .shop-card { flex: 0 0 calc((100% - 64px) / 3); scroll-snap-align: start; }

/* karta produktu (.shop-card) — wspólny arkusz: assets/css/product-card.css */

/* ============================================================
   5. O MNIE
   ============================================================ */
.hp-about { padding: 48px 0; background: #fff; }
.hp-about__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border-radius: var(--r-sm); overflow: hidden; background: var(--cream-2); }
.hp-about__media { min-height: 360px; }
.hp-about__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-about__body { display: flex; flex-direction: column; gap: 18px; padding: clamp(32px, 4vw, 56px); background: var(--cream); }
.hp-about__body h2 { font-size: 28px; }
.hp-about__body p { margin: 0; color: var(--muted); font-size: 16px; }
.hp-about__body .btn { align-self: flex-start; margin-top: 6px; }

/* ============================================================
   6. PROCES + WIDEO
   ============================================================ */
.hp-process { padding: 0 0 48px; background: #fff; }
.hp-process__head { margin-bottom: 28px; }
.hp-process__head h2 { font-size: 30px; }
.hp-process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.hp-process__step { display: flex; flex-direction: column; gap: 8px; padding: 4px 24px; border-right: 1px solid var(--cream-2); }
.hp-process__step:first-child { padding-left: 0; }
.hp-process__step:last-child { border-right: 0; padding-right: 0; }
.hp-process__step svg { width: 22px; height: 22px; color: var(--pink); }
.hp-process__step h3 { font-size: 16px; }
.hp-process__step p { margin: 0; color: var(--muted); font-size: 15px; }
.hp-process__video { margin-top: 36px; position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--cream-2); }
.hp-process__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   7. FAQ  (reużywa .faq-* z main.js do akordeonu)
   ============================================================ */
.hp-faq { padding: 48px 0; background: #fff; }
.hp-faq__head { text-align: center; margin-bottom: 28px; }
.hp-faq__head h2 { font-size: 30px; }
.hp-faq__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.hp-faq__media { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1 / 1; background: var(--cream-2); }
.hp-faq__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-faq .faq-list { display: flex; flex-direction: column; gap: 8px; max-width: none; }
.hp-faq .faq-item { background: var(--cream); border: 0; border-radius: var(--r-sm); overflow: hidden; }
.hp-faq .faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 0; background: transparent; cursor: pointer; font-family: "Playfair Display", serif; font-size: 16px; font-weight: 700; text-align: left; color: var(--ink); }
.hp-faq .faq-chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s ease; color: var(--ink); }
.hp-faq .faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.hp-faq .faq-answer { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.hp-faq .faq-question[aria-expanded="true"] + .faq-answer { max-height: 520px; }
.hp-faq .faq-answer p { margin: 0; padding: 0 24px 20px; color: var(--muted); font-size: 15px; }

/* ============================================================
   8. SEO TEXT
   ============================================================ */
.hp-seo { padding: 56px 0; background: #fff; }
.hp-seo__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hp-seo__block { display: flex; flex-direction: column; gap: 14px; }
.hp-seo__block h1, .hp-seo__block h2, .hp-seo__block h3 { font-size: 20px; }
.hp-seo__block p, .hp-seo__block li { color: var(--ink); font-size: 16px; line-height: 1.6; }
.hp-seo__block ul { margin: 0; padding-left: 20px; }
.hp-seo__hl { color: #c97b8a; font-weight: 400; }

/* ============================================================
   9. NEWSLETTER
   ============================================================ */
.hp-news { background: var(--dark); padding: 56px 0; color: #fff; }
.hp-news__inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.hp-news__title { color: #fff; font-size: 30px; }
.hp-news__lead { margin: 0; color: rgba(255,255,255,.75); max-width: 560px; }
.hp-news__form { display: flex; gap: 12px; width: 100%; max-width: 560px; }
.hp-news__form input[type="email"] { flex: 1; height: 48px; padding: 12px 16px; border: 1px solid #5a5a5a; border-radius: var(--r-sm); background: #f8f8f8; color: var(--ink); font-size: 15px; }

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 1080px) {
  .hp-cats__track { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .hp-process__grid { grid-template-columns: repeat(2, 1fr); }
  .hp-process__step { border-right: 0; padding: 16px 0; border-bottom: 1px solid var(--cream-2); }
}

/* Slidery + pasek korzyści — przewijanie palcem (port modliteczki) */
@media (max-width: 1024px) {
  .hp .logo-strip__benefits { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .hp .logo-strip__benefits::-webkit-scrollbar { display: none; }
  .hp .logo-strip__item { flex-shrink: 0; }

  .hp .cat-section__inner { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
  .hp .cat-section__head { display: contents; }
  .hp .cat-section__title { order: 1; }
  .hp .cat-section__desc { order: 2; }
  .hp .cat-slider-nav { display: none; }
  .hp .cat-section__slider { order: 3; margin: 0 -24px; overflow: visible; min-width: 0; }
  .hp .cat-section__head .btn { order: 4; width: 100%; justify-content: center; align-self: stretch; }
  .hp .cat-slider-track { gap: 20px; overflow-x: auto; padding: 0 24px; scroll-padding-left: 24px; transform: none !important; }
  .hp .cat-slider-track .shop-card { flex: 0 0 46%; scroll-snap-align: start; }
}

@media (max-width: 860px) {
  .hp-hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .hp-hero__copy { max-width: none; padding: 40px 24px; }
  /* Safari/WebKit nie wylicza wysokości z aspect-ratio dla elementu gridu, którego
     jedyna treść jest pozycjonowana absolutnie — wiersz kolapsował do 0 i hero znikało.
     Proporcję ustawiamy więc na samym zdjęciu, w normalnym flow. */
  .hp-hero__media { min-height: 0; order: -1; }
  .hp-hero__media img { position: static; width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .hp-about__inner { grid-template-columns: 1fr; }
  .hp-about__media { min-height: 280px; order: -1; }
  .hp-faq__inner { grid-template-columns: 1fr; }
  .hp-faq__media { display: none; }
  .hp-seo__cols { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hp-cats__track { grid-auto-columns: calc((100% - 20px) / 2); }
  .hp .cat-slider-track .shop-card { flex: 0 0 72%; }
  .hp-news__form { flex-direction: column; }
}
