@font-face {
  font-family: "HubbyBunny";
  src: url("fonts/HUBBY-BUNNY.ttf") format("truetype");
}

:root {
  --brand: rgb(2,64,137);
  --brand-light: rgb(162,211,246);
  --bg-gradient: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(162, 211, 243, 1) 100%);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* GLOBÁLNÍ POZADÍ */
html, body {
  margin: 0; padding: 0; width: 100%;
  min-height: 100%;
  overscroll-behavior: none;
  font-family: "HubbyBunny", Arial, sans-serif;
  user-select: none;
  background: var(--bg-gradient) no-repeat fixed;
  /* zakázat nativní pinch zoom celé stránky (jen scroll) */
  touch-action: pan-y;
}
/* horizontální clipping pouze na body (ne na html, ať scroll zůstává na okně) */
body { overflow-x: clip; }
/* svislé scrollování stránky řeší browser, vodorovný swipe a pinch řešíme my v JS */
#bigImage { touch-action: pan-y; }

/* ANIMACE */
.grid img {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.grid img.loaded { opacity: 1; }

#bigImage { opacity: 1; }
@keyframes swapIn {
  from { transform: scale(0.985); opacity: 0.6; }
  to   { transform: scale(1);     opacity: 1; }
}
#bigImage.swap-in { animation: swapIn 0.18s ease-out; }

/* =========================================
   BĚŽNÝ REŽIM (HLAVNÍ STRÁNKA)
   ========================================= */
h1 { 
  font-family: "HubbyBunny"; text-align: center; 
  font-size: 48px; color: var(--brand); margin: 20px 0; cursor: pointer;
}

.content-padding { padding: 0 20px; }

/* Stepper */
.stepper {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; margin: 10px auto 30px auto; max-width: 900px;
  padding: 0 20px;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  flex: 0 0 auto; width: 180px; text-align: center;
  position: relative; z-index: 2;
}
.step-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff; color: #aaa;
  border: 4px solid #d6dce4;
  display: flex; align-items: center; justify-content: center;
  font-family: "HubbyBunny"; font-size: 26px; font-weight: bold;
  transition: 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.step-label {
  margin-top: 10px; font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px;
  color: #888; line-height: 1.25; font-weight: bold;
  transition: color 0.3s ease;
}
.step.active .step-circle {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 6px rgba(2,64,137,0.15), 0 4px 12px rgba(2,64,137,0.3);
  transform: scale(1.08);
}
.step.active .step-label { color: var(--brand); font-size: 15px; }
/* Krok 2 splněný (s fajfkou) → oranžová */
.step.done[data-step="2"] .step-circle {
  background: #ff8800; border-color: #ff8800;
}
.step.done[data-step="2"] .step-label { color: #ff8800; }
.step.done .step-circle {
  background: rgb(125,186,46); color: #fff; border-color: rgb(125,186,46);
}
.step.done .step-circle::after {
  content: "✓"; position: absolute;
  font-size: 26px; font-weight: bold; line-height: 1;
}
.step.done .step-circle { font-size: 0; }
.step.done .step-label { color: rgb(125,186,46); }
.step.info .step-circle {
  background: #fff; color: #b0b6c0; border-style: solid; border-color: #b0b6c0;
}
.step.info .step-label { color: #888; font-style: italic; }
.step-line {
  flex: 1 1 0; height: 4px; background: #d6dce4;
  margin: 26px -20px 0 -20px;
  border-radius: 2px; transition: background 0.3s ease;
  min-width: 40px; max-width: 120px;
  position: relative; z-index: 1;
}
.step-line.done { background: rgb(125,186,46); }
.step-line[data-line="2-3"].done { background: #ff8800; }
.step-line.dashed {
  background: transparent;
  height: 4px;
  margin-top: 26px;
  border-radius: 0;
  overflow: visible;
}
.step-line.dashed svg { width: 100%; height: 100%; display: block; overflow: visible; }

@media (max-width: 720px) {
  .step { width: auto; flex: 1; min-width: 0; }
  .step-label { font-size: 11px; }
  .step-circle { width: 44px; height: 44px; font-size: 20px; border-width: 3px; }
  .step-line { margin-top: 20px; min-width: 20px; }
}

.menu {
  display: flex; justify-content: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.menu button {
  font-family: "HubbyBunny"; font-size: 18px;
  padding: 8px 20px; cursor: pointer;
  background: #fff; color: var(--brand);
  border: 3px solid var(--brand);
  border-radius: 8px; transition: 0.2s;
}
.menu button.active { background: var(--brand-light); color: var(--brand); }
#menu[hidden] { display: none; }

/* Přepínač FOTOGRAFIE / SORTIMENT */
.mode-toggle-wrap { display: flex; justify-content: center; margin: 0 0 18px 0; }
.mode-toggle {
  display: inline-flex; background: #fff; border: 3px solid var(--brand);
  border-radius: 14px; padding: 4px; gap: 4px;
  box-shadow: 0 4px 14px rgba(2,64,137,0.15);
}
.mode-toggle button {
  font-family: "HubbyBunny"; font-size: 18px;
  padding: 10px 22px; cursor: pointer;
  background: transparent; color: var(--brand);
  border: none; border-radius: 10px; transition: 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.mode-toggle button svg { width: 20px; height: 20px; }
.mode-toggle button.active { background: var(--brand); color: #fff; }

/* Mřížka sortimentu — přímé +/- bez rozklikávání */
.sortiment-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 10px 0 30px 0;
}
.sortiment-card {
  background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 4px 14px rgba(2,64,137,0.1);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.sortiment-thumb {
  width: 100%; height: 160px; display: flex; align-items: center; justify-content: center;
  background: #f7fbff; border-radius: 10px; overflow: hidden;
}
.sortiment-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sortiment-name {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 18px; font-weight: bold;
  color: #222; word-break: break-word;
}
.sortiment-price { font-family: "HubbyBunny", Arial, sans-serif; font-size: 15px; color: var(--brand); }
.sortiment-variant-label {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 13px; color: #888;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.sortiment-variants { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.variant-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #f7fbff; border: 2px solid transparent; border-radius: 8px;
  padding: 4px 4px 4px 12px;
}
.variant-row.active { border-color: var(--brand); background: var(--brand-light); }
.variant-name { font-family: "HubbyBunny", Arial, sans-serif; font-size: 16px; font-weight: bold; color: #222; }
.variant-row .qty-ctrl { background: transparent; }
.variant-row .qty-btn { width: 38px; height: 38px; font-size: 20px; }
.variant-row .qty-num { min-width: 26px; font-size: 18px; }
.sortiment-empty {
  text-align: center; color: #888; padding: 40px;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 18px;
}


#viewer {
  position: relative; max-width: 1200px; margin: 0 auto 10px auto; text-align: center;
}
#imageName {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 16px;
  color: #6b7a90; margin-top: 12px; margin-bottom: 0;
  letter-spacing: 0.3px;
}
#bigImage { 
  max-width: 90%; max-height: 70vh; 
  border-radius: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); background: white;
}

.separator-line { display: none; }

.gallery-toggle-wrap { text-align: center; margin: 14px 0 20px 0; }
.gallery-toggle {
  font-family: "HubbyBunny"; font-size: 24px;
  background: #fff; color: var(--brand);
  border: 3px solid var(--brand); border-radius: 14px;
  padding: 14px 32px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 14px rgba(2,64,137,0.2);
  transition: 0.2s;
}
.gallery-toggle:hover { background: var(--brand-light); }
.gallery-toggle:active { transform: scale(0.97); }
.gallery-toggle svg {
  width: 26px; height: 26px;
  transition: transform 0.3s ease;
}
.gallery-toggle.open svg { transform: rotate(180deg); }
.gallery-toggle.open { padding: 12px 22px; gap: 0; }
.gallery-toggle.open .gallery-toggle-text { display: none; }

@keyframes gridFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.grid-fade { animation: gridFadeIn 0.5s ease-out; }

/* PEVNÁ sekce s fotkou — vždy 100vw, ignoruje max-width #viewer */
.image-relative-container {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  height: 65vh;
  overflow: hidden;
}
.big-frame {
  position: relative;
  display: inline-flex;
  height: 100%;
  align-items: center;
  z-index: 10;
}
#bigImage {
  display: block;
  max-height: 100%;
  /* hlavní fotka má MAX šířku = celá sekce minus rezervovaný prostor pro stack peek */
  max-width: calc(100vw - 320px);
  border-radius: 25px;
  box-shadow: none;
  background: #fff;
  position: relative;
  z-index: 10;
}

/* Stack-side karty — kotveny k HRANĚ hlavní fotky (jsou uvnitř .big-frame) */
.stack-side {
  position: absolute; top: 50%;
  cursor: pointer; pointer-events: auto;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}
.stack-side img {
  display: block;
  /* PEVNÝ čtverec — fotka se ořezává */
  width: 44vh; height: 44vh;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: none;
  background: transparent;
  /* zatmavit boční náhledy, hlavní fotka je dominantní */
  filter: brightness(0.45);
}
/* prev1 / next1: zapuštěné cca 40px ZA hlavní fotku (skryté z-indexem) */
.stack-prev1 { right: 100%; transform: translate( 50px, -50%); z-index: 7; }
.stack-next1 { left:  100%; transform: translate(-50px, -50%); z-index: 7; }
/* prev2 / next2: další úroveň hloubky, posunuté o ~120px dál a ještě tmavší */
.stack-prev2 img, .stack-next2 img { width: 36vh; height: 36vh; filter: brightness(0.3); border-radius: 12px; }
.stack-prev2 { right: calc(100% + 120px); transform: translate( 50px, -50%); z-index: 5; }
.stack-next2 { left:  calc(100% + 120px); transform: translate(-50px, -50%); z-index: 5; }
/* Portrait: prev1/next1 více "zapustit" do hlavní (víc embedded → vizuálně blíž ke středu),
   prev2/next2 přizpůsobit aby zachovaly pravidelný rozestup */
.image-relative-container.main-portrait .stack-prev1 {
  transform: translate( 130px, -50%);
}
.image-relative-container.main-portrait .stack-next1 {
  transform: translate(-130px, -50%);
}
.image-relative-container.main-portrait .stack-prev2 {
  right: calc(100% + 150px); transform: translate( 130px, -50%);
}
.image-relative-container.main-portrait .stack-next2 {
  left:  calc(100% + 150px); transform: translate(-130px, -50%);
}

.image-relative-container.zoomed .stack-side {
  opacity: 0; pointer-events: none;
}
.image-relative-container.zoomed .side-btn,
.image-relative-container.zoomed .side-btn.prev,
.image-relative-container.zoomed .side-btn.next {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.side-btn {
  /* pozicováno v #viewer; 5% mezera = arrow ve středu = 2.5% od kraje */
  position: absolute; top: 50%;
  width: 76px; height: 76px;
  background: linear-gradient(135deg, var(--brand) 0%, #1761b8 100%);
  color: #fff; border: 3px solid rgba(255,255,255,0.85);
  border-radius: 50%; padding: 0;
  z-index: 10; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35), inset 0 -3px 8px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  opacity: 0.92; transition: opacity 0.15s, filter 0.15s;
}
/* Pozicováno uvnitř bigWrap (kontejner má rozměry obrázku) →
   top:50% odpovídá vertikální půlce výšky FOTKY.
   Vodorovně vystrčeno za levý/pravý okraj fotky s drobnou mezerou. */
.side-btn.prev { left:  -10px; transform: translate(-100%, -50%); }
.side-btn.next { right: -10px; transform: translate(100%, -50%); }
.side-btn.prev:hover { transform: translate(-100%, -50%) scale(1.05); opacity: 1; }
.side-btn.next:hover { transform: translate(100%, -50%) scale(1.05); opacity: 1; }
.side-btn.prev:active { transform: translate(-100%, -50%) scale(0.92); }
.side-btn.next:active { transform: translate(100%, -50%) scale(0.92); }
.side-btn svg { width: 38px; height: 38px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.side-btn.prev svg { margin-right: 3px; }
.side-btn.next svg { margin-left: 3px; }

.grid-wrap { width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.grid img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; cursor: pointer; }
.grid img.selected { outline: 5px solid var(--brand); }

.bottom-banner { display: block; width: 100%; margin-top: 40px; border: none; }

/* =========================================
   OBJEDNÁVKA TISKU
   ========================================= */
#orderBar { text-align: center; margin: 0 0 18px 0; }
#orderBtn {
  font-family: "HubbyBunny"; font-size: 22px;
  background: var(--brand); color: #fff;
  border: 3px solid transparent; border-radius: 14px;
  padding: 11px 28px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(2,64,137,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
#orderBtn:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(2,64,137,0.25); }
#orderBtn.in-cart {
  background: #ff8800;
  box-shadow: 0 4px 14px rgba(255,136,0,0.4);
}
#orderBtn.in-cart:active { box-shadow: 0 2px 6px rgba(255,136,0,0.4); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: 18px;
  padding: 24px; max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-height: 90vh; overflow-y: auto;
}
/* Velké modaly (80vw × 80vh) */
.cart-card, #savedModal .modal-card, #orderModal .modal-card {
  max-width: 80vw !important; width: 80vw !important;
  max-height: 80vh; height: 80vh;
  display: flex; flex-direction: column;
}
/* V order modalu (přidání fotky) ať picker využije celý zbývající prostor */
#orderModal .frame-picker-qty { flex: 1; min-height: 0; max-height: none; }

/* Kompaktní hlavička order modalu */
.order-modal-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px; border-bottom: 2px solid var(--brand-light);
  margin-bottom: 14px;
}
.order-modal-photo {
  width: 80px; height: 80px; object-fit: cover; border-radius: 8px;
  flex-shrink: 0; background: #eee;
}
.order-modal-head-info { flex: 1; min-width: 0; }
.order-modal-head-info h2 {
  font-family: "HubbyBunny"; color: var(--brand);
  margin: 0 0 4px 0; font-size: 24px;
}
.order-modal-head-info #orderFileName {
  font-size: 13px; color: #777; word-break: break-all;
}
.order-modal-close {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: #eee; color: #555; border: none; cursor: pointer; font-size: 18px;
  flex-shrink: 0; font-family: Arial, sans-serif;
  display: flex; align-items: center; justify-content: center;
}

/* Grid rámečků — 3-5 sloupců podle šířky */
.frame-picker-grid {
  flex: 1; min-height: 0; overflow-y: auto; padding: 4px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: #f7fbff; border-radius: 10px; padding: 14px;
}
.frame-picker-grid .frame-row {
  background: #fff; border: 3px solid transparent; border-radius: 10px;
  padding: 12px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; transition: 0.15s;
}
.frame-picker-grid .frame-row.active {
  border-color: var(--brand); background: var(--brand-light);
}
.frame-picker-grid .frame-thumb {
  width: 100%; height: 130px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 6px;
}
.frame-picker-grid .frame-thumb img { width: 100%; height: 100%; object-fit: contain; }
.frame-picker-grid .frame-thumb.is-photo img { object-fit: cover; }
.frame-picker-grid .frame-thumb .frame-none {
  width: 100%; height: 100%; background: #eee; color: #888;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1.2; text-align: center; font-weight: bold;
}
.frame-picker-grid .frame-name {
  font-size: 17px; color: #222; font-weight: bold; text-align: center; word-break: break-word;
}
.frame-picker-grid .qty-ctrl {
  display: flex; align-items: center; gap: 8px;
}
/* Když je dlaždice aktivní (>0 ks), zvýraznit i tlačítka +/- */
.frame-picker-grid .frame-row.active .qty-btn {
  background: var(--brand); color: #fff;
}
.frame-picker-grid .frame-row.active .qty-num {
  color: var(--brand);
}
.frame-picker-grid .frame-prices {
  font-size: 13px; color: var(--brand); text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.frame-picker-grid .frame-price { font-size: 13px; }

/* Footer */
.order-modal-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  padding-top: 14px; margin-top: 12px; border-top: 2px solid var(--brand-light);
}
.order-modal-footer #orderMsg { color: var(--brand); font-weight: bold; }
.order-modal-footer .btn-primary { padding: 14px 28px; font-size: 18px; }
.order-modal-footer-total {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 16px; color: var(--brand); white-space: nowrap;
}
.order-modal-footer-total b { font-size: 24px; }
.modal-card h2 {
  font-family: "HubbyBunny"; color: var(--brand);
  margin: 0 0 16px 0; font-size: 28px; text-align: center;
}
.modal-photo { text-align: center; margin-bottom: 16px; }
.modal-photo img {
  max-width: 100%; max-height: 180px;
  border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.modal-photo #orderFileName {
  margin-top: 8px; font-size: 14px; color: #666; word-break: break-all;
}
.modal-card label {
  display: block; margin-bottom: 14px;
  font-size: 16px; color: var(--brand); font-weight: bold;
}
.modal-card input[type="text"], .modal-card textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px; font-size: 18px;
  border: 2px solid var(--brand-light); border-radius: 8px;
  font-family: "HubbyBunny", Arial, sans-serif;
  background: #f7fbff;
}
.modal-card input[type="text"]:focus, .modal-card textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
}
.modal-card textarea { resize: vertical; min-height: 50px; }
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px;
}
.modal-actions button {
  font-family: "HubbyBunny"; font-size: 18px;
  padding: 12px 22px; border: none; border-radius: 10px;
  cursor: pointer; transition: 0.15s;
}
.btn-primary {
  background: var(--brand); color: #fff;
  font-family: "HubbyBunny"; font-size: 18px; font-weight: bold;
  border: 3px solid transparent; border-radius: 14px;
  padding: 12px 28px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(2,64,137,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(2,64,137,0.25); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost {
  background: #eee; color: #555;
  font-family: "HubbyBunny"; font-size: 18px; font-weight: bold;
  border: none; border-radius: 14px;
  padding: 12px 22px; cursor: pointer;
}
#orderMsg { margin-top: 12px; text-align: center; font-size: 16px; color: var(--brand); min-height: 22px; }

/* výběr rámečku + počty */
.frame-picker-label {
  font-size: 16px; color: var(--brand); font-weight: bold; margin: 4px 0 8px 0;
}
.frame-picker-qty {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px; max-height: 320px; overflow-y: auto;
  padding: 8px; background: #f7fbff; border-radius: 8px;
  border: 2px solid var(--brand-light);
}
.frame-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; background: #fff; border-radius: 8px;
  border: 2px solid transparent; transition: 0.15s;
}
.frame-row.active { border-color: var(--brand); background: #eef6ff; }
.frame-thumb {
  width: 130px; height: 130px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}
.frame-thumb img { width: 100%; height: 100%; object-fit: contain; }
.frame-thumb.is-photo img { object-fit: cover; }
.frame-thumb.is-photo { background: #eee; }
.frame-thumb .frame-none {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 18px; color: #888; line-height: 1.2;
  text-align: center; background: #f0f0f0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.frame-meta {
  flex: 1; font-family: "HubbyBunny", Arial, sans-serif; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; text-align: center;
}
.frame-meta .frame-name { font-size: 20px; color: #222; font-weight: bold; word-break: break-word; }
.frame-meta .qty-ctrl { align-self: center; }
.frame-prices { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.frame-meta .frame-price { font-size: 16px; color: var(--brand); margin-top: 0; }
.frame-tiers {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.tier-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--brand-light); color: var(--brand);
  padding: 4px 10px; border-radius: 999px;
  font-size: 14px; font-family: "HubbyBunny", Arial, sans-serif;
}
.tier-pill b { color: var(--brand); }

/* Přepínač "S pukem" u rámečku, který má puk zahrnutý v ceně */
.puck-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px; color: var(--brand);
  background: var(--brand-light); padding: 6px 10px; border-radius: 8px;
}
.puck-toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.puck-hint { font-size: 12px; color: #667; font-weight: normal; }

/* Přepínač orientace u rámečku, který je na výšku i na šířku — stejná "pilulka" jako puck-toggle,
   jen rozdělená na dvě půlky; zvolená půlka je plná barvou značky. */
.orient-toggle {
  display: flex; gap: 2px; padding: 3px; border-radius: 8px;
  background: var(--brand-light);
}
.orient-opt {
  display: flex; align-items: center; gap: 5px;
  border: none; background: transparent; cursor: pointer;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px; color: var(--brand);
  padding: 4px 8px; border-radius: 6px;
}
.orient-opt.on { background: var(--brand); color: #fff; }
.orient-opt:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.orient-ico { display: inline-block; border: 2px solid currentColor; border-radius: 2px; flex-shrink: 0; }
.orient-ico.portrait  { width: 9px;  height: 13px; }
.orient-ico.landscape { width: 13px; height: 9px; }
.orient-ico.square    { width: 11px; height: 11px; }

/* Přepínač "Digitální verze" u "jen fotografie" — stejný styl jako puck-toggle */
.digital-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px; color: var(--brand);
  background: var(--brand-light); padding: 6px 10px; border-radius: 8px;
}
.digital-toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.digital-hint { font-size: 12px; color: #667; font-weight: normal; }

.qty-ctrl {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: #fff; border-radius: 8px; padding: 2px;
}
.qty-btn {
  width: 50px; height: 50px; border-radius: 8px; border: none;
  background: var(--brand-light); color: var(--brand);
  font-size: 28px; font-weight: bold; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.qty-btn:active { transform: scale(0.92); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-btn:disabled:active { transform: none; }

/* Vyprodáno */
.sold-out-tag {
  display: inline-block; background: rgb(201,34,32); color: #fff;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 11px; font-weight: bold;
  padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px;
  vertical-align: middle;
}
.frame-row.sold-out, .sortiment-card.sold-out, .variant-row.sold-out { opacity: 0.55; }
/* Položka zamčená pravidlem "povolit prodej položky" (Slevy / akce) */
.frame-row.locked .frame-thumb, .sortiment-card.locked .sortiment-thumb { opacity: 0.45; filter: grayscale(0.6); }
.lock-tag {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 13px; line-height: 1.25;
  color: #8a5a00; background: #fff4d6; border-radius: 8px; padding: 4px 8px; text-align: center;
}
.qty-num {
  min-width: 40px; text-align: center; font-family: "HubbyBunny", Arial, sans-serif;
  font-size: 24px; font-weight: bold; color: var(--brand);
}

/* Celá obrazovka (hlavně pro tablet na stánku) */
#fullscreenBtn {
  position: fixed; top: 14px; right: 14px; z-index: 8500;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: #445;
  border: 2px solid rgba(0,0,0,0.08); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
#fullscreenBtn svg { width: 22px; height: 22px; }
#fullscreenBtn[hidden] { display: none; }
#fullscreenBtn:active { transform: scale(0.92); }

/* Plovoucí stack vpravo dole */
#fabStack {
  position: fixed; right: 20px; bottom: 20px; z-index: 8000;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
#cartFabWrap { display: flex; gap: 8px; align-items: center; }
#cartFabWrap[hidden] { display: none; }
#cartFab {
  font-family: "HubbyBunny"; font-size: 22px;
  background: #ff8800; color: #fff;
  border: none; border-radius: 14px;
  padding: 14px 22px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,136,0,0.4);
  display: flex; align-items: center; gap: 10px;
}
#savedFabWrap { display: flex; gap: 8px; align-items: center; }
#savedFabWrap[hidden] { display: none; }
#savedFab {
  font-family: "HubbyBunny"; font-size: 22px;
  background: rgb(125,186,46); color: #fff;
  border: none; border-radius: 14px;
  padding: 14px 22px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(125,186,46,0.4);
  display: flex; align-items: center; gap: 10px;
}
#savedFab:active { transform: scale(0.97); }
#savedCancelFab {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgb(201,34,32); color: #fff; border: none;
  font-size: 22px; font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
#savedCancelFab:active { transform: scale(0.92); }
.cart-badge-light { background: transparent; color: #fff; }
#cartCancelFab {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgb(201,34,32); color: #fff; border: none;
  font-size: 22px; font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
#cartCancelFab:active { transform: scale(0.92); }

/* monochromní SVG ikony v tlačítkách */
.btn-icon {
  width: 1.15em; height: 1.15em;
  flex-shrink: 0;
  vertical-align: -0.18em;
  display: inline-block;
}
button { /* aby ikona seděla vedle textu */ }

#orderBtn, #saveBtn, #cartFab, #savedFab, .saved-add {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
}

/* tlačítko "Zapamatovat si fotku" — stejně barevně jako Přidat do objednávky */
.save-btn {
  font-family: "HubbyBunny"; font-size: 22px;
  background: var(--brand); color: #fff;
  border: 3px solid transparent; border-radius: 14px;
  padding: 11px 28px; margin-right: 10px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(2,64,137,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.save-btn.saved { background: rgb(125,186,46); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(125,186,46,0.4); }
.save-btn:active { transform: scale(0.97); }

/* Strip uložených fotek */
#savedStrip {
  max-width: 1200px; margin: 0 auto 18px auto;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
#savedStrip[hidden] { display: none; }
.saved-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.saved-clear {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 13px; font-weight: bold;
  background: #fde6e6; color: rgb(201,34,32);
  border: 2px solid rgb(201,34,32); border-radius: 8px;
  padding: 5px 12px; cursor: pointer; transition: 0.15s;
}
.saved-clear:hover { background: rgb(201,34,32); color: #fff; }
.saved-clear:active { transform: scale(0.95); }
.saved-label {
  font-family: "HubbyBunny"; color: var(--brand);
  font-size: 18px;
}
.saved-label span {
  background: var(--brand); color: #fff; border-radius: 12px;
  padding: 1px 10px; font-size: 14px; margin-left: 6px;
}
.saved-track {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 0;
}
.saved-item {
  flex: 0 0 auto; position: relative;
  background: #f7fbff; border-radius: 8px; padding: 6px;
  display: flex; flex-direction: column; align-items: center;
  width: 130px; cursor: pointer;
}
.saved-item img {
  width: 118px; height: 90px; object-fit: cover; border-radius: 6px;
  border: 2px solid transparent; transition: 0.15s;
}
.saved-item img:hover { border-color: var(--brand); }
.saved-item .saved-name {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 10px; color: #555;
  margin-top: 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: 100%;
}
.saved-item .saved-del {
  position: absolute; top: 2px; right: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(204,68,68,0.9); color: #fff; border: none;
  font-size: 12px; cursor: pointer; line-height: 1;
}

/* idle countdown */
.idle-countdown {
  background: #fff8e1; border: 2px solid #f3a800;
  color: #a06000; font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; text-align: center;
}
.idle-countdown b { color: rgb(201,34,32); font-size: 18px; }
.cart-badge {
  background: transparent; color: #fff;
  border-radius: 20px; min-width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: bold; padding: 0 6px;
}

/* Modal košíku */
.cart-card { max-width: 600px; }
.cart-card .cart-list { flex: 1; min-height: 0; max-height: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cart-head h2 { margin: 0; }
.cart-close-x {
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: #eee; color: #555; border: none; cursor: pointer; font-size: 18px;
  font-family: Arial, sans-serif;
  display: flex; align-items: center; justify-content: center;
}
.cart-footer {
  display: grid; grid-template-columns: 1.2fr 1.5fr auto auto; gap: 10px;
  align-items: center; padding-top: 12px; border-top: 2px solid var(--brand-light);
  margin-top: 8px;
}
.cart-footer input[type="text"], .cart-footer input[type="email"] {
  padding: 12px; font-size: 16px; font-family: "HubbyBunny", Arial, sans-serif;
  border: 2px solid var(--brand-light); border-radius: 8px; background: #f7fbff;
}
.cart-footer input[type="text"]:focus, .cart-footer input[type="email"]:focus { outline: none; border-color: var(--brand); background: #fff; }
.cart-email-wrap {
  grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px;
  background: var(--brand-light); border: 2px solid var(--brand); border-radius: 8px; padding: 10px 12px;
}
.cart-email-wrap input[type="email"] { border-color: var(--brand); background: #fff; }
/* .modal-card label { display: block } by jinak přebilo atribut hidden → pole jen u digitální fotky */
.cart-email-wrap[hidden] { display: none; }
.cart-email-hint { font-size: 13px; color: var(--brand); font-weight: normal; }
.cart-total-inline {
  font-family: "HubbyBunny"; font-size: 20px; color: var(--brand);
  padding: 0 16px; white-space: nowrap;
}
.cart-total-inline b { font-size: 28px; }
.cart-submit {
  padding: 14px 22px; font-size: 18px; white-space: nowrap;
}
@media (max-width: 900px) {
  .cart-footer { grid-template-columns: 1fr 1fr; }
  .cart-total-inline, .cart-submit { grid-column: 1 / -1; text-align: center; }
}
.cart-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 12px; max-height: 50vh; overflow-y: auto;
  padding: 4px;
}
.cart-row {
  display: grid; grid-template-columns: 120px 120px 1fr auto;
  gap: 14px; align-items: center;
  padding: 10px; background: #f7fbff; border-radius: 8px;
  font-family: "HubbyBunny", Arial, sans-serif;
}
.cart-photo {
  width: 120px; height: 120px; object-fit: cover; border-radius: 8px;
  cursor: pointer; transition: transform 0.15s; display: block;
}
.cart-photo:hover { transform: scale(1.04); }
.cart-frame-big {
  width: 120px; height: 120px; object-fit: contain; border-radius: 8px;
  background: transparent; display: block;
}
.cart-frame-big.none {
  background: #eee; color: #9aa5b3;
  display: flex; align-items: center; justify-content: center;
}
.cart-frame-big.none svg { width: 64px; height: 64px; }
.cart-frame-name { color: #444; margin-top: 4px; font-size: 14px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 95vw; max-height: 95vh;
  border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.cart-info { flex: 1; min-width: 0; }
.cart-file { font-size: 13px; color: #444; word-break: break-all; margin-bottom: 4px; }
.cart-frame-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; margin-bottom: 4px; }
.cart-frame-img { width: 22px; height: 22px; object-fit: contain; border-radius: 3px;
  background: transparent; }
.cart-frame-none {
  width: 22px; height: 22px; border-radius: 3px; background: #eee;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #888;
}
.cart-price-line { font-size: 14px; color: var(--brand); }
.cart-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.cart-qty button {
  width: 30px; height: 30px; border-radius: 5px; border: none;
  background: var(--brand-light); color: var(--brand);
  font-size: 18px; font-weight: bold; cursor: pointer; padding: 0;
}
.cart-qty button.cart-del {
  background: #fde6e6; color: rgb(201,34,32); margin-left: 6px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-qty button.cart-del svg { width: 18px; height: 18px; }
.cart-qty span { min-width: 24px; text-align: center; font-weight: bold; color: var(--brand); }

.cart-total {
  font-family: "HubbyBunny"; font-size: 26px;
  color: var(--brand); text-align: right;
  padding: 10px; background: var(--brand-light);
  border-radius: 8px; margin-bottom: 14px;
}

/* Modal potvrzení */
.confirm-card { text-align: center; max-width: 400px; }
.confirm-check {
  width: 80px; height: 80px; margin: 0 auto 16px auto;
  background: #4a4; color: #fff; font-size: 50px; font-weight: bold;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.confirm-card h2 { margin-bottom: 8px; }
.confirm-number {
  font-family: "HubbyBunny"; font-size: 60px; color: var(--brand);
  margin: 8px 0 16px 0;
}
.confirm-info {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 15px; color: #555;
  margin-bottom: 14px; line-height: 1.4;
}
.confirm-total {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 18px;
  background: var(--brand-light); padding: 12px; border-radius: 8px;
  color: var(--brand); margin-bottom: 16px;
}
.confirm-card .btn-primary { width: 100%; padding: 14px; font-size: 20px; }

/* Saved modal grid — větší dlaždice + roste do dostupné výšky */
.saved-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; padding: 4px; margin-bottom: 14px;
  flex: 1; min-height: 0; overflow-y: auto;
}
.saved-card img { height: 180px !important; }
.saved-card {
  position: relative; background: #f7fbff; border-radius: 8px; padding: 6px;
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  transition: 0.15s;
}
.saved-card:hover { background: var(--brand-light); }
.saved-card img {
  width: 100%; height: 110px; object-fit: cover; border-radius: 6px; display: block;
}
.saved-card .saved-name {
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 11px; color: #555;
  margin-top: 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.saved-card .saved-del {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(204,68,68,0.9); color: #fff; border: none;
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.saved-card .saved-del svg { width: 16px; height: 16px; }
.saved-card .saved-add {
  width: 100%; margin-top: 8px;
  background: #ff8800; color: #fff;
  border: none; border-radius: 8px;
  font-family: "HubbyBunny"; font-size: 14px;
  padding: 10px 6px; cursor: pointer;
  box-shadow: 0 3px 8px rgba(255,136,0,0.35);
  transition: 0.15s;
}
.saved-card .saved-add:hover { background: #e67700; }
.saved-card .saved-add:active { transform: scale(0.96); }
.saved-empty { text-align: center; color: #888; padding: 30px; font-family: "HubbyBunny", Arial, sans-serif; }

/* =========================================
   REŽIM PREZENTACE — fullscreen mozaika
   ========================================= */
.slideshow {
  position: fixed; inset: 0;
  z-index: 10000;
  background:
    radial-gradient(ellipse at 50% -10%, #1c1c2a 0%, transparent 55%),
    #0a0a10;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  cursor: pointer;
}
.slideshow[hidden] { display: none; }
.slideshow-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
  width: min(100%, 1400px);
}
.slide-tile {
  overflow: hidden;
  border-radius: 18px;
  background: #15151c;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.slide-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Hlavní zvětšená dlaždice — landscape varianta */
.slide-tile.featured {
  grid-column: 1 / span 3;
  grid-row:    1 / span 2;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 30px 80px -20px rgba(0,0,0,0.7);
  z-index: 1;
}
/* Portrait varianta hlavní dlaždice */
.slide-tile.featured.portrait {
  grid-column: 1 / span 2;
  grid-row:    1 / span 3;
}
/* Morphing přes View Transitions API */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(*) {
    animation-duration: 700ms;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 700ms;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
}
/* během prezentace zamknout scroll pod overlay */
body.slideshow-active { overflow: hidden; }

/* =========================================
   VLASTNÍ OŘEZ FOTKY
   ========================================= */
/* Checkbox "✂️ Vlastní ořez" na dlaždici varianty (jako "S pukem") */
.frame-picker-grid .crop-toggle {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  background: var(--brand-light); color: var(--brand); padding: 6px 10px; border-radius: 8px;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px;
}
.frame-picker-grid .crop-toggle label {
  display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  font-size: 14px; font-weight: normal; color: inherit;
}
.frame-picker-grid .crop-toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: #ff8800; cursor: pointer; }
.frame-picker-grid .crop-toggle.on { background: #fff1de; color: #a85400; box-shadow: inset 0 0 0 2px #ff8800; }
.crop-edit {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: none; background: #fff; color: inherit; border-radius: 6px; padding: 3px 8px 3px 3px;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 13px;
}
.crop-hint-tag { font-size: 12px; color: #a85400; font-weight: normal; }

/* Náhled výřezu (dlaždice, košík) — vnitřní box má poměr výřezu, pozadí ukazuje jen výřez */
.crop-preview {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden; background: #dde6f0; border-radius: 6px;
}
.crop-preview.cart-photo { display: flex; }
.crop-preview-in { display: block; max-width: 100%; max-height: 100%; background-repeat: no-repeat; }
.crop-mini { width: 34px; height: 34px; border-radius: 4px; }

/* Editor přes celou obrazovku — tmavý jako náhled fotky */
.crop-modal {
  position: fixed; inset: 0; z-index: 9600;
  background: rgba(0,0,0,0.93);
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom));
  color: #fff; font-family: "HubbyBunny", Arial, sans-serif;
  touch-action: none; user-select: none; -webkit-user-select: none;
  overscroll-behavior: contain;
}
.crop-modal[hidden] { display: none; }
.crop-head { text-align: center; }
.crop-title { font-size: 24px; }
.crop-hint {
  font-size: 13px; line-height: 1.35; color: #c3cedd;
  max-width: 640px; margin: 4px auto 0 auto;
}
/* plocha je neprůhledná — zašedlé části fotky se nesmí plést s prosvítající stránkou */
.crop-stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none;
  background: #000; border-radius: 10px;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-img {
  position: absolute; left: 0; top: 0; max-width: none; max-height: none;
  transform-origin: 0 0; will-change: transform;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.crop-img[hidden], .crop-window[hidden] { display: none; }
/* co se ořízne = zašedlé; co se vytiskne = barevné uvnitř výřezu */
.crop-img-dim { filter: grayscale(1) brightness(0.42); }
.crop-window {
  position: absolute; overflow: hidden; pointer-events: none;
  outline: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.45), 0 10px 40px rgba(0,0,0,0.55);
}
/* třetinová mřížka jen během posouvání */
.crop-grid {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s;
  --l: rgba(255,255,255,0.55);
  background:
    linear-gradient(90deg,
      transparent calc(33.33% - 0.5px), var(--l) calc(33.33% - 0.5px), var(--l) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px),
      transparent calc(66.67% - 0.5px), var(--l) calc(66.67% - 0.5px), var(--l) calc(66.67% + 0.5px), transparent calc(66.67% + 0.5px)),
    linear-gradient(180deg,
      transparent calc(33.33% - 0.5px), var(--l) calc(33.33% - 0.5px), var(--l) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px),
      transparent calc(66.67% - 0.5px), var(--l) calc(66.67% - 0.5px), var(--l) calc(66.67% + 0.5px), transparent calc(66.67% + 0.5px));
}
.crop-stage.dragging .crop-grid { opacity: 1; }
.crop-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #c3cedd; font-size: 18px;
}
.crop-loading[hidden] { display: none; }
.crop-quality {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  background: rgba(0,0,0,0.75); color: #ffcf6e; font-size: 13px;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
}
.crop-quality[hidden] { display: none; }
.crop-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; }
.crop-orient-fixed { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #c3cedd; }
.crop-zoom { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; max-width: 460px; }
.crop-zoom input[type="range"] { flex: 1; min-width: 0; height: 32px; accent-color: #ff8800; cursor: pointer; }
.crop-zoom-btn {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 24px; line-height: 1; font-family: Arial, sans-serif;
}
.crop-zoom-btn:active { background: rgba(255,255,255,0.3); }
.crop-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.crop-actions .btn-primary { background: #ff8800; box-shadow: 0 4px 14px rgba(255,136,0,0.4); }
@media (max-width: 560px) {
  .crop-title { font-size: 20px; }
  .crop-hint { font-size: 12px; }
  .crop-actions .btn-primary, .crop-actions .btn-ghost { padding: 10px 14px; font-size: 16px; }
}
/* hláška o nečinnosti musí být vidět i nad editorem ořezu */
#idleModal { z-index: 9700; }

/* Objednávka zatím nesplňuje podmínku odeslání (pravidlo „povolit odeslat objednávku s položkou") */
.cart-submit-block {
  margin: 0 0 12px 0; padding: 10px 14px; border-radius: 8px;
  background: #fff4d6; border: 2px solid #ff8800; color: #8a5a00;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 15px; line-height: 1.4;
}
.cart-submit-block[hidden] { display: none; }

/* =========================================
   TELEFON — velká fotka přes celou šířku
   (na tabletu/PC zůstává fotka uprostřed s bočními kartami)
   ========================================= */
@media (max-width: 700px) {
  .image-relative-container { height: auto; max-height: 72vh; padding: 6px 0; }
  .big-frame { height: auto; max-width: 100%; }
  #bigImage {
    max-width: calc(100vw - 16px);
    max-height: 70vh;
    border-radius: 14px;
  }
  /* boční karty se na úzký displej nevejdou */
  .stack-side { display: none !important; }
  /* šipky přes okraje fotky, menší */
  .side-btn { width: 46px; height: 46px; opacity: 0.85; z-index: 12; }
  .side-btn svg { width: 22px; height: 22px; }
  .side-btn.prev, .side-btn.prev:hover { left: 6px; transform: translate(0, -50%); }
  .side-btn.next, .side-btn.next:hover { right: 6px; transform: translate(0, -50%); }
  .side-btn.prev:active, .side-btn.next:active { transform: translate(0, -50%) scale(0.92); }
}

/* TELEFON — tlačítka, okno výběru varianty a košík */
@media (max-width: 700px) {
  /* Zapamatovat / Přidat do objednávky vedle sebe, krátké popisky */
  #orderBar { display: flex; gap: 8px; padding: 0 8px; margin: 0 0 12px 0; }
  #orderBar .save-btn, #orderBar #orderBtn {
    flex: 1 1 0; min-width: 0; margin: 0;
    font-size: 16px; padding: 10px 8px; gap: 6px; border-radius: 12px;
  }
  .btn-long { display: none; }

  /* okna přes celou šířku telefonu */
  .modal-overlay { padding: 8px; }
  .modal-card { padding: 14px; border-radius: 14px; }
  .cart-card, #savedModal .modal-card, #orderModal .modal-card {
    width: 100% !important; max-width: 100% !important; height: 94vh; max-height: 94vh;
  }
  .modal-card h2 { font-size: 22px; }

  /* výběr varianty: malá hlavička, 2 dlaždice vedle sebe */
  .order-modal-head { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
  .order-modal-photo { width: 52px; height: 52px; }
  .order-modal-head-info h2 { font-size: 18px; text-align: left; margin: 0 0 2px 0; }
  .order-modal-close { width: 36px; height: 36px; }
  .frame-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .frame-picker-grid .frame-row { padding: 8px; gap: 6px; }
  .frame-picker-grid .frame-thumb { height: 90px; }
  .frame-picker-grid .frame-name { font-size: 14px; }
  .frame-picker-grid .qty-btn { width: 38px; height: 38px; font-size: 20px; }
  .frame-picker-grid .qty-num { min-width: 26px; font-size: 18px; }
  .frame-picker-grid .puck-toggle, .frame-picker-grid .digital-toggle,
  .frame-picker-grid .crop-toggle { font-size: 12px; padding: 5px 6px; }
  .orient-opt { font-size: 12px; padding: 4px 5px; }
  .order-modal-footer { gap: 8px; justify-content: space-between; }
  .order-modal-footer .btn-primary { padding: 12px 14px; font-size: 16px; }
  .order-modal-footer-total b { font-size: 20px; }

  /* košík: fotka + rámeček + počet nahoře, popis přes celou šířku pod nimi */
  .cart-head h2 { font-size: 22px; }
  .cart-list { max-height: none; }
  .cart-row { grid-template-columns: 64px 64px 1fr; gap: 8px; padding: 8px; }
  .cart-photo, .cart-frame-big { width: 64px; height: 64px; }
  .cart-frame-big.none svg { width: 32px; height: 32px; }
  .cart-qty { grid-column: 3; grid-row: 1; justify-self: end; }
  .cart-info { grid-column: 1 / -1; grid-row: 2; }
  .cart-footer { grid-template-columns: 1fr; }
  .cart-total-inline { text-align: center; }
}

/* TELEFON — galerie jako v mobilu: 3 čtverečky vedle sebe */
@media (max-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .grid img { height: auto; aspect-ratio: 1 / 1; border-radius: 4px; }
  .grid img.selected { outline: 3px solid var(--brand); outline-offset: -3px; }
}

/* === AKČNÍ (VÁNOČNÍ) POPUP — jednoduchý kreslený rámeček ve stylu webu === */
/* Okno je vždy celé dosažitelné: když je vyšší než obrazovka (mobil + nápověda), začíná nahoře
   a posouvá se celé překrytí; když se vejde, margin: auto u rámu ho vycentruje. */
.promo-overlay {
  position: fixed; inset: 0; z-index: 9800;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 16px 52px;
  background: rgba(2,64,137,0.55);
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  animation: promo-fade .25s ease-out;
}
.promo-overlay[hidden] { display: none; }
.promo-flakes { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.promo-flakes span {
  position: absolute; top: -12px; border-radius: 50%; background: #fff;
  animation: promo-snow linear infinite;
}
.promo-frame {
  position: relative; width: 100%; max-width: 420px; margin: auto; flex-shrink: 0;
  /* jednobarevný červený rám, uvnitř bílé; dvoubarevné pruhy má jen ukazatel ceny */
  background: #fff;
  border: 9px solid #1f6b3a;
  border-radius: 24px;
  box-shadow: 0 8px 0 rgba(0,0,0,.25);
  font-family: "HubbyBunny", Arial, sans-serif;
  animation: promo-pop .4s cubic-bezier(.2,1.4,.4,1);
}
/* Sníh na horní hraně rámu — kopíruje přesně vnější tvar rámu (stejný rádius 24 px), takže
   v rozích nevznikají mezery. Rám má 9px červený okraj; sníh pokryje jeho horních 5 px,
   nahoře má kopečky a dolů přes okraj stékají 3 kapky. Souřadnice jsou od vnitřní hrany
   rámu (top: 0 = 9 px pod vnější hranou). */
.promo-snow {
  position: absolute; left: -9px; right: -9px; top: -21px; height: 17px;
  z-index: 1; pointer-events: none;
  filter: drop-shadow(0 1.5px 0 rgba(0,0,0,.18));
}
.promo-snow::before {           /* poleva: stejný tvar jako vnější hrana rámu, oříznutá na 5 px */
  content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 30px;
  background: #fff; border-radius: 24px 24px 0 0;
  clip-path: inset(0 0 24px 0);
}
.promo-snow::after {            /* souvislá vlnitá vrstva sněhu — jen nad rovnou částí, ne nad zaoblením rohů */
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 14px;
  background:
    radial-gradient(circle at 1% 100%, #fff 0 9px, transparent 9.5px),
    radial-gradient(circle at 7% 100%, #fff 0 12px, transparent 12.5px),
    radial-gradient(circle at 13% 100%, #fff 0 10px, transparent 10.5px),
    radial-gradient(circle at 19% 100%, #fff 0 13px, transparent 13.5px),
    radial-gradient(circle at 25% 100%, #fff 0 9px, transparent 9.5px),
    radial-gradient(circle at 31% 100%, #fff 0 12px, transparent 12.5px),
    radial-gradient(circle at 37% 100%, #fff 0 14px, transparent 14.5px),
    radial-gradient(circle at 43% 100%, #fff 0 10px, transparent 10.5px),
    radial-gradient(circle at 49% 100%, #fff 0 12px, transparent 12.5px),
    radial-gradient(circle at 55% 100%, #fff 0 9px, transparent 9.5px),
    radial-gradient(circle at 61% 100%, #fff 0 13px, transparent 13.5px),
    radial-gradient(circle at 67% 100%, #fff 0 11px, transparent 11.5px),
    radial-gradient(circle at 73% 100%, #fff 0 14px, transparent 14.5px),
    radial-gradient(circle at 79% 100%, #fff 0 9px, transparent 9.5px),
    radial-gradient(circle at 85% 100%, #fff 0 12px, transparent 12.5px),
    radial-gradient(circle at 91% 100%, #fff 0 10px, transparent 10.5px),
    radial-gradient(circle at 97% 100%, #fff 0 11px, transparent 11.5px),
    radial-gradient(circle at 100% 100%, #fff 0 8px, transparent 8.5px);
}
.promo-snow i {                 /* kapky přes zbylý červený okraj */
  position: absolute; top: 15px; background: #fff; border-radius: 0 0 6px 6px;
}
.promo-snow i:nth-child(1) { left: 21%; width: 9px;  height: 9px; }
.promo-snow i:nth-child(2) { left: 54%; width: 12px; height: 11px; }
.promo-snow i:nth-child(3) { left: 79%; width: 8px;  height: 8px; }
.promo-holly {
  position: absolute; right: -16px; top: -28px; width: 78px; height: 60px;
  transform: rotate(12deg); pointer-events: none; z-index: 2; overflow: visible;
}
.promo-holly path, .promo-holly circle { stroke: var(--brand); stroke-width: 2.5; }
.promo-holly circle[r="2"] { stroke: none; }
.promo-snowman {
  position: absolute; left: -44px; bottom: -26px; width: 104px; height: 138px;
  pointer-events: none; z-index: 2; overflow: visible;
  transform-origin: 50% 100%;
  animation: promo-wobble 3.2s ease-in-out infinite;
}
/* sněhulák jako obrázek z omalovánky: bílé koule s modrým obrysem, bez stínování */
.promo-snowman circle[fill="#fff"] { stroke: var(--brand); stroke-width: 3; }
.promo-snowman path[stroke="#dbeaf6"], .promo-snowman ellipse { display: none; }
.promo-snowman path[fill="#c62828"], .promo-snowman path[fill="#b71c1c"], .promo-snowman path[fill="#f57c00"],
.promo-snowman rect { stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.promo-mat {
  position: relative;
  border-radius: 19px;
  padding: 30px 24px 22px 50px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 18%, var(--brand-light) 0 3px, transparent 4px),
    radial-gradient(circle at 90% 32%, var(--brand-light) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 86%, var(--brand-light) 0 3px, transparent 4px),
    radial-gradient(circle at 30% 72%, var(--brand-light) 0 2px, transparent 3px),
    #fff;
}
.promo-mat h2 {
  margin: 0 0 10px; font-size: 30px; line-height: 1.1;
  color: var(--brand); font-weight: normal;
}
.promo-img {
  margin: 4px auto 14px; width: 150px; height: 150px;
  background: #fff; border-radius: 14px; padding: 8px;
  border: 3px solid var(--brand-light);
  transform: rotate(-3deg);
}
.promo-img[hidden] { display: none; }
.promo-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.promo-text {
  margin: 0 0 14px; font-size: 18px; line-height: 1.35; color: var(--brand);
}
.promo-progress { margin: 0 0 18px; }
.promo-progress[hidden] { display: none; }
/* ukazatel ceny objednávky — červeno-bílo-zelené pruhy (vánoční lízátko) */
.promo-bar {
  height: 14px; border-radius: 999px; background: #e3edf6; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.promo-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: repeating-linear-gradient(135deg, #c62828 0 10px, #fff 10px 14px, #2a9147 14px 24px, #fff 24px 28px);
  transition: width .6s ease;
}
.promo-progress.done .promo-bar i { background: #2a9147; }
.promo-missing { margin-top: 6px; font-size: 15px; color: var(--brand); }
.promo-missing b { font-weight: normal; color: #c62828; }
.promo-progress.done .promo-missing b { color: #2a9147; }
.promo-ok {
  background: var(--brand); color: #fff;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 18px; font-weight: bold;
  border: none; border-radius: 14px;
  padding: 12px 28px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(2,64,137,.3);
}
.promo-ok:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(2,64,137,.3); }
.promo-close {
  position: absolute; top: 8px; right: 10px;
  width: 34px; height: 34px; border: none; background: transparent;
  font-size: 30px; line-height: 1; color: var(--brand); cursor: pointer;
}
@keyframes promo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes promo-pop { from { opacity: 0; transform: scale(.85) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes promo-snow {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(30px, 110vh, 0); }
}
@keyframes promo-wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@media (max-width: 520px) {
  .promo-snowman { left: -12px; bottom: -22px; width: 72px; height: 96px; }
  .promo-holly { right: -8px; top: -24px; width: 60px; height: 46px; }
  .promo-mat { padding: 26px 16px 18px 34px; }
  .promo-mat h2 { font-size: 25px; }
  .promo-img { width: 120px; height: 120px; }
  .promo-text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-overlay, .promo-frame, .promo-snowman, .promo-flakes span { animation: none; }
  .promo-flakes { display: none; }
}

/* --- Úvodní nápověda v okně (samostatně = obyčejný vzhled webu, s akcí = vánoční) --- */
.promo-overlay.with-guide .promo-frame { max-width: 540px; }
.promo-overlay.with-guide .promo-img { width: 110px; height: 110px; margin-bottom: 10px; }
.promo-overlay.plain .promo-snow,
.promo-overlay.plain .promo-holly,
.promo-overlay.plain .promo-snowman,
.promo-overlay.plain .promo-flakes { display: none; }
.promo-overlay.plain .promo-frame {
  border: 4px solid var(--brand); background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.promo-overlay.plain .promo-mat { padding: 28px 24px 22px; background: #fff; }
.promo-guide[hidden], .pg-sub[hidden], .promo-text[hidden] { display: none; }
.promo-guide { text-align: left; margin: 4px 0 18px; }
.pg-sub {
  text-align: center; color: var(--brand); font-size: 20px; margin: 4px 0 10px;
  padding-top: 14px; border-top: 3px dotted var(--brand-light);
}
.pg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pg-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--brand); font-size: 15px; line-height: 1.35; }
.pg-steps li b { display: block; font-size: 17px; font-weight: normal; margin-bottom: 1px; }
.pg-num {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.pg-steps li.pg-important {
  background: rgba(162,211,246,.35); border: 3px solid var(--brand-light);
  border-radius: 14px; padding: 10px 12px; margin: 0 -6px;
}
.pg-flag {
  display: inline-block; margin-bottom: 3px; padding: 1px 9px; border-radius: 999px;
  background: rgb(125,186,46); color: #fff; font-size: 12px; letter-spacing: .5px;
}
@media (max-width: 520px) {
  .promo-overlay.plain .promo-mat { padding: 24px 16px 18px; }
  .pg-steps li { font-size: 14px; }
  .pg-steps li b { font-size: 16px; }
}

/* === DÁREK ZDARMA v košíku (pravidlo free_frame) — vánočně vyplněný řádek === */
.cart-row.cart-gift {
  position: relative;
  border: 3px solid transparent;
  background:
    linear-gradient(#fffdf7, #fffdf7) padding-box,
    repeating-linear-gradient(135deg, #c62828 0 10px, #fff 10px 14px, #2a9147 14px 24px, #fff 24px 28px) border-box;
  background-image:
    radial-gradient(circle at 92% 20%, rgba(162,211,246,.45) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 75%, rgba(162,211,246,.4) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 30%, rgba(162,211,246,.35) 0 2px, transparent 3px),
    linear-gradient(180deg, #fff6f0 0%, #f1f8f2 100%),
    repeating-linear-gradient(135deg, #c62828 0 10px, #fff 10px 14px, #2a9147 14px 24px, #fff 24px 28px);
  background-origin: padding-box, padding-box, padding-box, padding-box, border-box;
  background-clip: padding-box, padding-box, padding-box, padding-box, border-box;
}
.gift-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.gift-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: #c62828; color: #fff; font-size: 13px; letter-spacing: 1px;
  box-shadow: 0 2px 0 #8e1b1b;
}
.gift-title { color: #1f7a3a; font-size: 15px; }
.gift-free { color: #c62828; }
.cart-gift .cart-price-line s { color: #999; }
.gift-file { font-size: 12px; color: #666; font-family: Arial, sans-serif; margin-top: 2px; }
.gift-warn { font-size: 13px; color: #c62828; font-family: Arial, sans-serif; margin-top: 4px; font-weight: bold; }
.gift-pick-btn {
  margin-top: 6px; padding: 7px 14px; border: none; border-radius: 999px; cursor: pointer;
  background: #2a9147; color: #fff; font-family: "HubbyBunny", Arial, sans-serif; font-size: 14px;
  box-shadow: 0 3px 0 #1b6a32;
}
.gift-pick-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b6a32; }
.cart-gift.gift-empty .gift-pick-btn { background: #c62828; box-shadow: 0 3px 0 #8e1b1b; animation: gift-pulse 1.6s ease-in-out infinite; }
.gift-photo { cursor: pointer; }
.gift-photo-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed #c62828; background: #fff; color: #c62828; border-radius: 8px;
  font-family: "HubbyBunny", Arial, sans-serif; font-size: 13px; line-height: 1;
}
.gift-photo-empty span { font-size: 30px; line-height: .9; }
@keyframes gift-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* výběr fotky do dárku — velké okno: mřížka náhledů, klik = zvětšení, teprve pak potvrzení */
#giftPickModal { z-index: 9100; }
#giftPickModal .gift-pick-card {
  width: 80vw; max-width: 1100px; height: 88vh; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.gift-pick-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; flex: 0 0 auto; }
.gift-pick-tabs[hidden] { display: none; }
.gift-pick-tabs button {
  padding: 6px 14px; border-radius: 999px; border: 2px solid var(--brand); background: #fff; color: var(--brand);
  font-family: "HubbyBunny", Arial, sans-serif; cursor: pointer;
}
.gift-pick-tabs button.active { background: var(--brand); color: #fff; }
.gift-pick-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-rows: max-content; align-content: start; gap: 10px; padding: 2px 4px 2px 2px;
}
.gift-pick-grid[hidden] { display: none; }
.gift-pick-item {
  display: block; width: 100%; padding: 0; cursor: pointer;
  border: 3px solid transparent; border-radius: 10px; background: #e8f1fa; overflow: hidden;
}
.gift-pick-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gift-pick-item:hover { border-color: var(--brand-light); }
.gift-pick-item.selected { border-color: rgb(125,186,46); }
.gift-pick-preview { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.gift-pick-preview[hidden] { display: none; }
.gpp-stage {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #e8f1fa; border-radius: 14px; overflow: hidden;
}
.gpp-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.gpp-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 34px; line-height: 1; padding-bottom: 4px;
  box-shadow: 0 4px 14px rgba(2,64,137,.3);
}
#giftPickPrev { left: 10px; }
#giftPickNext { right: 10px; }
.gpp-nav:disabled { opacity: .25; cursor: default; }
.gpp-name { text-align: center; color: var(--brand); font-size: 14px; flex: 0 0 auto; }
.gpp-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; flex: 0 0 auto; }
@media (max-width: 640px) {
  #giftPickModal .gift-pick-card { width: 100%; height: 92vh; max-height: 92vh; }
  .gift-pick-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gpp-actions button { flex: 1 1 auto; }
  .gpp-nav { width: 42px; height: 42px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .cart-gift.gift-empty .gift-pick-btn { animation: none; } }

/* =========================================
   MOBIL — výška podle skutečně viditelné plochy (dvh)
   Na telefonu „vh" počítá i s místem pod panelem prohlížeče (adresní řádek,
   spodní lišta), takže spodek oken byl schovaný. „dvh" = jen to, co je opravdu vidět.
   ========================================= */
@supports (height: 100dvh) {
  .modal-card { max-height: 90dvh; }
  .cart-card, #savedModal .modal-card, #orderModal .modal-card { max-height: 80dvh; height: 80dvh; }
  #giftPickModal .gift-pick-card { height: 88dvh; max-height: 88dvh; }
  .lightbox img { max-height: 95dvh; }
  @media (max-width: 700px) {
    .cart-card, #savedModal .modal-card, #orderModal .modal-card {
      height: calc(100dvh - 16px); max-height: calc(100dvh - 16px);
    }
  }
  @media (max-width: 640px) {
    #giftPickModal .gift-pick-card { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  }
}
/* bezpečný okraj pro iPhone (spodní „home" lišta) */
@media (max-width: 700px) {
  .modal-overlay { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* „Jen fotografie" — ceník po kusech a akční cena podle pravidla */
.photo-tiers { font-size: 13px; line-height: 1.35; color: var(--brand); margin-top: 6px; }
.photo-tiers.is-off { color: #8a99ad; text-decoration: line-through; font-size: 12px; }
.frame-price.photo-deal { color: #2a9147; font-size: 18px; }
.photo-deal-note { font-size: 12px; color: #2a9147; line-height: 1.3; }
.photo-deal-hint { font-size: 12px; color: #c62828; line-height: 1.3; margin-top: 4px; }
