/* Detail vína.
   Vína nemají v datech popisný text a nikdy ho neměla. Layout proto stojí
   na fotce, vlastnostech, ceně a oceněních — popisy se nevymýšlí.
   Předloha: sekce `detail` v prototyp/v22/vino.html. Převzato z v2. */

.detail { padding: 4rem 2rem 6rem; }
.detail__obal { max-width: var(--sirka-obalu, 78rem); margin: 0 auto; }
.detail__drobky { font-size: 0.875rem; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 3rem; }
.detail__drobky a { color: inherit; text-decoration: none; }
.detail__drobky a:hover, .detail__drobky a:focus-visible { text-decoration: underline; }
/* Mezera se zužuje s oknem, aby dva sloupce vydržely co nejdéle. Na úzkém
   okně je rychlý výběr snazší, když je fotka i nákupní blok vidět najednou. */
.detail__mrizka { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }

.detail__foto {
  background: var(--bg-karta, hsl(0 0% 100%));
  border-radius: 20px;
  padding: clamp(1rem, 3.5vw, 3rem);
  max-width: min(28rem, 100%);
  margin: 0 auto;
  box-shadow: var(--stin-mekky, 0 16px 40px hsl(334 20% 30% / 0.08));
  position: sticky;
  top: 2rem;
}
.detail__foto > img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }

/* Doplněk se fotí na čtverec, víno na výšku. Jediný rozdíl mezi oběma detaily
   je proto poměr stran fotky — zbytek stránky je společný. */
.detail__foto--ctverec > img { aspect-ratio: 1; }

/* Odznak oceněného vína přes roh karty s fotkou, stejně jako na starém webu. */
.detail__medaile-odznak {
  position: absolute; top: 6%; right: 6%;
  /* Velikost i odsazení v procentech karty — odznak pak drží stejný poměr
     k fotce na všech šířkách, protože fotka se zužuje plynule. */
  display: block; width: clamp(3.25rem, 21%, 5.5rem); line-height: 0;
  filter: drop-shadow(0 3px 8px hsl(334 25% 25% / 0.3));
  pointer-events: none;
}
.detail__medaile-odznak img { display: block; width: 100%; height: auto; }

.detail__nadpis {
  font-family: var(--font-nadpis, Newsreader, Georgia, serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}
.detail__pod { font-size: 1.0625rem; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 3rem; }

/* Vlastnosti bez rámečku — jen jemné oddělovače mezi řádky. */
.detail__vlastnosti { margin: 0 0 3rem; display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); }
.detail__klic { font-size: 0.9375rem; color: var(--fg-muted, hsl(334 12% 42%)); padding: 0.875rem 0; border-top: 1px solid var(--c-linka, hsl(334 12% 89%)); }
.detail__hodnota { font-size: 0.9375rem; font-weight: 500; margin: 0; padding: 0.875rem 0; border-top: 1px solid var(--c-linka, hsl(334 12% 89%)); }

/* Ocenění se vypisují doslova z dat, bez přeformulování — jsou to skutečné
   medaile ze skutečných soutěží. */
.detail__titulek { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 1.5rem; }
.detail__medaile { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 1rem; }
.detail__radek { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.detail__kov {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.375rem 0;
  border-radius: var(--r-pilulka, 999px);
  border: 1px solid var(--c-zlata, hsl(40 55% 52%));
  color: var(--c-bordo, hsl(334 45% 26%));
  background: hsl(40 55% 96%);
}
.detail__kov--platina { border-color: hsl(210 10% 65%); background: hsl(210 15% 96%); }
.detail__kov--stribrna { border-color: hsl(334 10% 70%); background: hsl(334 10% 96%); }
.detail__kov--bronzova { border-color: hsl(24 40% 58%); background: hsl(24 40% 96%); }
.detail__titul { font-size: 0.9375rem; line-height: 1.5; margin: 0; }
.detail__bez { font-size: 0.9375rem; line-height: 1.6; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 3rem; }
.detail__bez a { color: var(--c-bordo, hsl(334 45% 26%)); }

/* Popis doplňku přichází z editoru v administraci, takže se stylují holé
   tagy — obsluha do něj píše odstavce a seznamy, ne třídy. */
.detail__popis { font-size: 0.9375rem; line-height: 1.7; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 3rem; }
.detail__popis p { margin: 0 0 0.75rem; }
.detail__popis p:last-child { margin-bottom: 0; }
.detail__popis strong { color: var(--fg-normal, hsl(334 40% 22%)); font-weight: 500; }
.detail__popis ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.detail__popis a { color: var(--c-akce, hsl(345 62% 36%)); }

/* Nákupní blok — jediná bílá karta v pravém sloupci. */
.detail__koupit {
  background: var(--bg-karta, hsl(0 0% 100%));
  border-radius: var(--r-karta, 16px);
  padding: 2rem;
  box-shadow: var(--stin-karta, 0 2px 8px hsl(334 20% 30% / 0.05));
}
.detail__cena { font-family: var(--font-nadpis, Newsreader, Georgia, serif); font-size: 2.5rem; font-weight: 500; line-height: 1; margin: 0 0 0.25rem; font-variant-numeric: tabular-nums; }
.detail__cenapozn { font-size: 0.8125rem; color: var(--fg-muted, hsl(334 12% 42%)); margin: 0 0 2rem; }

.detail__akce { display: grid; }
.detail__pridat { font: inherit; font-size: 0.9375rem; font-weight: 500; height: var(--v-ovladani, 2.75rem); padding: 0 0.75rem; border: none; border-radius: var(--r-ovladani, 10px); cursor: pointer; background: var(--c-akce, hsl(345 62% 36%)); color: hsl(36 40% 97%); transition: background-color 0.15s ease; }
.detail__pridat:hover, .detail__pridat:focus-visible { background: var(--c-akce-tmava, hsl(345 62% 30%)); }
.detail__pocitadlo { display: flex; align-items: center; height: var(--v-ovladani, 2.75rem); border-radius: var(--r-ovladani, 10px); background: hsl(340 24% 93%); }
.detail__krok { font: inherit; font-size: 1.0625rem; line-height: 1; width: var(--s-krok, 2.5rem); height: var(--v-ovladani, 2.75rem); border: none; background: none; color: var(--c-bordo, hsl(334 45% 26%)); cursor: pointer; border-radius: var(--r-ovladani, 10px); transition: background-color 0.15s ease; }
.detail__krok:hover, .detail__krok:focus-visible { background: hsl(340 30% 87%); }
.detail__ks { font: inherit; font-size: 0.9375rem; font-weight: 500; flex: 1; min-width: 0; width: 100%; text-align: center; border: none; background: none; color: var(--c-bordo, hsl(334 45% 26%)); font-variant-numeric: tabular-nums; padding: 0; }
.detail__jednotka { font-size: 0.6875rem; color: var(--fg-muted, hsl(334 12% 42%)); padding-right: 0.75rem; }
.detail__davky { display: flex; gap: 0.3125rem; margin-top: 0.5rem; }
.detail__davka { flex: 1; font: inherit; font-size: 0.75rem; padding: 0.375rem 0; border: 1px solid var(--c-linka, hsl(334 12% 89%)); border-radius: var(--r-drobny, 8px); background: none; color: var(--fg-muted, hsl(334 12% 42%)); cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease; }
.detail__davka:hover, .detail__davka:focus-visible { border-color: var(--c-obrys, hsl(334 22% 70%)); color: var(--c-bordo, hsl(334 45% 26%)); background: hsl(36 40% 97%); }

.detail__soucet { font-size: 0.9375rem; line-height: 1.6; color: var(--fg-muted, hsl(334 12% 42%)); margin: 1.5rem 0 0; }
.detail__soucet b { color: var(--fg-normal, hsl(334 40% 22%)); font-weight: 500; }
.detail__pozn { font-size: 0.875rem; line-height: 1.6; color: var(--fg-muted, hsl(334 12% 42%)); margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--c-linka, hsl(334 12% 89%)); }
.detail__pozn a { color: var(--c-akce, hsl(345 62% 36%)); }
.detail__lhuty { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0 0; padding: 0; font-size: 0.8125rem; color: var(--fg-muted, hsl(334 12% 42%)); }

/* Lepivá fotka dává smysl jen tam, kde vedle ní je co rolovat. */
@media (max-width: 1000px) {
  .detail__foto { position: relative; top: auto; }
}

@media (max-width: 900px) {
  .detail { padding: 2rem 1.5rem 3rem; }
  .detail__drobky { margin-bottom: 2rem; }
  .detail__koupit { padding: 1.25rem; }
  .detail__vlastnosti { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); }
  .detail__nadpis { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
  .detail__pod { margin-bottom: 2rem; }
  .detail__medaile { margin-bottom: 2rem; }
}

/* Teprve tady se dva sloupce rozpadnou. Do téhle šířky se vedle sebe vejde
   fotka i nákupní blok; níž už by byl nákupní blok užší než jeho počítadlo. */
@media (max-width: 660px) {
  .detail__mrizka { grid-template-columns: 1fr; gap: 2rem; }
  .detail__foto { max-width: 18rem; }
}

@media (max-width: 600px) {
  .detail { padding: 1.5rem 1rem 2.5rem; }
  .detail__drobky { margin-bottom: 1.5rem; }
  .detail__koupit { padding: 1rem; }
}

@media (max-width: 420px) {
  .detail__vlastnosti { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); }
}

/* „Dopočítat k vínům" u detailu doplňku — stejně jako na kartě ve výpisu. */
.detail__dopocet { display: block; width: 100%; font: inherit; font-size: 0.8125rem; background: none; border: none; padding: 0; margin-top: 0.75rem; color: var(--fg-muted, hsl(334 12% 42%)); cursor: pointer; text-align: center; text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s ease; }
.detail__dopocet:hover, .detail__dopocet:focus-visible { color: var(--c-bordo, hsl(334 45% 26%)); }
.detail__dopocet:disabled { opacity: 0.5; cursor: wait; }
.detail__dopocethlaska { font-size: 0.8125rem; color: var(--c-bordo, hsl(334 45% 26%)); text-align: center; margin: 0.5rem 0 0; }
.detail__dopocethlaska:empty { display: none; }
