/* Kampaň "Svatomartinská a mladá vína": odpočet (.mc), banner na úvodní
   stránce (.ml-hero) a landing page /Svatomartinske (.ml). Markup viz
   Views/Shared/_MartinCountdown, _MartinBanner, Views/Svatomartinske;
   chování (odpočet, přepnutí do stavu "jsou tu") obstarává js/Martin.js. */

/* =====================================================================
   Odpočet
   ===================================================================== */
.mc {
  --mc-gold-soft: #e2c983;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Plná šířka, ať se dlaždice na mobilu rozdělí rovnoměrně přes celý řádek
   (jinak se rodič smrskne na obsah a popisky přetékají). */
.mc-before { width: 100%; }
.mc-tiles {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .5rem;
}

.mc-tile {
  position: relative;
  overflow: hidden;
  width: 5.4rem;
  padding: .6rem .6rem .65rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 46%),
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.42));
  border: 1px solid rgba(201,162,75,.6);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.1);
}
/* Zlatý lesk, který dlaždice občas přejede. */
.mc-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(226,201,131,.22) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: mc-sheen 6s ease-in-out infinite;
  pointer-events: none;
}
.mc-tile:nth-child(3)::before { animation-delay: .25s; }
.mc-tile:nth-child(5)::before { animation-delay: .5s; }
.mc-tile:nth-child(7)::before { animation-delay: .75s; }
@keyframes mc-sheen {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

.mc-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5.2vw, 3.8rem);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  color: var(--mc-gold-soft);
  text-shadow: 0 2px 14px rgba(201,162,75,.35);
}
.mc-num.is-flip { animation: mc-flip .45s cubic-bezier(.2,.8,.25,1); }
@keyframes mc-flip {
  0%   { transform: translateY(-38%) scaleY(.7); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(0) scaleY(1); opacity: 1; }
}

.mc-label {
  display: block;
  margin-top: .75rem;
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-indent: .24em; /* vyrovná mezeru za posledním písmenem, ať je popisek opravdu na střed */
  white-space: nowrap;
  color: rgba(243,234,217,.7);
}

.mc-sep {
  /* Svisle na střed číslic (spodní padding = výška popisku pod číslem). */
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-bottom: 1.8rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--gold);
  opacity: .8;
  animation: mc-blink 1s steps(2, jump-none) infinite;
}
@keyframes mc-blink { 0% { opacity: .9; } 100% { opacity: .25; } }

/* Posledních 10 minut: sekundy pulzují. */
.mc.is-final .mc-tile[data-unit="seconds"] { border-color: var(--gold); animation: mc-pulse 1s ease-in-out infinite; }
@keyframes mc-pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(0,0,0,.32), 0 0 0 0 rgba(201,162,75,.0); }
  50%      { box-shadow: 0 10px 26px rgba(0,0,0,.32), 0 0 22px 3px rgba(201,162,75,.45); }
}

/* Stav "jsou tu" */
.mc-after { display: none; text-align: center; }
.mc.is-live .mc-before { display: none; }
.mc.is-live .mc-after { display: block; animation: mc-rise .8s cubic-bezier(.2,.8,.25,1) both; }
.mc-live-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--mc-gold-soft);
  text-shadow: 0 2px 18px rgba(201,162,75,.4);
}
.mc-live-sub {
  margin: .4rem 0 0;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(243,234,217,.78);
}
@keyframes mc-rise {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Konfety při přepnutí (vyrábí je Martin.js). */
.mc-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.mc-confetti i {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0;
  animation: mc-confetti 1.9s cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes mc-confetti {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* Texty podle stavu (před startem / po startu) - kořen dostane .is-live z Martin.js. */
.mb-when-after { display: none; }
.is-live .mb-when-before { display: none; }
.is-live .mb-when-after { display: inline; }

/* =====================================================================
   Landing page /Svatomartinske
   ===================================================================== */
.ml {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 3vw, 2.625rem) 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.4rem;
}

.ml-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 4rem 2rem 3.4rem;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(226,201,131,.30), transparent 55%),
    radial-gradient(ellipse at 10% 100%, rgba(138,31,40,.6), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(138,31,40,.5), transparent 50%),
    linear-gradient(180deg, #2b0a10, var(--wine-2));
  border: 1px solid rgba(201,162,75,.65);
  border-radius: 6px;
}
.ml-hero .bc-corner { position: absolute; width: 30px; height: 30px; border: 0 solid var(--gold); opacity: .85; }
.ml-hero .bc-corner-tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.ml-hero .bc-corner-tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.ml-hero .bc-corner-bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.ml-hero .bc-corner-br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

/* Plovoucí zlaté jiskřičky (jako bublinky ve víně). */
.ml-bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ml-bubbles i {
  position: absolute;
  bottom: -20px;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,246,214,.9), rgba(226,201,131,.35));
  opacity: 0;
  animation: ml-rise var(--d) linear var(--delay) infinite;
}
@keyframes ml-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .7; }
  100% { transform: translateY(-34rem) translateX(var(--x)); opacity: 0; }
}

.ml-eyebrow {
  position: relative;
  margin: 0 0 1rem;
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.ml-hero h1, .ml-hero h2 {
  position: relative;
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.05;
  color: var(--cream);
}
.ml-hero h1 em, .ml-hero h2 em { display: block; font-style: italic; color: #e2c983; }
.ml-hero .gold-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 1.2rem 0 1.3rem;
  color: var(--gold);
}
.ml-hero .gold-divider .line { width: 34px; height: 1px; background: var(--gold); }
.ml-hero .gold-divider svg { width: 13px; height: 13px; }
.ml-lede {
  position: relative;
  margin: 0 auto 2.2rem;
  max-width: 46ch;
  font-size: 1.35rem;
  line-height: 1.6;
  color: rgba(243,234,217,.86);
}
.ml-hero .mc { position: relative; }
.ml-hero .mc-num { font-size: clamp(2.6rem, 7vw, 5rem); }
.ml-hero .mc-tile { width: clamp(4.4rem, 11vw, 7.6rem); padding: .85rem .8rem .8rem; }
.ml-hero .mc-label { font-size: .8rem; }
.ml-actions { position: relative; display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; }
.ml-hero .mc-label { font-size: .8rem; }

/* Dvousloupcová "o víně" sekce - stejný jazyk jako na /Burcak. */
.ml-about {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 2.2rem;
  background: var(--paper);
  border: 1px solid rgba(74,15,24,.12);
  border-radius: 10px;
  padding: 2.4rem 2.6rem;
}
.ml-about h2 {
  margin: 0 0 .7rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--wine);
}
.ml-about p { margin: 0; font-size: 1.22rem; line-height: 1.65; color: var(--ink); }
.ml-about-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(74,15,24,.25) 15%, rgba(74,15,24,.25) 85%, transparent);
}

/* Nabídka vín */
.ml-wines-head { text-align: center; margin-bottom: 1.8rem; }
.ml-kicker {
  margin: 0 0 .5rem;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.ml-wines-head h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--wine);
}
.ml-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  max-width: 1100px;
  margin: 0 auto;
  gap: 1.8rem;
}
/* Na šířku: všechna vína sekce v jednom řádku, karty širší (cca 330 px). */
@media (min-width: 1000px) {
  .ml-grid {
    grid-template-columns: repeat(var(--ml-cols, 4), minmax(0, 1fr));
    max-width: min(100%, calc(var(--ml-cols, 4) * 340px + (var(--ml-cols, 4) - 1) * 1.8rem));
  }
}
.ml-grid .card { cursor: pointer; }

/* Podsekce nabídky: svatomartinská / mladá / na čepu. */
.ml-subhead {
  margin: 2.6rem 0 1.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  color: var(--wine);
  text-align: center;
}
.ml-subhead:first-child { margin-top: 0; }
.ml-subnote {
  margin: -.6rem 0 1.4rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  color: var(--ink-soft);
}
/* Sdílená karta stáčeného (.stacene-page je jen kotva pro StaceneNabidka.js). */
.ml-stacene { padding: 0; max-width: none; gap: 0; }
.ml-stacene .stacene-wine-grid {
  /* Pevná šířka sloupce, ať jsou všechny karty stejně široké bez ohledu na počet v řádku. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 360px));
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* Červený banner se stáčeným nad lahvovými víny. */
.ml-tap-banner {
  margin: 0 0 2.8rem;
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 3vw, 2.4rem);
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background: radial-gradient(ellipse at top, #8e1f33 0%, var(--wine, #6b1426) 60%, #4a0d19 100%);
  border: 1px solid var(--gold, #c9a24b);
  box-shadow: 0 10px 30px rgba(74, 13, 25, .28), inset 0 0 0 5px rgba(201, 162, 75, .18);
}
.ml-tap-kicker {
  margin: 0 0 .5rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold, #c9a24b);
}
.ml-tap-banner > h3 {
  margin: 0 0 1.6rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #fff;
}
.ml-tap-note {
  margin: 0 0 1.6rem;
  font-family: 'Inter', sans-serif;
  color: rgba(255, 255, 255, .85);
}
.ml-tap-banner .stacene-wine-card { text-align: left; }

/* Zamčená nabídka před startem. */
.ml-locked {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 3.4rem 1.6rem;
  background: var(--paper);
  border: 1px dashed rgba(162,128,47,.7);
  border-radius: 10px;
}
.ml-locked-lock {
  display: inline-flex;
  width: 3.6rem; height: 3.6rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.ml-locked-lock svg { width: 1.6rem; height: 1.6rem; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ml-locked h3 {
  margin: 0 0 .5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--wine);
}
.ml-locked p { margin: 0 auto; max-width: 48ch; font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft); }
.ml-locked-ghosts { display: flex; justify-content: center; gap: 1.4rem; margin: 1.6rem 0 0; }
.ml-locked-ghosts svg { width: 2.4rem; color: var(--wine); opacity: .16; animation: ml-ghost 3.2s ease-in-out infinite; }
.ml-locked-ghosts svg:nth-child(2) { animation-delay: .4s; }
.ml-locked-ghosts svg:nth-child(3) { animation-delay: .8s; }
.ml-locked-ghosts svg:nth-child(4) { animation-delay: 1.2s; }
@keyframes ml-ghost { 0%, 100% { opacity: .12; } 50% { opacity: .3; } }
.ml-empty { text-align: center; font-size: 1.2rem; color: var(--ink-soft); margin: 0; }
.ml-more { display: flex; justify-content: center; margin-top: 1.8rem; }

/* K čemu se hodí */
.ml-pairing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
.ml-pair {
  padding: 1.8rem 1.6rem;
  text-align: center;
  color: var(--cream);
  background: radial-gradient(ellipse at 30% 20%, var(--wine) 0%, var(--wine-2) 80%);
  border: 1px solid rgba(201,162,75,.55);
  border-radius: 6px;
}
.ml-pair svg { width: 2.4rem; height: 2.4rem; stroke: var(--gold); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .6rem; }
.ml-pair h3 { margin: 0 0 .5rem; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.5rem; color: #e2c983; }
.ml-pair p { margin: 0; font-size: 1.12rem; line-height: 1.6; color: rgba(243,234,217,.85); }

/* Prodejna */
.ml-store {
  display: grid;
  grid-template-columns: 1.2fr auto 1fr;
  align-items: stretch;
  min-height: 320px;
  background: radial-gradient(ellipse at 25% 35%, var(--wine) 0%, var(--wine-2) 78%);
  border: 3px solid var(--gold);
  border-radius: 4px;
  overflow: hidden;
}
.ml-store-photo img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.ml-store-divider { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 2rem 0; color: var(--gold); }
.ml-store-divider .line { width: 1px; flex: 1; background: var(--gold); opacity: .6; }
.ml-store-divider svg { width: 13px; height: 13px; flex-shrink: 0; }
.ml-store-info { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; padding: 2.2rem 2rem; }
.ml-store-info h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.8rem; color: var(--gold); }
.ml-store-info p { margin: 0; font-size: 1.15rem; line-height: 1.55; color: rgba(243,234,217,.9); }

/* =====================================================================
   Responzivita + omezení pohybu
   ===================================================================== */
@media (max-width: 900px) {

  .ml-about { grid-template-columns: 1fr; gap: 1.8rem; padding: 2rem 1.5rem; }
  .ml-about-divider { display: none; }
  .ml-pairing { grid-template-columns: 1fr; }
  .ml-store { grid-template-columns: 1fr; }
  .ml-store-photo img { min-height: 220px; }
  .ml-store-divider { flex-direction: row; padding: 1.2rem 0; }
  .ml-store-divider .line { width: auto; height: 1px; }
}

@media (max-width: 520px) {
  .mc-tiles { gap: .25rem; width: 100%; }
  .mc-tile { width: auto; min-width: 0; flex: 1 1 0; padding: .7rem .2rem .5rem; }
  .mc-sep { display: none; }
  .mc-num { font-size: 2.1rem; }
  .ml-hero .mc-tile { width: auto; min-width: 0; padding: .6rem .1rem .55rem; }
  .ml-hero .mc-num { font-size: 2.1rem; }
  .ml-hero .mc { width: 100%; }
  .mc-label, .ml-hero .mc-label { font-size: .62rem; letter-spacing: .06em; text-indent: .06em; white-space: nowrap; }
  .ml-hero { padding: 3rem 1rem 2.6rem; }
  .ml-eyebrow { font-size: .78rem; letter-spacing: .14em; }
  .ml-actions .domov-btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-tile::before, .mc-sep, .ml-bubbles i, .ml-locked-ghosts svg,
  .mc.is-final .mc-tile[data-unit="seconds"] { animation: none !important; }
  .mc-num.is-flip { animation: none; }
  .mc-confetti { display: none; }
}
/* Texty na kartách stáčeného v banneru o cca 2 px větší než na /StacenaVina (jen desktop). */
@media (min-width: 481px) {
  .ml-tap-banner .stacene-wine-name { font-size: calc(1.45rem + 2px); }
  .ml-tap-banner .stacene-wine-sub { font-size: calc(1.15rem + 2px); }
  .ml-tap-banner .stacene-wine-amount { font-size: calc(1.45rem + 2px); }
  .ml-tap-banner .stacene-wine-regular { font-size: calc(.9rem + 2px); }
  .ml-tap-banner .stacene-wine-promo { font-size: calc(.72rem + 2px); }
  .ml-tap-banner .stacene-wine-note { font-size: calc(.85rem + 2px); }
  .ml-tap-banner .stacene-wine-foot .add-btn { font-size: calc(.95rem + 2px); }
}
