/* Grawood 2.8 */
:root {
  --bg: #F4F5F0;
  --ink: #1F1A17;
  --muted: #4A4E47;
  --line: #D9DCD2;
  --accent: #2F5D46;
  --wood: #DCC29A;
  --wood-ink: #4A3A22;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, .logo, .price, .steps strong {
  font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  font-weight: 700;
}
h1 { margin: 0; font-size: 36px; line-height: 1.05; letter-spacing: -0.025em; }
h2 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; }
h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: #5B5F58; }

/* Hlavicka */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 26px; letter-spacing: -0.02em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { padding: 12px 10px; text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }
.nav .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 999px; }

/* Tlacitka */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #244A37; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-small { min-height: 44px; padding: 8px 18px; }
.btn-wide { width: 100%; }

/* Uvod */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; padding-top: 40px; padding-bottom: 48px; }
.hero-text { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-media { flex: 1 1 340px; min-width: 0; }
.hero-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 16px; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 18px; color: var(--muted); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Zastupny ramecek misto fotky */
.ph { display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; background: var(--wood); color: var(--wood-ink); font-size: 14px; font-weight: 600; }
.ph-hero { aspect-ratio: 5 / 4; border-radius: 16px; border: 1px dashed #8A6A3A; }

/* Nabidka */
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid #8E9388; background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; padding: 16px; }
.card-cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #5B5F58; }
.card-desc { font-size: 14px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.price { font-size: 20px; }

/* Jak objednat */
.steps-section { padding-top: 48px; padding-bottom: 48px; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 3px solid var(--accent); }
.steps strong { font-size: 22px; }
.steps span { color: var(--muted); }

/* Kontakt a formular */
.dark { background: var(--ink); color: var(--bg); padding: 48px 0 56px; }
.contact { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.contact-info { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-info p { color: #D5D8CE; max-width: 40ch; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.form { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 16px; background: #fff; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.field { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #8E9388; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 14px; border-radius: 8px; background: #EEF1E8; border: 1px solid #C9CFC0; }
.picked button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.msg { padding: 12px 14px; border-radius: 8px; font-weight: 500; }
.msg-ok { background: #E3EFE7; border: 1px solid #2F5D46; color: #1E3F2F; }
.msg-err { background: #F8E6E1; border: 1px solid #8A2B14; color: #6B2010; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Paticka */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }

/* Tlacitko Sprava v rohu */
.admin-corner { position: fixed; right: 16px; bottom: 16px; z-index: 10; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: #fff; opacity: 0.7; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.admin-corner:hover, .admin-corner:focus-visible { opacity: 1; }

/* Sprava webu */
.admin { max-width: 640px; padding-top: 40px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.admin .form { border: 1px solid var(--line); }
.admin h1 { font-size: 36px; }
.admin h2 { font-size: 22px; }
.admin-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.admin-info dt { color: var(--muted); }
.admin-info dd { margin: 0; font-weight: 600; }
.backups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.backups li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 8px; }
.backups form { margin: 0; }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

@media (min-width: 720px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  h1 { font-size: 56px; }
  h2 { font-size: 36px; }
  .hero { padding-top: 56px; padding-bottom: 64px; }
  .band { padding: 64px 0 72px; }
  .steps-section { padding-top: 64px; padding-bottom: 64px; }
  .dark { padding: 64px 0 72px; }
  .form { padding: 28px; }
}

/* ---------- verze 1.4: kosik, detail se vzory ---------- */
.price--ask { font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 600; white-space: nowrap; }
.field select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #8E9388; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.field input[type="file"] { min-height: 0; padding: 9px; border-style: dashed; }
.admin .field, .order-form .field, .modal .field { flex: 0 0 auto; }
.hint { font-size: 13px; color: #5B5F58; }
.btn-added, .btn-added:hover { background: #244A37; }

.cart-btn { background: transparent; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.cart-count { display: inline-block; min-width: 14px; margin-left: 2px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; text-align: center; }

.ovl { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow: auto; background: rgba(15, 13, 11, 0.6); }
.modal { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: #fff; color: var(--ink); }
.modal h2 { font-size: 26px; }
.modal h3 { font-size: 17px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.x { min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.x:hover { background: #EEF1E8; }

.d-img { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #EFE8DC; }
.d-img img { width: 100%; height: 100%; object-fit: contain; }
.d-ph { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.d-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.d-prev { left: 8px; }
.d-next { right: 8px; }
.qty-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.qty-wrap { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.qty { width: 84px; min-height: 46px; padding: 6px 10px; border: 1px solid #8E9388; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }

.cart-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row .nm { flex: 1 1 180px; min-width: 0; font-weight: 600; }
.cart-row .unit { display: block; font-size: 13px; font-weight: 400; color: #5B5F58; }
.cart-row .ln { min-width: 84px; text-align: right; font-weight: 600; white-space: nowrap; }
.cart-line, .cart-total { display: flex; justify-content: space-between; gap: 12px; }
.cart-line { color: var(--muted); }
.cart-total { padding-top: 4px; font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; font-size: 20px; font-weight: 700; }
.order-form { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.pay { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.pay legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.order-form .row .field { flex: 1 1 180px; }

.d-img--tall { aspect-ratio: 3 / 4; width: min(100%, 52vh); max-height: 70vh; margin: 0 auto; }

/* Hledani v hlavicce */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.hsearch { flex: 1 1 180px; min-width: 160px; max-width: 420px; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border: 1px solid #8E9388; border-radius: 999px; background: #fff; }
.hsearch:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(31, 26, 23, 0.15); }
.hsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); min-height: 44px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 761px) { .header-row { flex-wrap: nowrap; } .nav { flex-wrap: nowrap; flex-shrink: 0; } .nav a { white-space: nowrap; } }
@media (max-width: 760px) { .hsearch { order: 3; flex-basis: 100%; max-width: none; } .nav a:not(.pill) { display: none; } }

/* Vsechny vzory */
.vzory { padding-top: 48px; padding-bottom: 56px; scroll-margin-top: 84px; }
.sel { min-height: 44px; padding: 8px 12px; border: 1px solid #8E9388; border-radius: 8px; background: #fff; font: inherit; color: var(--ink); }
.vz-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.vz-filters { position: sticky; top: 84px; padding: 4px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.vz-filters summary { list-style: none; cursor: pointer; padding: 12px 0; font-weight: 600; }
.vz-filters summary::-webkit-details-marker { display: none; }
.vz-h { margin: 12px 0 4px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #5B5F58; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.chk span { flex: 1; }
.chk em { font-style: normal; font-size: 13px; color: #5B5F58; }
.linklike { margin-top: 10px; padding: 8px 0; border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; color: var(--ink); }
.vz-main { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.vz-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.vz-tile { display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vz-tile:hover { border-color: var(--ink); }
.vz-tile img, .vz-ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: #EFE8DC; }
.vz-ph { display: block; }
.vz-name { padding: 6px 10px 0; font-weight: 600; font-size: 14px; line-height: 1.25; }
.vz-meta { padding: 0 10px; font-size: 13px; color: var(--muted); }
.vz-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 8px 0; }
@media (max-width: 800px) {
  .vz-layout { grid-template-columns: 1fr; }
  .vz-filters { position: static; }
  .vz-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
}

.hero-text h1 { font-size: clamp(30px, 4.5vw, 44px); }
.hero { padding-top: 28px; padding-bottom: 32px; }

/* ===== Navrhar vlastni ozdoby (2.2) ===== */
.gen-promo { background: #EFE6D2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gen-promo-in { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 56px; padding-top: 48px; padding-bottom: 52px; }
.gen-promo-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gen-promo-text .lead { max-width: 52ch; color: #3F433C; }
.gen-promo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 18px; font-weight: 500; }
.gen-promo-list li { position: relative; padding-left: 22px; }
.gen-promo-list li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.gen-promo-media { flex: 1 1 340px; min-width: 0; }
.gen-promo-media img { width: 100%; border-radius: 16px; box-shadow: 0 10px 30px rgba(40, 25, 10, 0.25); }

.gen-ovl { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.gen-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.gen-title { font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; font-size: 20px; letter-spacing: -0.01em; }
.gen-sp { flex: 1; }
.gbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 4px 8px; border: 1px solid #B9BDB1; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.gbtn:hover:not(:disabled) { border-color: var(--ink); }
.gbtn:disabled { opacity: 0.35; cursor: default; }
.gbtn-t { padding: 6px 12px; font-size: 14px; font-weight: 500; }

.gen-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr) 328px; }
.gen-left, .gen-right { min-height: 0; overflow-y: auto; background: #fff; }
.gen-left { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.gen-right { border-left: 1px solid var(--line); }
.gen-right .gpane { padding: 12px; border-bottom: 1px solid var(--line); }
.gen-center { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.gen-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.gen-stage canvas { display: block; border-radius: 12px; border: 1px solid var(--line); background: #EFE9DC; touch-action: none; user-select: none; -webkit-user-select: none; }
.gen-cvw { position: relative; line-height: 0; }
.gen-zoom { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(40, 25, 10, 0.2); line-height: 1; }
.gen-zoom .gbtn { min-width: 34px; min-height: 34px; padding: 2px 6px; font-size: 18px; }
.gen-zoom .gbtn-t { min-width: 56px; font-size: 13px; }
.gen-tip { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.g-btns0 { margin-top: 0; }
.gen-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, 90%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 24px rgba(40, 25, 10, 0.18); }
.gen-empty strong { font-family: "Bricolage Grotesque", Inter, sans-serif; font-size: 22px; }
.gen-empty span { color: var(--muted); font-size: 14px; }
.gen-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-top: 6px; }
.gen-toast { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: 92%; padding: 10px 14px; border-radius: 10px; background: rgba(31, 26, 23, 0.92); color: #fff; font-size: 14px; text-align: center; pointer-events: none; }
.gen-status { min-height: 24px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 14px; }
.gs-warn { color: #7A4B00; }
.gs-note { color: #A3295A; }
.gs-fix { font: inherit; font-weight: 600; margin-left: 6px; padding: 2px 10px; border-radius: 6px; border: 1px solid #A3295A; background: #fff; color: #A3295A; cursor: pointer; }
.gs-fix:hover { background: #A3295A; color: #fff; }
.gs-bad { color: #B3261E; font-weight: 600; }

.g-tabs, .seg { display: flex; border: 1px solid #B9BDB1; border-radius: 10px; overflow: hidden; background: #fff; }
.g-tabs button, .seg button { flex: 1; min-height: 40px; padding: 6px 8px; border: 0; border-right: 1px solid #B9BDB1; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.g-tabs button:last-child, .seg button:last-child { border-right: 0; }
.g-tabs button.is-on, .seg button.is-on { background: var(--ink); color: #fff; }
.g-addmode { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.g-addmode .seg { flex: 1; }
.g-lib { display: flex; flex-direction: column; gap: 10px; }
.g-lh { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #5B5F58; }
.g-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 76px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; line-height: 1.2; text-align: center; cursor: pointer; }
.g-item:hover { border-color: var(--accent); background: #F4F8F5; }
.g-item span { overflow-wrap: anywhere; }
.g-th { width: 44px; height: 44px; }
#g-libtabs button { padding: 6px 3px; font-size: 13px; }
.g-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-pitem { min-height: 0; padding: 6px 6px 8px; }
.g-pimg { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; background: #F1E9DA; }
.g-icnote { margin: 0; }
.gen-or { margin-top: 10px; font-size: 13px; color: #5B6158; }
.g-search, .gen-ovl input[type=text], .gen-ovl input[type=number], .gen-ovl input[type=search] { width: 100%; min-height: 42px; padding: 6px 10px; border: 1px solid #8E9388; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.gen-ovl select.sel { width: 100%; }
.g-l { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
.g-h { margin: 0 0 8px; font-size: 15px; }
.gen-ovl input[type=range] { width: 100%; accent-color: var(--accent); }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.g-modehint { margin-top: 6px; }
.gen-prev canvas { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); }
.gen-prev .chk { margin-top: 6px; font-size: 13px; }
.g-layers { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; max-height: 190px; overflow-y: auto; }
.g-layer { display: flex; align-items: center; gap: 4px; }
.g-layer .gbtn { min-width: 34px; min-height: 34px; font-size: 13px; }
.gl-main { flex: 1; min-width: 0; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.g-layer.is-on .gl-main { border-color: #1F6FEB; background: #EEF4FE; }
.g-layer.is-off .gl-main { opacity: 0.5; }
.gl-mode { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; }
.gm-cut { background: #B3261E; }
.gm-base { background: #2F5D46; }
.gm-engrave { background: #6B4423; }
.gm-hole { background: #5B5F58; }
.gm-both { background: var(--accent); }

.gen-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fff; }
.gen-price { display: flex; flex-direction: column; min-width: 0; }
.gp-total { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 700; font-size: 28px; line-height: 1.1; }
.gp-line { font-size: 13px; }
.gen-bar .btn:disabled { opacity: 0.45; cursor: default; }
.gen-mtabs { display: none; }

.cart-row--dz .dz-th { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.cart-row--dz .linklike { margin: 0; padding: 0; font-size: 13px; }

@media (max-width: 1080px) {
  .gen-body { grid-template-columns: 236px minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .gen-body { display: flex; flex-direction: column; }
  .gen-top { padding: 4px 6px 4px 12px; }
  .gen-title { white-space: nowrap; }
  .gen-center { flex: 0 0 auto; height: min(100vw, 38vh); padding: 6px 8px 0; }
  .gen-toast { bottom: 6px; padding: 6px 10px; font-size: 12.5px; max-width: 96%; }
  .gen-empty { padding: 10px; }
  .gen-empty strong { font-size: 18px; }
  .gen-status { font-size: 13px; min-height: 18px; }
  .gen-tip { display: none; }
  .gen-zoom { right: 6px; top: 6px; padding: 3px; gap: 3px; }
  .gen-zoom .gbtn { min-width: 32px; min-height: 32px; }
  .gen-zoom .gbtn-t { min-width: 50px; }
  .gen-left, .gen-right { flex: 1 1 0; border: 0; min-height: 0; padding: 0; }
  .gen-left { padding: 10px 12px; }
  .gen-right { display: flex; flex-direction: column; }
  .gen-right .gpane { border-bottom: 0; }
  .gen-body[data-tab="add"] .gen-right, .gen-body:not([data-tab="add"]) .gen-left { display: none; }
  .gen-body[data-tab="layers"] .gpane[data-pane="props"], .gen-body[data-tab="layers"] .gpane[data-pane="prev"],
  .gen-body[data-tab="props"] .gpane[data-pane="layers"], .gen-body[data-tab="props"] .gpane[data-pane="prev"],
  .gen-body[data-tab="prev"] .gpane[data-pane="layers"], .gen-body[data-tab="prev"] .gpane[data-pane="props"] { display: none; }
  .gen-prev canvas { max-width: 340px; margin: 0 auto; }
  .gen-mtabs { display: flex; border-top: 1px solid var(--line); background: #fff; }
  .gen-mtabs button { flex: 1; min-height: 46px; border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .gen-mtabs button:last-child { border-right: 0; }
  .gen-mtabs button.is-on { background: var(--ink); color: #fff; }
  .gen-bar { padding: 8px 12px; }
  .gp-total { font-size: 24px; }
  .g-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gen-or, #g-empty-pre { display: none; }
}
@media (max-width: 520px) {
  .gen-title { font-size: 16px; }
  .gbtn-t { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gen-left > * { flex-shrink: 0; }

/* ---------- verze 2.5: prehled objednavek ve sprave ---------- */
.admin--wide { max-width: 980px; }
.btn-danger { border-color: #8A2B14; color: #8A2B14; background: #fff; }
.btn-danger:hover { background: #8A2B14; color: #fff; }

.adm-tabs { display: flex; flex-wrap: wrap; gap: 4px 8px; border-bottom: 2px solid var(--line); margin-top: -8px; }
.adm-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; font-weight: 600; text-decoration: none; color: var(--muted); }
.adm-tabs a:hover { color: var(--ink); }
.adm-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.adm-badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #B3261E; color: #fff; font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; }
.adm-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 20px; text-align: center; }

.adm-sum p { margin: 0; }
.adm-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 1px solid #8E9388; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on span { color: #D9DCD2; }
.adm-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.adm-search input[type="search"] { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid #8E9388; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.adm-empty { padding: 28px 18px; border: 1px dashed #8E9388; border-radius: 12px; background: #fff; text-align: center; color: var(--muted); margin: 0; }
.adm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }

/* karta objednavky */
details.ord { background: #fff; border: 1px solid var(--line); border-left: 5px solid #8E9388; border-radius: 12px; }
details.ord.st-nova { border-left-color: #C77700; }
details.ord.st-vyroba { border-left-color: var(--accent); }
details.ord.st-odeslano { border-left-color: #8E9388; }
details.ord.st-zruseno { border-left-color: #B3261E; opacity: 0.8; }
details.ord[open] { box-shadow: 0 2px 10px rgba(31, 26, 23, 0.08); }
details.ord + details.ord, .admin details.ord { scroll-margin-top: 12px; }
.ord > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 56px; padding: 12px 16px; cursor: pointer; }
.ord > summary::-webkit-details-marker { display: none; }
.ord > summary::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; }
.ord[open] > summary::before { transform: rotate(45deg); }
.ord > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 10px; }
.ord-num { flex: 0 0 auto; font-weight: 700; color: var(--muted); min-width: 34px; }
.ord-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.ord-name { font-size: 17px; }
.ord-meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.ord-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid #8E9388; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag-dz { background: var(--wood); border-color: #B79A6A; color: var(--wood-ink); }
.tag-ok { background: #E3EFE7; border-color: #2F5D46; color: #1E3F2F; }
.tag-wait { background: #FFF1D6; border-color: #C77700; color: #6B4400; }
.tag-bad { background: #F8E6E1; border-color: #8A2B14; color: #6B2010; }
.tag-st { background: var(--ink); border-color: var(--ink); color: #fff; }
.ord-sum { flex: 0 0 auto; margin-left: auto; font-weight: 700; white-space: nowrap; }

.ord-body { padding: 4px 16px 18px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--line); }
.ord-body h4 { margin: 14px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ord-chk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 14px; }
.ord-chk .muted { margin: 0; }
.ord-designs { padding: 2px 14px 12px; border-radius: 10px; background: #FBF6EC; border: 1px solid #E5D5B5; }
.ord-designs .small { margin: 10px 0 0; color: #4A3A22; }
.dz-card { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 10px 0; }
.dz-card + .dz-card { border-top: 1px solid #E5D5B5; }
.dz-img { display: block; width: 96px; height: 96px; object-fit: contain; border-radius: 8px; border: 1px solid #B79A6A; background: var(--wood); }
.dz-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dz-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.ord-cols { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
.ord-items { list-style: none; margin: 0; padding: 0; }
.ord-items li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ord-items li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ord-items .ord-extra { color: var(--muted); font-size: 14px; }
.ord-items .ord-total { border-bottom: 0; font-weight: 700; font-size: 17px; }
.ord-dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; margin: 0; }
.ord-dl dt { color: var(--muted); font-size: 14px; }
.ord-dl dd { margin: 0; overflow-wrap: anywhere; }

.ord-actions { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.ord-actions .field { flex: 0 0 auto; }
.ord-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ord-actions .small { margin: 0; }

.inq { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.inq header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.inq p { margin: 8px 0 0; overflow-wrap: anywhere; }

@media (min-width: 720px) {
  .ord-cols { grid-template-columns: 1fr 1fr; }
  .ord > summary { padding: 12px 18px; }
  .ord-body { padding: 4px 18px 20px; }
}
@media (max-width: 560px) {
  .adm-tabs { gap: 0 2px; }
  .adm-tabs a { padding: 10px 8px; font-size: 15px; gap: 6px; }
  .ord-sum { margin-left: 0; }
  .ord-dl { grid-template-columns: 1fr; gap: 0; }
  .ord-dl dt { margin-top: 8px; }
  .ord-btns .btn { flex: 1 1 100%; }
  .dz-btns .btn { flex: 1 1 100%; }
}
/* Faktura u objednavky ve sprave */
.ord-inv { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FAFAF6; }
.ord-inv h4 { margin: 0 0 6px; }
.ord-inv p { margin: 4px 0; }
.ord-inv-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px !important; }
.ord-inv-form { margin-top: 8px; }
/* Faktura po objednavce */
.inv-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.inv-qr { width: 190px; height: 190px; flex: none; }
.inv-qr svg { width: 100%; height: 100%; display: block; }
.inv-info { flex: 1 1 240px; min-width: 0; }
.inv-info h2 { margin: 0 0 8px; font-size: 1.15rem; }
.inv-info dl { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.inv-info dt { color: var(--muted); }
.inv-info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.inv-links { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .inv-qr { margin: 0 auto; } }
@media print {
  .adm-tabs, .adm-filter, .ord-actions, .admin-top a { display: none; }
  details.ord { break-inside: avoid; }
}

/* Vyber pisma s nahledem (navrhar) */
.g-lhint { font-weight: 400; color: #5B6158; font-size: 12px; }
.fp { position: relative; }
.fp-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; min-height: 52px; padding: 6px 34px 6px 12px; border: 1px solid #8E9388; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.fp-btn:hover { border-color: var(--ink); }
.fp-cur { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 23px; line-height: 1.3; }
.fp-name { display: block; font-size: 11.5px; line-height: 1.3; color: #5B6158; font-family: inherit; font-weight: 400; }
.fp-arr { position: absolute; right: 13px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #4B5148; border-bottom: 2px solid #4B5148; transform: translateY(-70%) rotate(45deg); }
.fp.is-open .fp-arr { transform: translateY(-30%) rotate(-135deg); }
.fp-list { position: fixed; z-index: 2000; overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #8E9388; border-radius: 10px; box-shadow: 0 12px 32px rgba(31, 26, 23, 0.25); }
.fp-list[hidden] { display: none; }
.fp-row { display: block; width: 100%; padding: 8px 12px 7px; border: 0; border-bottom: 1px solid #ECEEE9; background: #fff; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.fp-row:last-child { border-bottom: 0; }
.fp-row:hover, .fp-row:focus-visible { background: #F1F4EE; }
.fp-row.is-on { background: #E3EDE6; }
.fp-s { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 25px; line-height: 1.35; color: #1B1612; }
.fp-n { display: block; font-size: 11px; line-height: 1.3; color: #5B6158; font-family: inherit; font-weight: 400; }
.fp-pan { margin-top: 8px; padding: 8px 10px; border: 1px solid #E3DAC6; border-radius: 8px; background: #FBF7EE; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; color: #3A2A16; }
.g-mfilter { margin: 8px 0; }
.gm-weld { background: #1F6F8B; }
.fp-gh { position: sticky; top: 0; z-index: 1; padding: 8px 12px 6px; background: #F3F0E8; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.fp-gh span { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #5B5F58; }
/* Vyroba: databaze SVG a slouceni objednavek */
.ord-vyroba { padding: 2px 14px 12px; border-radius: 10px; background: #EEF4F0; border: 1px solid #B9D0C1; }
.ord-vyroba .vy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.ord-vyroba .small { margin: 8px 0 0; }
.vy-form { flex: 0 0 auto; width: 100%; max-width: 760px; margin: 18px 0; box-sizing: border-box; }
.vy-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vy-orders li { border-bottom: 1px solid var(--line); }
.vy-orders label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; min-height: 44px; cursor: pointer; }
.vy-orders input { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; }
.vy-h { margin: 26px 0 10px; }
.vy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.vy-var { margin-left: 22px; background: #FAFAF6; }
.vy-name { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vy-key { font-size: 12px; color: #5B6158; overflow-wrap: anywhere; }
.vy-thumb { flex: 0 0 64px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: var(--wood); overflow: hidden; }
.vy-thumb img { display: block; width: 64px; height: 64px; object-fit: contain; }
.vy-none { border-style: dashed; background: #fff; }
.vy-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 320px; }
.vy-act input[type=file] { flex: 1 1 180px; min-width: 0; max-width: 100%; }
@media (max-width: 560px) {
  .vy-var { margin-left: 8px; }
  .vy-act .btn { flex: 1 1 100%; }
}
