.product-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 3vw, 2.0625rem) 4rem;
}

.back-link {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.back-link:hover { color: var(--wine); }

.product-detail {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 3.5rem;
  align-items: stretch;
}

.product-media {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 1.5rem;
  height: 100%;
}

.product-art {
  position: relative; /* odznáčky ocenění vlevo nahoře (site.css .award-badges) */
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 10px;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-art img { max-width: 80%; max-height: 90%; object-fit: contain; cursor: zoom-in; }
/* Produktové fotky jsou celoplošné snímky na výšku 3:4 (lahev v aranžmá,
   ne vyříznutá na čistém pozadí) - rámeček s fotkou má proto stejný poměr
   a fotka ho vyplní celý až do zaoblených rohů. Bez fotky (placeholder
   ikona lahve) zůstává původní pevná výška. */
.product-art:has(> img) { height: auto; aspect-ratio: 3 / 4; overflow: hidden; }
.product-art > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.product-art svg { height: 280px; }

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.edit-product-btn {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--wine);
  background: none;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 999px;
  padding: .4rem .95rem;
  white-space: nowrap;
}
.edit-product-btn:hover { background: rgba(74,15,24,.06); }
button.edit-product-btn { cursor: pointer; }
/* Tlačítka obsluhy vedle názvu (Přidat do pokladny / Upravit produkt). */
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  flex-shrink: 0;
}

.product-saved-note {
  font-family: 'Inter', sans-serif;
  color: var(--wine);
  font-weight: 600;
  margin: 0 0 1.2rem;
}

.product-hidden-note {
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  color: var(--wine-2);
  background: var(--cream-2);
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  padding: .7rem 1rem;
  margin: 0 0 1.2rem;
  display: inline-block;
}

.product-info .tag {
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 .5rem;
}

.product-info h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--ink);
  margin: 0 0 .3rem;
  line-height: 1.2;
}

.product-info .winery {
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

/* Food-pairing panel (WinePairingIcons) - vlastní karta pod fotkou
   (.product-media), ne namačkané v úzkém info sloupci. Emoji na tmavě
   červeném kruhu - TEST barevné varianty (bez zlatého filtru), viz
   konverzace. Zlatý filter (brightness(0) invert(1) sepia...) šel dřív
   znovu zapnout na .pairing-badge-icon, kdyby se barevná varianta
   nezalíbila. Střed kruhu: emoji glyfy mají různě velký průhledný okraj
   podle fontu (shrimp/pepper/cheese apod. nejsou opticky centrované ve
   vlastním em-boxu) - .pairing-badge-icon je proto samo flex kontejner
   přes celou plochu kruhu, ne jen inline text zarovnaný rodičem. */
.pairing-panel {
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 10px;
  padding: 1.3rem 1.4rem 1.4rem;
  /* .product-media má height:100% (spodek srovnaný s pravým info sloupcem).
     Karta se nenatahuje (flex:1 nechával prázdný pruh uvnitř karty pod
     textem doporučení), ale margin-top:auto ji přisune ke spodku sloupce -
     volné místo zůstane mezi fotkou a kartou. */
  margin-top: auto;
}
.pairing-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 1.2rem 1rem;
  margin: 0 0 1.1rem;
}
.pairing-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  width: 96px;
  text-align: center;
}
.pairing-badge-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--wine) 0%, var(--wine-2) 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 2px 6px rgba(74,15,24,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pairing-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.85rem;
  line-height: 1;
  text-align: center;
}
/* Flex vycentruje jen box glyfu, ne jeho viditelný inkoust - u pizzy má
   font neviditelný okraj asymetricky rozložený (víc vlevo než vpravo), takže
   samotný obrázek plátku vizuálně sedí posunutý doprava. Ruční korekce jen
   pro tenhle konkrétní kód, ne plošně - zbytek sady (viz WinePairingIcons)
   je opticky vystředěný v pořádku. */
.pairing-badge-icon[data-pairing="pizza"] {
  transform: translateX(-2px);
}
.pairing-badge-label {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-soft);
}

.pairing-note {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-2);
  border-radius: 8px;
  padding: .75rem .9rem;
  margin: 0;
}

.wine-scores {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 0 0 1.5rem;
  max-width: 50%;
}
.wine-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
}
.wine-score-label { color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; }
.wine-score-dots { display: flex; gap: .35rem; flex-shrink: 0; }
.wine-score-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cream-2);
  border: 1px solid rgba(74,15,24,.3);
}
.wine-score-dot.is-filled { background: var(--gold); border-color: var(--gold-deep); }

/* Vysvětlivka k odbornějším pojmům (tříslovina, plnost těla...) - běžný
   zákazník netuší, co "tříslovina" znamená. Vlastní CSS tooltip místo
   nativního title="" (moc pomalý/nevzhledný nástup) - drží se na hover I
   focus (klávesnice/dotyk). */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: .4rem;
  border-radius: 50%;
  background: rgba(74,15,24,.14);
  color: var(--wine);
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}
.info-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  max-width: min(300px, 85vw);
  background: var(--ink);
  color: var(--cream);
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  padding: .7rem .85rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  z-index: 8;
  pointer-events: none;
}
.info-tip::before {
  content: '';
  position: absolute;
  bottom: 118%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease;
  z-index: 8;
}
.info-tip:hover::after, .info-tip:hover::before,
.info-tip:focus::after, .info-tip:focus::before,
.info-tip:focus-visible::after, .info-tip:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid rgba(74,15,24,.12);
  margin-bottom: 1.4rem;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(74,15,24,.12);
  font-family: 'Inter', sans-serif;
  font-size: 1.08rem;
}
.spec-row:nth-of-type(odd) { padding-right: 1.5rem; }
.spec-label { color: var(--ink-soft); }
.spec-value { color: var(--ink); font-weight: 500; text-align: right; }

.variant-picker {
  margin-bottom: 1.4rem;
}
.variant-picker-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: .5rem;
}
.variant-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.variant-option {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--wine);
  background: none;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 999px;
  padding: .4rem .95rem;
  white-space: nowrap;
}

.vintage-select {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--wine);
  background: none;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 999px;
  padding: .5rem 2rem .5rem 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a0f18' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 16px;
  cursor: pointer;
}
.variant-option:hover { background: rgba(74,15,24,.06); }
.variant-option-current {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine);
}
.variant-option-unavailable {
  opacity: .55;
}

.stock-purchase-box {
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 10px;
  padding: 1.2rem 1.3rem 1.4rem;
}

.stock-info {
  font-family: 'Inter', sans-serif;
  padding-bottom: 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(74,15,24,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stock-online {
  margin: 0;
  font-size: 1.045rem;
  color: var(--ink);
}
.stock-online strong { color: #3a7d3a; }
.stock-online.stock-out strong,
.stock-online.stock-out { color: var(--ink-soft); }

.stock-detail-btn {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--wine);
  background: none;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 999px;
  padding: .4rem .95rem;
  cursor: pointer;
}
.stock-detail-btn:hover { background: rgba(74,15,24,.06); }

.stock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.stock-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
  color: var(--ink);
}
.stock-qty { color: #3a7d3a; font-weight: 600; white-space: nowrap; }

.stock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20,6,8,.55);
}
.stock-modal-overlay[hidden] { display: none; }

.stock-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid rgba(201,162,75,.55);
  border-radius: 10px;
  padding: 2rem 2.1rem 1.8rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  font-family: 'Inter', sans-serif;
}

.stock-modal h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--wine);
  margin: 0 0 1.3rem;
}

.stock-modal .stock-list {
  gap: .8rem;
}
.stock-modal .stock-list li {
  font-size: 1.15rem;
}

.stock-modal-close {
  position: absolute;
  top: .7rem;
  right: .8rem;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.stock-modal-close:hover { color: var(--wine); }

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.product-foot .price {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.625rem;
  color: var(--wine);
}
.product-foot .price .vol {
  font-weight: 400;
  font-size: .945rem;
  color: var(--ink-soft);
  display: block;
  margin-top: 2px;
}
.product-foot .price .price-old {
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ink-soft);
  text-decoration: line-through;
  margin-right: .5rem;
}
.product-foot .price .price-new {
  color: var(--wine);
}

.product-description-section {
  margin-bottom: 1.6rem;
}
.gold-divider {
  border: none;
  border-top: 1px solid var(--gold);
  margin: 2.6rem 0 1.8rem;
}
.description {
  font-size: 1.375rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

/* Záložky "O víně / O vinařství / Ocenění" pod hlavní fotkou+info (přes celou
   šířku stránky, ne jen v úzkém sloupci - viz Produkt.cshtml a
   detail-tabs.js). Aktivní záložka má červené pozadí a zaoblené horní rohy,
   bez mezery nasedá přímo na box s obsahem pod ní (ten má naopak plochý horní
   okraj bez ohledu na to, která záložka je zrovna aktivní, ať to funguje i
   pro prostřední/poslední záložku, ne jen první). */
.detail-tabs-nav {
  display: flex;
  gap: .4rem;
}
.detail-tab-btn {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink-soft);
  /* Nevybraná záložka - lehce zašedlé pozadí, ať nepůsobí jako volně
     "levitující" text vedle aktivní červené záložky. */
  background: rgba(107,90,77,.12);
  border: none;
  border-radius: 10px 10px 0 0;
  padding: .85rem 1.5rem;
  cursor: pointer;
}
.detail-tab-btn:hover { color: var(--wine); background: rgba(107,90,77,.2); }
.detail-tab-btn.is-active {
  background: var(--wine);
  color: var(--cream);
}

.detail-tab-panel {
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 0 0 10px 10px;
  padding: 1.6rem 1.8rem;
}

.detail-tab-facts {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin: 0;
}
.detail-tab-fact { display: flex; gap: .6rem; }
.detail-tab-fact dt {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-soft);
  min-width: 110px;
}
.detail-tab-fact dd {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  color: var(--ink);
  margin: 0;
}

.detail-tab-heading {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--wine);
  margin: 0 0 .6rem;
}
.detail-tab-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.175rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
  white-space: pre-line;
}
.detail-tab-description { margin-bottom: 1.4rem; }

/* Blok "Složení a výživové údaje" v záložce O víně (Produkt.cshtml) -
   vlevo složení + alergeny (štítky) + odkaz na e-etiketu, vpravo výživová
   tabulka ve stylu etikety potravin. Pod 720px pod sebou. */
.composition {
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(74,15,24,.12);
}
.composition-heading {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--wine);
  margin: 0;
}
.composition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.6rem 3rem;
  align-items: start;
}
.composition-col { display: flex; flex-direction: column; gap: 1.2rem; }
.composition-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .45rem;
}
.composition-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  color: var(--ink);
  margin: 0;
}
.composition-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.composition-chips li {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--wine);
  background: rgba(138,31,40,.07);
  border: 1px solid rgba(138,31,40,.2);
  border-radius: 999px;
  padding: .3rem .85rem;
}
.composition-elabel {
  align-self: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--wine);
  text-decoration: none;
  border-bottom: 1px solid rgba(138,31,40,.35);
  padding-bottom: 1px;
}
.composition-elabel:hover { border-bottom-color: var(--wine); }

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(74,15,24,.15);
  border-radius: 8px;
  overflow: hidden;
}
.nutrition-table caption {
  caption-side: top;
  text-align: left;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: .45rem;
}
.nutrition-table th,
.nutrition-table td {
  padding: .55rem .9rem;
  border-bottom: 1px solid rgba(74,15,24,.08);
  text-align: left;
  font-weight: 400;
}
.nutrition-table td { text-align: right; font-weight: 600; white-space: nowrap; }
.nutrition-table tr:last-child th,
.nutrition-table tr:last-child td { border-bottom: none; }
.nutrition-table tr:first-child { background: rgba(201,162,75,.1); }
.nutrition-table .nutrition-sub th { padding-left: 1.9rem; color: var(--ink-soft); }
.nutrition-table .nutrition-sub td { font-weight: 400; }

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

.detail-tab-awards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.175rem;
  color: var(--ink);
}
/* Karta ocenění v záložce Ocenění - medaile (site.css .award-badge) vlevo,
   název / soutěž / rok vpravo. */
.award-card {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.2rem 1.4rem 1.5rem;
  background: linear-gradient(135deg, rgba(201,162,75,.14), rgba(201,162,75,.04));
  border: 1px solid rgba(201,162,75,.5);
  border-radius: 10px;
}
.award-badge--inline { flex-shrink: 0; pointer-events: none; }
.award-badge--inline .award-badge-star { font-size: 1.3rem; }
.award-badge--inline .award-badge-year { font-size: .95rem; }
.award-card-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.award-card-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--wine);
  line-height: 1.2;
}
.award-card-competition { font-size: 1.1rem; color: var(--ink); }
.award-card-year { font-size: .95rem; color: var(--ink-soft); }

.detail-tab-empty {
  font-family: 'Inter', sans-serif;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-media { position: static; }
  .product-art { height: 320px; }
  /* Na mobilu přes celou šířku by 3:4 fotka zabrala skoro celou obrazovku -
     omezit šířku a vycentrovat. */
  .product-art:has(> img) { width: 100%; max-width: 420px; align-self: center; }

  /* minmax(0,1fr): jednotka 1fr má min. šířku podle obsahu, dlouhé hodnoty by
     sloupec roztáhly za okraj displeje. */
  .product-detail { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .product-title-row { flex-wrap: wrap; }
  .product-info h1 { font-size: 1.9rem; }

  /* Parametry pod sebou (ve dvou sloupcích se hodnoty lámaly po slovech). */
  .spec-grid { grid-template-columns: 1fr; }
  .spec-row { font-size: 1rem; }
  .spec-row:nth-of-type(odd) { padding-right: 0; }
  .wine-scores { max-width: none; }

  /* Bublina vysvětlivky (300 px, i skrytá zvětšovala scrollovatelnou šířku
     stránky = vodorovné ujíždění). Na mobilu se kotví k celému řádku. */
  .spec-row, .wine-score-row { position: relative; }
  .info-tip { position: static; }
  .info-tip::after {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    transform: none;
    bottom: calc(100% + 6px);
  }
  .info-tip::before { display: none; }

  .detail-tab-btn { padding: .8rem 1.1rem; font-size: 1rem; }
  .detail-tab-panel { padding: 1.3rem 1.2rem; }
  .detail-tab-fact dt { min-width: 90px; }
  .product-foot { flex-wrap: wrap; }
}

/* ---------- Image lightbox ---------- */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20,6,8,.85);
}
.image-lightbox-overlay[hidden] { display: none; }

.image-lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

.image-lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--cream);
  cursor: pointer;
}
.image-lightbox-close:hover { color: var(--gold); }

/* ---------- Product edit form ---------- */
/* Full-width stránka s kartami v responzivní mřížce - dřív to byl jeden úzký
   sloupec (max-width 760px) a s přibývajícími poli (food-pairing profil,
   výživové údaje...) se z toho stal nekonečný scroll. .edit-grid rozloží
   karty do 1-3 sloupců podle šířky okna; .edit-section--wide vynutí kartě
   celou šířku řádku (obsáhlejší sekce jako Základní údaje/Etiketa/Párování). */
.product-edit-page {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 3vw, 2.4rem) 4rem;
}

.product-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* auto-fit + minmax(…,1fr) natahuje KAŽDOU kartu na plnou šířku sloupce -
   u malé karty (Obrázek, Cena a viditelnost, Akce...) to na širokém monitoru
   vypadalo groteskně (pár polí roztažených přes 800px). auto-fill s pevným
   horním limitem (minmax(360px, 460px)) + justify-content:start místo toho
   nechá kartám jejich přirozenou šířku a nevyužitý zbytek řádku zůstane
   prázdný - .edit-section--wide karty pořád span celou šířku beze změny. */
.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 460px));
  justify-content: start;
  gap: 1.6rem;
  align-items: start;
}
.edit-section--wide { grid-column: 1 / -1; }

.edit-section {
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
}
.edit-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--wine);
  margin: 0 0 1.1rem;
}

.edit-image-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
/* Varianta v "Základní údaje" (Upravit.cshtml) - obrázek sloučený s
   Název/Podtitul/nahrání souboru, ať formulář nezačíná osamocenou malou
   kartičkou "Obrázek" nahoře. Pole jsou vyšší než náhled, proto
   align-items:flex-start místo :center z obyčejné .edit-image-row. */
.edit-image-row--intro {
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.edit-image-fields {
  flex: 1;
  min-width: 0;
}
.edit-image-fields .form-group:last-child { margin-bottom: 0; }
.edit-image-preview {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background: var(--cream);
  border: 1px solid rgba(74,15,24,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  color: var(--ink-soft);
  text-align: center;
}
.edit-image-preview img { width: 100%; height: 100%; object-fit: contain; }

.edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.edit-row-3 { grid-template-columns: repeat(3, 1fr); }
.edit-row-4 { grid-template-columns: repeat(4, 1fr); }
.edit-row-5 { grid-template-columns: repeat(5, 1fr); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1.1rem;
  font-family: 'Inter', sans-serif;
}
/* Bez tohohle by "display: flex" výš přebilo standardní [hidden] chování
   (stejný gotcha jako .pos-scan-dialog[hidden] v Pos.css) - potřeba pro
   skrývání pole "Vinařství / původ" checkboxem "Dodavatel je stejný jako
   vinařství" (Naskladneni/Index.cshtml, Produkt/Novy.cshtml). */
.form-group[hidden] { display: none; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
}
/* Dotykové ovládání na pokladně/tabletu bez klávesnice - pole musí mít
   pohodlně velkou plochu na ťuknutí (Apple/Google doporučují min. ~44px
   výšky), ne jen kompaktní desktopový vzhled. */
.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 1.08rem;
  padding: .9rem 1rem;
  min-height: 52px;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.form-group input[type="file"] {
  padding: .4rem 0;
  min-height: 0;
  border: none;
  background: none;
}
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  min-height: 0;
  width: auto;
}

/* Vyhledávací combobox se vzhledem selectu (Produkt/Novy - Kategorie/Sklad/
   Typ balení, viz combo-select.js) - nativní <datalist> nešlo vzhledově
   sjednotit se stránkou (prohlížeč vykresluje vlastní nepřestylovatelnou
   nabídku), tohle je vlastní varianta nad obyčejným textovým polem. */
.combo-wrap { position: relative; }
.form-group input.combo-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='rgb(74,15,24)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 14px 14px;
  padding-right: 3.4rem;
  width: 100%;
}
/* Křížek pro rychlé smazání hodnoty (combo-select.js addClearButton) - mezi
   textem a šipkou selectu, ať se nepřekrývají. */
.combo-clear {
  position: absolute;
  top: 50%;
  right: 1.9rem;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  line-height: 1;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}
.combo-clear:hover { color: rgb(74,15,24); }
.combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: .3rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(43,16,18,.18);
  max-height: 220px;
  overflow-y: auto;
}
.combo-menu li {
  padding: .55rem .7rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: var(--ink);
}
.combo-menu li:hover,
.combo-menu li.is-active {
  background: rgb(74,15,24);
  color: var(--cream);
}
.combo-menu li.combo-empty {
  cursor: default;
  color: var(--ink-soft);
  font-size: .85rem;
}
.combo-menu li.combo-empty:hover { background: none; color: var(--ink-soft); }

.field-error {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  color: var(--wine);
  margin-top: .2rem;
}

/* Karty žijí mimo <form> úpravy produktu (vlastní přidat/smazat akce), ve
   vlastním .edit-grid pod formulářem - mezera mezi kartami řeší grid gap,
   tenhle blok jen odsazuje CELÝ řádek karet od tlačítka "Uložit produkt". */
.product-edit-form + .edit-grid, .edit-grid + .edit-grid, .edit-grid + .product-merge-section { margin-top: 1.6rem; }
.product-ean-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.product-ean-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem .9rem;
  background: var(--cream);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
}
.product-ean-add-form {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}
.product-ean-add-form input {
  flex: 1 1 220px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}

.product-award-add-form {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}
.product-award-add-form input {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.product-award-add-form input[name="name"] { flex: 2 1 200px; }
.product-award-add-form input[name="competition"] { flex: 2 1 180px; }
.product-award-add-form input[name="year"] { flex: 0 1 90px; }

.product-stacene-qr {
  display: block;
  width: 220px;
  height: 220px;
  padding: 1rem;
  margin-bottom: .8rem;
  background: #fff;
  border: 1px solid rgba(74,15,24,.15);
  border-radius: 8px;
}

/* Sloučení duplicitních produktů (Upravit.cshtml) - sekce žije mimo <form>
   stejně jako product-ean-section, ze stejného důvodu. */
.product-merge-section { margin-top: 1.6rem; }
.product-merge-form {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.product-merge-form input,
.product-merge-form select {
  flex: 1 1 260px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.product-merge-form select:disabled { color: var(--ink-soft); }
.form-error-summary ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: var(--wine);
}
.form-error-summary.validation-summary-valid { display: none; }

.admin-hint {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  color: var(--ink-soft);
  margin: .3rem 0 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: .3rem 0;
}
.toggle-row input { width: 26px; height: 26px; flex-shrink: 0; }
/* "display: flex" výš by jinak přebilo atribut hidden (stejně jako
   u .form-group[hidden]) - potřeba pro skrytí checkboxu "Dodavatel je
   stejný jako vinařství" u kategorií bez evidence původu (Novy.cshtml). */
.toggle-row[hidden] { display: none; }

.pairing-tags-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.1rem;
}
.pairing-tag-checkbox {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  padding: .25rem 0;
}
.pairing-tag-checkbox input { width: 22px; height: 22px; flex-shrink: 0; }

.edit-row-scores { grid-template-columns: repeat(4, 1fr); }

.btn-primary {
  align-self: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--wine);
  color: var(--cream);
  border-radius: 999px;
  padding: 1rem 2rem;
  min-height: 52px;
  border: none;
  cursor: pointer;
}

.eshop-details {
  background: var(--paper);
  border: 1px dashed rgba(74,15,24,.3);
  border-radius: 10px;
  padding: 0 1.2rem;
}
.eshop-details[open] { padding-bottom: 1.2rem; }
.eshop-details summary {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--wine);
  cursor: pointer;
  padding: 1rem 0;
  list-style: none;
}
.eshop-details summary::-webkit-details-marker { display: none; }
.eshop-details summary::before { content: '+ '; }
.eshop-details[open] summary::before { content: '− '; }
.eshop-details .toggle-row {
  margin-top: .5rem;
}

@media (max-width: 900px) {
  .edit-row-3, .edit-row-4, .edit-row-5 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .edit-row { grid-template-columns: 1fr; }
  .edit-image-row { flex-direction: column; align-items: flex-start; }
}
