/*
Theme Name: éclore
Theme URI: https://eclore.pl
Author: éclore
Description: Autorski motyw blokowy dla sklepu éclore. Bransoletki z kamieni naturalnych, przypisane do znaków zodiaku i intencji. Paleta i typografia wyprowadzone ze zdjęcia kampanii.
Version: 1.3.1
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eclore
Tags: full-site-editing, block-patterns, e-commerce, custom-colors, custom-menu
*/

/* Wszystko, czego nie da się ustawić w theme.json, mieszka tutaj. */

/* ---------- znak firmowy ---------- */
/* Proporcje są zablokowane, żeby żadna reguła Woo ani rdzenia nie mogła
   rozciągnąć napisu, tak jak zdarzyło się to w makiecie. */
.eclore-mark img {
  height: auto;
  aspect-ratio: 384 / 99;
  object-fit: contain;
  display: block;
  max-width: 100%;
}
.eclore-mark--bar img { width: 132px; margin-inline: auto; }
.eclore-mark--hero img { width: clamp(200px, 24vw, 310px); }

/* Znak jest czarny z przezroczystym tłem, więc na zdjęciu odwracamy go na biało. */
.eclore-mark--hero img {
  filter: invert(1) drop-shadow(0 2px 18px rgba(0, 0, 0, .55));
}
.eclore-mark--hero { margin-left: 0; }

/* ---------- pasek ogłoszeniowy ---------- */
.eclore-announce {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- etykiety wersalikowe ---------- */
.eclore-label {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- indeks znaków i intencji ---------- */
.eclore-index a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--wp--preset--color--line);
  transition: padding-left 0.25s ease;
}
.eclore-index a:hover { padding-left: 0.75rem; }
.eclore-index .sign {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.2rem;
}
.eclore-index .dates {
  font-size: 0.8125rem;
  color: var(--wp--preset--color--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Intencje nie mają dat ani kamieni, więc stoją wyśrodkowane. */
.eclore-index--intent a {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.eclore-index--intent a:hover { padding-left: 0.25rem; }

/* ---------- formularz newslettera (MailPoet) ---------- */
/* MailPoet wstrzykuje własne style inline. Celujemy w jego klasy i zdejmujemy
   zaokrąglenia, tła i obramowania, żeby formularz wyglądał jak reszta sklepu. */
.eclore-newsletter .mailpoet_form {
  padding: 0 !important;
  background: transparent !important;
}
.eclore-newsletter .mailpoet_form_columns,
.eclore-newsletter .mailpoet_paragraph {
  margin-bottom: 0.6rem !important;
}
.eclore-newsletter .mailpoet_text,
.eclore-newsletter input[type="email"],
.eclore-newsletter input[type="text"] {
  width: 100% !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid currentColor !important;
  border-radius: 0 !important;
  color: currentColor !important;
  font-family: var(--wp--preset--font-family--ui) !important;
  font-size: 1rem !important;
  font-weight: 300 !important;
  padding: 0.7rem 0.2rem !important;
  box-shadow: none !important;
}
.eclore-newsletter input::placeholder { color: currentColor !important; opacity: .55; }

.eclore-newsletter .mailpoet_submit,
.eclore-newsletter button[type="submit"] {
  font-family: var(--wp--preset--font-family--ui) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent !important;
  border: 1px solid currentColor !important;
  border-radius: 0 !important;
  color: currentColor !important;
  padding: 0.85rem 1.8rem !important;
  cursor: pointer;
  transition: background .25s, color .25s;
  box-shadow: none !important;
}
.eclore-newsletter .mailpoet_submit:hover {
  background: var(--wp--preset--color--paper) !important;
  color: var(--wp--preset--color--accent) !important;
}

/* Zgoda RODO i komunikaty */
.eclore-newsletter .mailpoet_checkbox_label,
.eclore-newsletter .mailpoet_paragraph.mailpoet_checkbox_label {
  font-size: 0.8125rem;
  line-height: 1.45;
  opacity: .9;
}
.eclore-newsletter .mailpoet_validate_success,
.eclore-newsletter .mailpoet_validate_error {
  color: currentColor !important;
  font-size: 0.875rem;
}

/* ---------- listy w stopce ---------- */
/* Rdzeń nie ma stylu "bez punktorów", więc dokładamy go sami. */
.wp-block-list.is-style-no-bullets {
  list-style: none;
  padding-left: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.wp-block-list.is-style-no-bullets a { color: var(--wp--preset--color--ink-2); }
.wp-block-list.is-style-no-bullets a:hover { color: var(--wp--preset--color--ink); }

/* ---------- karty produktów WooCommerce ---------- */
.woocommerce ul.products li.product,
.wc-block-grid__product {
  text-align: left;
}
.woocommerce ul.products li.product a img,
.wc-block-grid__product-image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: 0.85rem;
  transition: transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.woocommerce ul.products li.product:hover a img { transform: scale(1.04); }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.25;
  padding: 0;
}
.woocommerce ul.products li.product .price {
  font-family: var(--wp--preset--font-family--ui);
  font-size: 0.9375rem;
  color: var(--wp--preset--color--ink);
  font-variant-numeric: tabular-nums;
}

/* Woo lubi dokładać własne marginesy i wyśrodkowania. Zdejmujemy je. */
.woocommerce ul.products li.product .button { margin-top: 0.6rem; }
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { font-size: 0.875rem; }

/* ---------- hero ze zdjęciem ---------- */
.eclore-hero .eclore-hero__photo { object-fit: cover; }
.eclore-hero .wp-block-cover__inner-container {
  width: 100%;
  max-width: var(--wp--style--global--content-size);
  margin-inline: auto;
}
/* Treść siada przy dolnej krawędzi, żeby zdjęcie miało miejsce oddychać. */
.eclore-hero.wp-block-cover { align-items: flex-end; }

/* ---------- nagłówek nad zdjęciem (tylko strona główna) ---------- */
/* Na stronie głównej nagłówek leży na zdjęciu i jest biały. Na pozostałych
   podstronach zostaje zwykły, ciemny na papierze, bo nie ma tam czego nakładać. */
.home header.wp-block-template-part {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
/* WordPress wstawia odstęp między nagłówkiem a treścią. Przy nagłówku
   położonym na zdjęciu ten odstęp odsłaniał biały pasek strony pod napisami,
   przez co biały tekst na nim znikał. */
.home .wp-site-blocks > main { margin-top: 0 !important; }
/* Biel na jasnej wodzie ginie, więc pod całym nagłówkiem kładziemy miękkie
   przyciemnienie. Gwarantuje czytelność niezależnie od tego, co jest na zdjęciu,
   a samo w sobie jest niewidoczne, bo rozpływa się do zera. */
.home header.wp-block-template-part::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  background: linear-gradient(to bottom, rgba(8, 15, 19, .80) 0%, rgba(8, 15, 19, .46) 40%, rgba(8, 15, 19, .16) 72%, rgba(8, 15, 19, 0) 100%);
  pointer-events: none;
  z-index: -1;
}
.home .eclore-announce {
  background: transparent !important;
  color: #FFFFFF !important;
}
.home .eclore-bar {
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, .28) !important;
}
.home header .wp-block-navigation a,
.home header .wp-block-navigation__responsive-container-open,
.home header .wc-block-mini-cart__button,
.home header a {
  color: #FFFFFF !important;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .35);
}
.home header .wp-block-navigation__responsive-container-open svg,
.home header .wc-block-mini-cart__button svg { fill: #FFFFFF; }
/* Znak firmowy stoi wielki na zdjęciu, więc w pasku byłby drugi raz. */
.home header .eclore-mark--bar { display: none; }

/* ---------- czytelność nawigacji ---------- */
/* Domyślne 11 px było za małe jak na pozycje, w które ludzie mają trafiać.
   Podnosimy rozmiar i grubość wszędzie, nie tylko na stronie głównej. */
header .wp-block-navigation a,
header .wc-block-mini-cart__button {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em;
}

/* ---------- logotypy operatora płatności ---------- */
/* Grafika pochodzi z serwera Paynow, tak jak wymaga tego operator.
   Wymiary 123x123 są zgodne z plikiem, więc przeglądarka rezerwuje
   miejsce z góry i układ stopki nie skacze podczas wczytywania. */
.eclore-payments { gap: 1.5rem; }
/* Paynow nie narzuca rozmiaru, podaje tylko naturalne wymiary pliku (123x123).
   Zmniejszamy do 88 px, żeby logotypy nie dominowały stopki, ale zostały
   czytelne. Poniżej ~60 px napis "mastercard" przestaje być rozpoznawalny. */
.eclore-cards {
  width: 88px;
  height: auto;
  max-width: 100%;
  display: block;
}
@media (max-width: 640px) {
  .eclore-cards { width: 72px; }
}

/* ---------- dostępność ---------- */
:where(a, button, input, .wp-block-button__link):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
