/* ============================================================
   STRONA GŁÓWNA — motyw: kość słoniowa + grafit + złoto.
   Neutralna, elegancka oprawa pod 30 kolorowych kafelków olejków.
   Nie zależy od palet landingów — ma własne zmienne.
   ============================================================ */
:root {
  --h-paper:   #f4efe6;   /* tło strony — ciepła kość słoniowa */
  --h-card:    #ffffff;   /* karty */
  --h-ink:     #2b2824;   /* grafit — teksty, nagłówki */
  --h-soft:    #6b6459;   /* teksty drugorzędne */
  --h-line:    #e6ddcb;   /* obramowania */
  --h-line2:   #d9cfb9;   /* mocniejsze linie (input) */
  --h-gold:    #c19a3e;   /* złoto — akcent */
  --h-gold-dk: #8a6f2c;   /* ciemniejsze złoto — hover */
  --h-panel:   #f7f4ee;   /* tło miniatury w kafelku */
}

.home-body {
  background: var(--h-paper); color: var(--h-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.home-topbar {
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--h-line);
  padding: 0; position: sticky; top: 0; z-index: 50;
}
/* HTML ma <div class="wrap"> wewnątrz — to on jest flex-kontenerem.
   Nadpisujemy .wrap ze style.css tylko w obrębie strony głównej. */
.home-topbar .wrap {
  max-width: 1140px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 16px; height: auto;
}
.home-topbar .logo {
  display: flex; align-items: center; gap: 9px; font-family: var(--display, 'Space Grotesk', sans-serif);
  font-weight: 700; font-size: 18px; color: var(--h-ink); text-decoration: none; white-space: nowrap;
  letter-spacing: 0;
}
.home-topbar .logo .leaf { width: 22px; height: 22px; flex: none; }
.logo-text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.logo-brand { font-weight: 700; }
.logo-sub { font-size: 11px; font-weight: 500; color: var(--h-gold-dk); letter-spacing: .02em; font-family: 'Inter', sans-serif; margin-top: 1px; }

/* Wyszukiwarka w topbarze */
.home-search { flex: 1; max-width: 380px; margin: 0 auto; position: relative; }
.home-search input {
  width: 100%; padding: 9px 14px 9px 36px; border: 1px solid var(--h-line2);
  border-radius: 10px; background: #fff; font-size: 14px; color: var(--h-ink);
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.home-search input::placeholder { color: #9a9284; }
.home-search input:focus { outline: none; border-color: var(--h-gold); box-shadow: 0 0 0 3px rgba(193,154,62,.14); }
.home-search .search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--h-gold); font-size: 16px; pointer-events: none; }
/* Dropdown wyników */
.home-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff;
  border: 1px solid var(--h-line); border-radius: 12px; box-shadow: 0 20px 50px rgba(43,40,36,.14);
  overflow: hidden; z-index: 60; display: none; max-height: 60vh; overflow-y: auto;
}
.home-search-results.show { display: block; }
.hs-hit { display: flex; align-items: center; gap: 12px; padding: 11px 15px; cursor: pointer; text-decoration: none; color: var(--h-ink); }
.hs-hit:hover { background: var(--h-panel); }
.hs-thumb { width: 38px; height: 38px; border-radius: 8px; background: #fff; border: 1px solid var(--h-line); overflow: hidden; display: grid; place-items: center; flex: none; }
.hs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.hs-thumb:empty { display: none; }
.hs-name { flex: 1; font-size: 14px; font-weight: 500; }
.hs-price { color: var(--h-gold-dk); font-weight: 700; font-size: 14px; white-space: nowrap; }
.hs-empty { padding: 16px; text-align: center; color: var(--h-soft); font-size: 14px; }

.home-cart-wrap { position: relative; }
.home-cart { position: relative; color: var(--h-ink); display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.home-cart .cart-badge {
  position: absolute; top: -3px; right: -5px; background: var(--h-gold); color: #fff;
  border-radius: 50%; min-width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; padding: 0 4px;
}

/* Kontener treści strony głównej — nadpisuje .wrap ze style.css */
.home-main.wrap, .home-wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- Hero ---------- */
.home-hero { text-align: center; max-width: 620px; margin: 0 auto; padding: 40px 20px 28px; }
.home-hero .eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--h-gold); font-weight: 700; margin-bottom: 10px; }
.home-hero h1 { font-family: var(--display, 'Space Grotesk', sans-serif); font-size: clamp(28px, 5vw, 40px); color: var(--h-ink); margin: 0 0 12px; font-weight: 700; }
.home-hero p { font-size: 16px; color: var(--h-soft); line-height: 1.6; margin: 0; }

/* ---------- Siatka kafelków ---------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; padding-bottom: 34px; }
.oil-card {
  background: var(--h-card); border: 1px solid var(--h-line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--h-ink);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.oil-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43,40,36,.12); border-color: var(--oil-accent, var(--h-gold)); }
/* Kolorowy pasek olejku (z palety, przez inline --oil-accent) */
.oil-bar { height: 5px; background: var(--oil-accent, var(--h-gold)); }
.oil-thumb {
  aspect-ratio: 1/1; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--oil-accent, var(--h-gold)) 8%, #fff);
}
/* Miniatura (img/card) ma już wbudowany margines (skrypt generuj-miniatury.py),
   więc butelka po prostu wypełnia kwadratowy thumb. Welon w kolorze olejku
   prześwituje przez przezroczyste tło miniatury. */
.oil-thumb img { width: 100%; height: 100%; object-fit: contain; }
.oil-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.oil-body h2 { font-family: var(--display, 'Space Grotesk', sans-serif); font-size: 17px; margin: 0; font-weight: 700; }
.oil-hero { font-size: 13px; color: var(--h-soft); margin: 0; flex: 1; }
.oil-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.oil-price { font-family: var(--display, 'Space Grotesk', sans-serif); font-weight: 700; font-size: 18px; color: var(--oil-accent-ink, var(--h-gold-dk)); }
.oil-add {
  background: var(--h-ink); color: #fff; border: 0; padding: 8px 5px; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background .15s;
}
.oil-add:hover { background: var(--oil-accent, var(--h-gold-dk)); }

.home-empty { text-align: center; color: var(--h-soft); grid-column: 1/-1; padding: 40px; }

/* ---------- Sekcja opisowa ---------- */
.home-about { max-width: 800px; margin: 30px auto 8px; padding: 0 20px; }
.home-about h2 { font-family: var(--display, 'Space Grotesk', sans-serif); font-size: 22px; margin-bottom: 12px; color: var(--h-ink); }
.home-about p { color: var(--h-soft); line-height: 1.65; margin-bottom: 12px; font-size: 15px; }

/* ---------- Stopka ---------- */
.home-footer { background: var(--h-ink); color: #c9c1b3; margin-top: 30px; padding: 30px 22px; text-align: center; font-size: 14px; }
.home-footer a { color: var(--h-gold); text-decoration: none; }

/* ---------- Panel koszyka (dropdown) ---------- */
.home-cart-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; padding: 16px; z-index: 60;
  background: #fff; border: 1px solid var(--h-line); border-radius: 14px; box-shadow: 0 20px 50px rgba(43,40,36,.16);
}
.hcp-empty { color: var(--h-soft); font-size: 14px; text-align: center; padding: 18px 0; }
.hcp-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--h-line); }
.hcp-item:last-child { border-bottom: 0; }
.hcp-img { width: 46px; height: 46px; border-radius: 8px; background: var(--h-panel); border: 1px solid var(--h-line); flex: none; overflow: hidden; display: grid; place-items: center; }
.hcp-img img { width: 100%; height: 100%; object-fit: contain; }
.hcp-img:empty { display: none; }
.hcp-main { flex: 1; min-width: 0; }
.hcp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hcp-name { color: var(--h-ink); font-weight: 600; font-size: 14px; line-height: 1.3; text-decoration: none; }
a.hcp-name:hover { color: var(--h-gold-dk); text-decoration: underline; }
.hcp-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.hcp-qty { display: inline-flex; align-items: center; border: 1px solid var(--h-line2); border-radius: 8px; overflow: hidden; }
.hcp-qty button {
  width: 26px; height: 26px; border: 0; background: #fff; color: var(--h-ink); cursor: pointer;
  font-size: 15px; line-height: 1; display: grid; place-items: center; transition: background .12s, color .12s;
}
.hcp-qty button:hover { background: var(--h-gold); color: #fff; }
.hcp-qty span { min-width: 24px; text-align: center; font-weight: 600; font-size: 13px; }
.hcp-line { color: var(--h-gold-dk); font-weight: 700; font-size: 15px; white-space: nowrap; }
.hcp-rm {
  border: 0; background: none; color: var(--h-soft); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 2px; flex: none; transition: color .12s;
}
.hcp-rm:hover { color: #c0392b; }
.hcp-foot { border-top: 1px solid var(--h-line); margin-top: 8px; padding-top: 12px; }
.hcp-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; color: var(--h-soft); font-size: 14px; }
.hcp-total strong { font-family: var(--display, 'Space Grotesk', sans-serif); font-size: 20px; color: var(--h-ink); }
.hcp-checkout {
  display: block; text-align: center; background: var(--h-gold); color: #fff; text-decoration: none;
  padding: 11px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: background .15s;
}
.hcp-checkout:hover { background: var(--h-gold-dk); }

/* ---------- Kontakt w topbarze ---------- */
.home-contact {
  display: inline-flex; align-items: center; gap: 7px; color: var(--h-ink); text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap; padding: 6px 4px; transition: color .15s;
}
.home-contact:hover { color: var(--h-gold-dk); }
.home-contact svg { color: var(--h-gold); }

/* ---------- Stopka: linki + dane ---------- */
.home-footer .wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.home-foot-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin-bottom: 18px;
}
.home-foot-links a { color: #d8cfc0; text-decoration: none; font-size: 14px; transition: color .15s; }
.home-foot-links a:hover { color: var(--h-gold); }
.home-foot-legal { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.home-foot-legal span { font-size: 13px; color: #9a9384; line-height: 1.5; }
.home-foot-company { max-width: 620px; }

@media (max-width: 720px) {
  .home-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Topbar mobile: logo + koszyk w jednym rzędzie, wyszukiwarka pod spodem
     na całą szerokość. Kontakt ukryty (jest w stopce). */
  .home-topbar .wrap { flex-wrap: wrap; row-gap: 10px; }
  .home-contact { display: none; }
  .home-search {
    order: 3; flex: 1 0 100%; max-width: none; margin: 0;
  }
  .home-cart-wrap { margin-left: auto; }
  /* Dropdown wyników na mobile nie wychodzi poza ekran */
  .home-search-results { left: 0; right: 0; }
}

.home-body .shipbar {
  background: var(--h-ink);   /* grafit #2b2824 — jak nagłówek strony głównej */
  color: #fff;
}
.home-body .shipbar svg {
  opacity: .85;
}
