/* ===========================================================================
   Dottingo — base.css
   Jádro vytažené z `reference/shopify-theme/assets/base.css` (173 kB / 6 506
   řádků). Převzaty jen reset, kontejnery, mřížka a typografie; všechno
   navázané na nepoužívané sekce tématu (announcement bar, modaly, facety,
   country sprite, reviews, quantity, social share…) vynecháno.

   Konvence rem po vzoru tématu: root 10 px, takže 1.4rem = 14 px.
   Odchylka: téma má `html { font-size: 10px }` natvrdo, my 62.5 % — stejný
   výsledek, ale respektuje to uživatelské zvětšení písma v prohlížeči.

   Komponenty (karty, cena, filtry) přijdou ve fázi 2 do components.css.
   =========================================================================== */

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

/* Atribut `hidden` musí platit i proti komponentám s vlastním `display`
   (`.button`, `.upload-zone`, `.uploaded`…). UA styl `[hidden]{display:none}`
   má nižší prioritu než jakékoli autorské pravidlo, takže JS přepínání
   `el.hidden` jinak nic neschovalo — tlačítko „Vygenerovat náhled" zůstávalo
   vidět i nad hotovým náhledem. */
[hidden] {
  display: none !important;
}

html {
  font-size: 62.5%;              /* 1rem = 10px */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: var(--font-weight-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

/* --- Typografie ----------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 1.6rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  letter-spacing: var(--heading-letter-spacing);
  color: var(--text-title);
  word-wrap: break-word;
  max-width: 100%;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.6rem; }
h6 { font-size: 1.4rem; }

@media screen and (min-width: 750px) {
  h1 { font-size: 3.6rem; }
  h2 { font-size: 2.8rem; }
}

@media screen and (min-width: 1600px) {
  h1 { font-size: 4rem; }
}

p {
  margin: 0 0 1.6rem;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Sekundární / tlumený text. */
.text-secondary {
  color: var(--text-secondary);
}

/* Obrácený kontrast — POVINNÉ na každé sekci s brand pozadím (schéma
   background-3: bílý text na #9432c1). Bez tohohle by tam prosákl tmavý
   --text z body a byl by nečitelný. Zatím to nic nepoužívá; až přibude
   fialový banner nebo patička, dej mu `.color-inverse`. */
.color-inverse,
.color-inverse h1,
.color-inverse h2,
.color-inverse h3,
.color-inverse h4,
.color-inverse h5,
.color-inverse h6,
.color-inverse a {
  color: var(--text-inverse);
}

.bg-brand {
  background: var(--brand);
}

code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-2);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4rem 0;
}

/* --- Kontejnery ----------------------------------------------------------- */
.page-width {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  width: 100%;
}

@media screen and (min-width: 750px) {
  .page-width {
    padding: 0 var(--page-gutter-lg);
  }
}

.section {
  padding: 4rem 0;
}

/* --- Mřížka --------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
}

.grid--tight {
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

/* --- Layout skeleton ------------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}

/* Tři zóny: logo | tlačítka | košík + jazyk.
   Boční zóny mají `flex: 1 1 0`, tedy stejný základ i poměr růstu — jsou proto
   vždy stejně široké a prostřední zóna sedí uprostřed HLAVIČKY, ne uprostřed
   zbylého místa. `justify-content: space-between` to neuměl: buttony se
   posouvaly podle toho, jak dlouhý je zrovna přepínač jazyka. `min-width: 0`
   je pojistka, aby dlouhý obsah zóny nerozstřelil rozvržení místo zalomení. */
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 1.6rem;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
}

.site-header__start,
.site-header__end {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  gap: 1.6rem;
}

.site-header__end {
  justify-content: flex-end;
}

/* Logotyp z brand booku (SVG). Výška se řídí tady, šířka dopočítá poměr
   353,85 × 95,38 — na 3,2 rem to dá ~119 px, tedy zarovnané s tlačítky
   navigace. Na mobilu o kousek menší, ať zbyde místo na obě tlačítka. */
.site-logo {
  display: block;
  line-height: 0;
}

.site-logo img {
  display: block;
  width: auto;
  height: 2.8rem;
}

@media screen and (min-width: 750px) {
  .site-logo img {
    height: 3.6rem;
  }
}

.site-logo:hover {
  text-decoration: none;
}

/* Hlavní navigace — dvě cesty ke koupi. Prostřední zóna: neroste ani neklesá
   podle sousedů, jen se vycentruje mezi nimi. */
.site-nav {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

/* Na mobil jde navigace na vlastní řádek POD logo (`order` až za obě zóny,
   `flex-basis: 100%` vynutí zalomení). Tlačítka zůstávají viditelná — primární
   akce se neschovává za hamburger, viz TODO v stav-projektu.md. */
@media screen and (max-width: 749px) {
  .site-nav {
    order: 3;
    flex: 1 0 100%;
  }

  .site-header__start,
  .site-header__end {
    flex: 1 1 auto;
  }
}

/* Tlačítka v hlavičce jsou menší než v obsahu — plná výška `.button`
   (1,2/2,4 rem) by hlavičku nafoukla a přebila logo. */
.site-nav .button {
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
  white-space: nowrap;
}

/* Obrysové tlačítko potřebuje v hlavičce viditelný okraj — `.button--secondary`
   má průhledné pozadí a okraj v barvě `--button-bg`, což na bílé hlavičce
   splývá s textem. Tady se drží fialová linka i text. */
.site-nav .button--secondary {
  border-color: var(--brand);
  color: var(--brand);
}

.site-nav .button--secondary:hover,
.site-nav .button--secondary:focus-visible {
  background: var(--brand);
  color: var(--text-inverse);
  opacity: 1;
}

.site-main {
  flex: 1 0 auto;
  padding: 3.2rem 0 6.4rem;
}

/* --- Patička --------------------------------------------------------------
   Tmavá, podle schématu `background-4` z tématu (#282828 / bílý text,
   sekundární #cccccc). Barvy jsou tu literály, ne tokeny: `tokens.css` popisuje
   schéma `background-1` (světlé) a patička je jediné místo, kde web jede na
   tmavém. Zavádět kvůli ní čtyři nové tokeny by tvrdilo, že máme tmavý režim.
   Kontrast #cccccc na #282828 = 9,2:1 (AA i AAA).                            */
.site-footer {
  background: #282828;
  color: #fff;
  padding: 4.8rem 0 2.4rem;
  font-size: 1.4rem;
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
}

.site-footer__grid {
  display: grid;
  gap: 3.2rem;
  grid-template-columns: 1fr;
}

@media screen and (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Nad 990 px má první sloupec (claim) a poslední (newsletter) víc místa než
   dva odkazové uprostřed — jinak by se dlouhý nadpis newsletteru lámal po
   dvou slovech. */
@media screen and (min-width: 990px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.6fr;
  }
}

.site-footer__claim {
  margin: 0 0 0.8rem;
  font-weight: var(--font-weight-bold);
  font-size: 1.6rem;
}

.site-footer__text,
.site-footer__note {
  margin: 0;
  color: #ccc;
  line-height: 1.5;
}

.site-footer__note {
  margin-top: 0.8rem;
  font-size: 1.2rem;
}

.site-footer__heading {
  margin: 0 0 1.2rem;
  color: #fff;
  font-size: 1.5rem;
  font-weight: var(--font-weight-medium);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* --- Newsletter (zatím jen UI, viz base.html) ---------------------------- */
.newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.newsletter__input {
  flex: 1 1 18rem;
  min-width: 0;
}

/* Vypnutá pole musí VYPADAT vypnutě — jinak zákazník klikne a nic se nestane.
   Kurzor a průhlednost říkají „ještě ne" dřív než text pod formulářem. */
.newsletter__input:disabled,
.newsletter__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Spodní lišta -------------------------------------------------------- */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem 2.4rem;
  margin-top: 4rem;
  padding-top: 2.4rem;
  border-top: 1px solid rgb(255 255 255 / 15%);
}

.site-footer__logo {
  width: auto;
  height: 2.8rem;
}

.site-footer__copy {
  margin: 0;
  color: #ccc;
  font-size: 1.3rem;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  font-size: 1.3rem;
}

/* Sociální sítě odsazené doprava — na mobilu se zalomí pod zbytek. */
.site-footer__social {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.site-footer__social a {
  display: block;
  line-height: 0;
}

.site-footer__social svg {
  width: 2rem;
  height: 2rem;
}

/* --- Přepínač domény / jazyka ---------------------------------------------
   Vlastní, jednoduchý. Country sprite z tématu (2,4 MB) ZÁMĚRNĚ neportujeme —
   multi-shop jede přes domény, ne přes Shopify Markets.                     */
.shop-switcher {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.3rem;
}

.shop-switcher__label {
  color: var(--text-secondary);
}

.shop-switcher__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shop-switcher__item a,
.shop-switcher__item span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  line-height: 1.2;
}

.shop-switcher__item a:hover {
  border-color: var(--input-border-hover);
  text-decoration: none;
}

.shop-switcher__item--current span {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: var(--button-label);
  font-weight: var(--font-weight-medium);
}

/* --- Tlačítka ------------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  border: 1px solid var(--button-bg);
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--button-label);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
}

.button:hover {
  opacity: 0.9;
  text-decoration: none;
}

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

.button--tertiary {
  background: var(--tertiary-button-bg);
  border-color: var(--tertiary-button-bg);
  color: var(--text);
}

/* --- Formulářové prvky ---------------------------------------------------- */
.field {
  width: 100%;
  padding: 1.1rem 1.4rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
}

.field:hover,
.field:focus {
  border-color: var(--input-border-hover);
  outline: none;
}

/* --- Badge ---------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

.badge--custom {
  background: var(--badge-custom-bg);
  color: var(--badge-custom-text);
}

.badge--sale {
  background: var(--badge-sale-bg);
  color: var(--badge-sale-text);
}

.badge--sold-out {
  background: var(--badge-sold-out-bg);
  color: var(--badge-sold-out-text);
}

/* --- Tabulky -------------------------------------------------------------- */
.table {
  font-size: 1.4rem;
}

.table th,
.table td {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  text-align: left;
}

.table th {
  background: var(--bg-2);
  font-weight: var(--font-weight-medium);
}

/* --- Přístupnost ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-to-content:not(:focus) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
