html {
  font-size: 16px;
}

* { box-sizing: border-box; }

:root{
  --cream: #f3ead9;
  --cream-2: #ece0cb;
  --paper: #fbf7ee;
  --wine: #8a1f28;
  --wine-2: #5c1119;
  --gold: #c9a24b;
  --gold-deep: #a2802f;
  --ink: #2b1012;
  --ink-soft: #6b5a4d;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

.page-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 2rem;
  color: var(--wine);
  margin: 0 0 1.6rem;
}

a{ color: inherit; text-decoration: none; }

/* ---------- Top utility bar ---------- */
.topbar{
  position: relative;
  background: linear-gradient(90deg, var(--wine-2), var(--wine) 50%, var(--wine-2));
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding: .5rem 1rem;
}

.topbar-admin-link{
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold);
  color: var(--wine-2);
  padding: .25rem .8rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ---------- Header ---------- */
header {
  background: linear-gradient(90deg, var(--wine-2), var(--wine) 55%, var(--wine-2));
  border-bottom: 2px solid var(--gold);
  padding: .8rem 3vw;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  justify-self: start;
  min-width: 0;
  display: flex;
  gap:24px;
  padding-bottom:12px;
}

  .logo img {
    height: 80px;
    max-width: 100%;
    width: auto;
    display: block;
  }

.search {
  width: 100%;
  max-width: 560px;
  justify-self: center;
  position: relative;
}

  .search input {
    width: 100%;
    padding: .8rem 1.2rem .8rem 2.8rem;
    border-radius: 999px;
    border: 1px solid rgba(74,15,24,.25);
    background: var(--paper);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--ink);
  }

    .search input::placeholder {
      color: var(--ink-soft);
    }

    .search input:focus {
      outline: 2px solid var(--gold-deep);
      outline-offset: 1px;
    }

  .search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    stroke: var(--ink-soft);
  }

.search-results {
  position: absolute;
  top: calc(100% + .6rem);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.2);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  overflow: hidden;
  z-index: 500;
  text-align: left;
}
.search-results[hidden] { display: none; }

.search-result {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .7rem 1.1rem;
  font-family: 'Inter', sans-serif;
  border-bottom: 1px solid rgba(74,15,24,.08);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover,
.search-result.is-active { background: var(--cream-2); }

.search-result-type {
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.search-result-name {
  font-size: .95rem;
  color: var(--ink);
}
.search-result-subtitle {
  font-size: .8rem;
  color: var(--ink-soft);
  margin-left: .4rem;
}

.search-empty {
  margin: 0;
  padding: .9rem 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: var(--ink-soft);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  justify-self: end;
  font-family: 'Inter', sans-serif;
}

.logout-form { display: contents; }

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

  .icon-btn svg {
    width: 27px;
    height: 27px;
    stroke: currentColor;
    fill: none;
  }

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--gold);
  color: var(--wine-2);
  font-size: .68rem;
  font-weight: 600;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-container {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
}

.toast {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  background: var(--wine-2);
  color: var(--cream);
  padding: .8rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  max-width: 320px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Order status badge ---------- */
.status-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge.status-nova { background: var(--cream-2); color: var(--ink-soft); }
.status-badge.status-cekanaplatbu { background: #f6e6b8; color: #7a5c07; }
.status-badge.status-zaplacena { background: #dcead9; color: #2e6b2a; }
.status-badge.status-kvyzvednuti { background: #d0ece6; color: #146b5c; }
.status-badge.status-vyzvednuta { background: #d7e4ec; color: #2b5875; }
.status-badge.status-zrusena { background: #f1d6d6; color: var(--wine-2); }
.status-badge.status-vraceno { background: #e8dcf2; color: #5a2d82; }

/* ---------- Age gate ---------- */
body.modal-open{ overflow: hidden; }

.age-gate-overlay{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20,6,8,.72);
  backdrop-filter: blur(2px);
}

.age-gate-modal{
  position: relative;
  width: 100%;
  max-width: 440px;
  background: radial-gradient(ellipse at 30% 20%, var(--wine) 0%, var(--wine-2) 78%);
  color: var(--cream);
  border: 1px solid rgba(201,162,75,.55);
  border-radius: 6px;
  padding: 2.4rem 2.2rem 2rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}

.age-gate-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
}
.age-gate-divider .line{ width: 34px; height: 1px; background: var(--gold); }
.age-gate-divider svg{ width: 26px; height: 26px; color: var(--gold); stroke: currentColor; }

.age-gate-modal h2{
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 .8rem;
  color: var(--cream);
}

.age-gate-modal p{
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  color: rgba(243,234,217,.85);
  margin: 0 0 1.6rem;
  line-height: 1.5;
}

.age-gate-actions{
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.age-gate-btn{
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.age-gate-btn-primary{
  background: var(--gold);
  color: var(--wine-2);
}
.age-gate-btn-primary:hover{ background: #d8b563; }

.age-gate-btn-secondary{
  background: transparent;
  color: rgba(243,234,217,.75);
  border: 1px solid rgba(243,234,217,.35);
}
.age-gate-btn-secondary:hover{ background: rgba(255,255,255,.08); }

/* ---------- Custom potvrzovací dialog (náhrada window.confirm) ----------
   Velké dotykové cíle (min. 52px výška tlačítka) - používá se i na POS s
   dotekovým displejem, viz confirm-dialog.js. */
.confirm-dialog-overlay{
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20,6,8,.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease;
}
.confirm-dialog-overlay.is-visible{
  opacity: 1;
  visibility: visible;
}

.confirm-dialog{
  width: 100%;
  max-width: 420px;
  background: #fff;
  color: var(--ink, #2b1414);
  border-radius: 10px;
  padding: 1.8rem 1.6rem 1.5rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}

.confirm-dialog-message{
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 1.4rem;
}

.confirm-dialog-input{
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  text-align: center;
  padding: .8rem;
  min-height: 52px;
  border: 1px solid rgba(74,15,24,.25);
  border-radius: 8px;
  margin: 0 0 1.4rem;
  box-sizing: border-box;
}

.confirm-dialog-actions{
  display: flex;
  gap: .8rem;
}

.confirm-dialog-btn{
  flex: 1 1 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: .95rem 1rem;
  min-height: 52px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.confirm-dialog-btn-confirm{
  background: var(--wine, #4a0f18);
  color: #fff;
}
.confirm-dialog-btn-confirm:hover{ background: var(--wine-2, #3a0c12); }

.confirm-dialog-btn-cancel{
  background: #f1eee9;
  color: var(--ink, #2b1414);
}
.confirm-dialog-btn-cancel:hover{ background: #e6e2db; }



/* ---------- Main navigation ---------- */
nav.main-nav{
  background: linear-gradient(90deg, var(--wine-2), var(--wine) 55%, var(--wine-2));
  padding: .9rem 3vw;
  display: flex;
  gap: 1.7rem;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 2px solid var(--gold);
}
nav.main-nav a{
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  color: rgba(243,234,217,.78);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a.active{
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}

nav.main-nav a.nav-highlight{
  color: var(--gold);
  font-weight: 700;
  position: relative;
}
nav.main-nav a.nav-highlight::after{
  content: '';
  position: absolute;
  top: -2px;
  right: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Footer ---------- */
footer{
  flex-shrink: 0;
  position: relative;
  background: radial-gradient(ellipse at 70% 0%, var(--wine) 0%, var(--wine-2) 70%);
  color: rgba(243,234,217,.75);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  overflow: hidden;
}
footer::before, footer::after{
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(201,162,75,.55);
  opacity: .8;
}
footer::before{ top: 16px; left: 10px; border-right: none; border-bottom: none; }
footer::after{ bottom: 16px; right: 10px; border-left: none; border-top: none; }

.foot-inner{
  padding: 2.6rem 3vw 1.6rem;
}

.foot-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 0 1.8rem;
}
.foot-divider .line{ width: 40px; height: 1px; background: var(--gold); }
.foot-divider svg{ width: 14px; height: 14px; }
.foot-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
  margin-bottom: 2rem;
}
.foot-grid h4{
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 1rem;
  margin: 0 0 .8rem;
}
.foot-grid p, .foot-grid a{ display:block; margin: 0 0 .45rem; }
.foot-grid > div{ flex: 0 1 auto; min-width: 160px; }

.foot-legal{
  border-top: 1px solid rgba(201,162,75,.25);
  padding-top: 1.2rem;
  text-align: center;
}
.foot-notice{
  margin: 0 0 .5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .03em;
  color: var(--gold);
}
.foot-bottom{
  margin: 0;
  font-size: .76rem;
  color: rgba(243,234,217,.5);
}

@media (max-width: 900px){
  .foot-grid{ justify-content: space-around; row-gap: 1.8rem; }
}

@media (max-width: 560px){
  footer::before, footer::after{ width: 40px; height: 40px; }

  .foot-grid{
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  header {
    grid-template-columns: 1fr auto;
    row-gap: .8rem;
  }

  .logo {
    gap: 10px;
    padding-bottom: 0;
  }

    .logo img {
      height: 44px;
    }

  .search {
    grid-column: 1 / -1;
    order: 3;
    max-width: 100%;
    justify-self: stretch;
  }

  nav.main-nav {
    gap: 1rem;
    padding: .8rem 5vw;
  }
}
/* ---------- Obsluha: přidání do pokladny z katalogu/detailu ---------- */
/* Tlačítko "+ Pokladna" v rohu fotky karty v katalogu (_CatalogContent) a
   potvrzovací hláška (pos-quick-add.js) - vidí jen pokladní/správce. */
.pos-add-btn--card {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--cream);
  background: var(--wine);
  border: 1px solid rgba(201,162,75,.7);
  border-radius: 999px;
  padding: .4rem .85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20,6,8,.25);
  transition: background .15s ease, transform .15s ease;
}
.pos-add-btn--card:hover { background: var(--wine-2); transform: translateY(-1px); }
.pos-add-btn:disabled { opacity: .6; cursor: progress; }

.pos-add-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 3000;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 520px);
  padding: .8rem 1.3rem;
  border-radius: 10px;
  background: #2e6b31;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .98rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.pos-add-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.pos-add-toast.is-error { background: var(--wine); }

/* ---------- Odznáčky ocenění (Views/Shared/_AwardBadges.cshtml) ---------- */
/* Zlatá medaile se stužkou vlevo nahoře na fotce vína (karta v katalogu,
   slider na domovské stránce, detail produktu), víc ocenění pod sebou.
   Rodič (.card-art / .product-art) má position: relative. */
.award-badges {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  pointer-events: none;
}
.award-badge {
  position: relative;
  isolation: isolate;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px;
  text-align: center;
  color: #4a2c05;
  background: radial-gradient(circle at 35% 30%, #fff1c2 0%, #eacb72 38%, #c9a24b 70%, #9c7426 100%);
  border: 2px solid #fff4d1;
  box-shadow: 0 0 0 1px rgba(156,116,38,.6), 0 6px 14px rgba(20,6,8,.35);
  pointer-events: auto;
}
/* Stužky pod medailí. */
.award-badge::before,
.award-badge::after {
  content: '';
  position: absolute;
  z-index: -1;
  bottom: -14px;
  width: 16px;
  height: 26px;
  background: var(--wine);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.award-badge::before { left: 21px; transform: rotate(14deg); }
.award-badge::after { right: 21px; transform: rotate(-14deg); }
.award-badge-star { font-size: .7rem; line-height: 1; color: #8a5a10; }
.award-badge-name {
  font-family: 'Inter', sans-serif;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.award-badge-year {
  font-family: 'Playfair Display', serif;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}
/* Detail produktu - větší fotka, větší medaile. */
.product-art .award-badges { top: 1.6rem; left: 1.6rem; }
.product-art .award-badges .award-badge { width: 96px; height: 96px; }
.product-art .award-badges .award-badge-name { font-size: .7rem; }
.product-art .award-badges .award-badge-year { font-size: .9rem; }
.product-art .award-badges .award-badge::before { left: 24px; }
.product-art .award-badges .award-badge::after { right: 24px; }
/* Stříbrná / bronzová medaile (ProductAwardOption.BadgeModifier). */
.award-badge--silver {
  color: #2f3438;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #dfe3e6 38%, #b4bbc1 70%, #7d868d 100%);
  border-color: #f4f6f7;
  box-shadow: 0 0 0 1px rgba(110,118,125,.6), 0 6px 14px rgba(20,6,8,.35);
}
.award-badge--silver .award-badge-star { color: #5b636a; }
.award-badge--bronze {
  color: #3d200c;
  background: radial-gradient(circle at 35% 30%, #ffe0c2 0%, #e0a46a 38%, #b8743c 70%, #84501f 100%);
  border-color: #ffe9d6;
  box-shadow: 0 0 0 1px rgba(132,80,31,.6), 0 6px 14px rgba(20,6,8,.35);
}
.award-badge--bronze .award-badge-star { color: #6b3a14; }
/* Obrázek oficiální medaile soutěže (ProductAward.ImageUrl) - zdrojové
   obrázky mají 70×70 px, proto se nezvětšují víc, ať nejsou rozmazané. */
/* Vyšší specificita než .card-art img / .product-art > img (width: 100 %),
   jinak by se medaile roztáhla přes celou fotku. */
.award-badges img.award-medal,
.award-card img.award-medal {
  display: block;
  width: 72px;
  height: 72px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(20,6,8,.4));
  pointer-events: auto;
}
.award-badges:has(.award-medal) { gap: .5rem; }
.award-medal--inline { flex-shrink: 0; filter: drop-shadow(0 3px 6px rgba(20,6,8,.25)); }

/* Nalezená ocenění po rozpoznání etikety (wine-label-extract.js, Nový/Upravit produkt). */
.found-awards { margin: .6rem 0 1rem; font-family: 'Inter', sans-serif; }
.found-awards-status, .found-awards-title { margin: 0 0 .5rem; font-size: .95rem; color: var(--ink-soft); }
.found-awards-title { color: var(--ink); font-weight: 600; }
.found-awards-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.found-award {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .7rem;
  background: rgba(201,162,75,.1);
  border: 1px solid rgba(201,162,75,.4);
  border-radius: 8px;
  font-size: .95rem;
}
.found-award label { display: flex; align-items: center; gap: .6rem; flex: 1; cursor: pointer; }
.found-award input[type="checkbox"] { width: 18px; height: 18px; }
.found-award img { width: 36px; height: 36px; object-fit: contain; }
.found-award-noimg { width: 36px; text-align: center; font-size: 1.4rem; }
.found-award a { color: var(--wine); font-size: .85rem; }
