/* Obsidia Shop — KOMPONENTY šablony (Apple styl).
   VŠECHNY barvy/tvary/typo jdou z tokens.css (design systém) — tady jen var(--…).
   Pořadí v <head>: tokens.css  →  shop.css. Rebrand = tokens.css / data-theme / config.php. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.shop { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font);
  font-size: 17px; line-height: 1.47; letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
:root { --wrap-pad: clamp(1.2rem, 4vw, 2.4rem); }
.wrap { max-width: var(--shop-maxw); margin: 0 auto; padding: 0 var(--wrap-pad); }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { letter-spacing: -0.025em; font-weight: 600; }

/* ---------- header (frosted, Apple-clean) ---------- */
.shop-nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline-soft); }
.shop-nav-in { max-width: var(--shop-maxw); margin: 0 auto; min-height: 52px; display: flex; align-items: center; gap: 1.4rem; padding: 0 clamp(1.2rem, 4vw, 2.4rem); }
.shop-brand { font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.92rem; color: var(--ink); }
.shop-nav-links { display: flex; gap: 1.6rem; margin-left: 0.5rem; }
.shop-nav-links a { color: var(--ink); font-size: 0.86rem; letter-spacing: -0.01em; opacity: 0.82; transition: opacity 0.2s; }
.shop-nav-links a:hover, .shop-nav-links a[aria-current] { opacity: 1; }
.shop-nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; background: none; border: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background 0.2s, transform 0.12s; }
.icon-btn:hover { background: var(--hairline-soft); } .icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cart-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 0.64rem/17px var(--font); text-align: center; padding: 0 4px; letter-spacing: 0; }
.cart-count[data-n="0"] { display: none; }
.nav-burger { display: none; width: 44px; height: 44px; background: none; border: none; cursor: pointer; align-items: center; justify-content: center; }
.nav-burger svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 1.6; fill: none; }
.shop-mobile { display: none; position: fixed; inset: 52px 0 0; z-index: 49; background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 1.4rem clamp(1.2rem, 6vw, 2rem); overflow-y: auto; }
.shop-mobile.open { display: block; }
.shop-mobile a { display: flex; align-items: center; gap: 0.95rem; color: var(--ink); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; padding: 0.75rem 0; border-bottom: 1px solid var(--hairline-soft); }
.shop-mobile a svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shop-mobile-sep { height: 0.4rem; }

/* ---------- hero (vzdušný, minimální) ---------- */
.hero { padding: clamp(4.5rem, 15vw, 10rem) 0 clamp(3.5rem, 9vw, 7rem); max-width: var(--content-maxw); margin: 0 auto; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 1.3rem; }
.hero p { color: var(--ink-2); font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.35; font-weight: 400; letter-spacing: -0.01em; max-width: 34ch; margin: 0 0 2.4rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.2rem; font-weight: 600; }
/* akce v heru je tichá — jen text se šipkou, žádný nápadný blok */
.hero .btn { padding: 0; min-height: 0; background: none; border: none; color: var(--ink); font-size: 1.05rem; gap: 0.5rem; }
.hero .btn::after { content: "→"; transition: transform 0.25s var(--ease); }
.hero .btn:hover::after { transform: translateX(4px); }
.hero .btn:hover { background: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.45rem; border-radius: var(--radius-pill); padding: 0.7rem 1.4rem; font-size: 1rem; font-weight: 400; font-family: inherit; letter-spacing: -0.01em; line-height: 1; cursor: pointer; border: 1px solid transparent; transition: transform 0.14s var(--ease), background 0.2s, opacity 0.2s; min-height: 44px; box-sizing: border-box; }
.btn:active { transform: scale(0.95); }
.btn:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; }
.btn-primary, .btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover, .btn-accent:hover { background: color-mix(in srgb, var(--accent) 86%, black); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.4; cursor: default; }

/* ---------- category strip: v minimalistickém režimu skryté ----------
   Přehled kategorií obstarává vyjíždějící karta z doku („Prohlížet"),
   plocha stránek tak zůstává čistá. */
.cat-strip { display: none; }
.cat-pill { padding: 0.5rem 1.05rem; border: 1px solid var(--hairline); border-radius: var(--radius-pill); font-size: 0.9rem; color: var(--ink); letter-spacing: -0.01em; transition: background 0.2s, border-color 0.2s; }
.cat-pill:hover { background: var(--parchment); }
.cat-pill[aria-current] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

/* ---------- section heads (tiché, hodně prostoru) ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 2.2rem; }
.sec-head h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.sec-head a { color: var(--ink-3); font-size: 0.9rem; }

/* ---------- výloha: bezrámečkové karty plovoucí na bílé ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(2rem, 4vw, 3.4rem) clamp(1.6rem, 3vw, 2.6rem); }
.prod-card { color: inherit; display: flex; flex-direction: column; background: none; border: none; border-radius: 0; padding: 0; transition: transform 0.3s var(--ease); }
.ph { aspect-ratio: 1/1; border-radius: var(--radius-lg); position: relative; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--ph-1), var(--ph-2)); transition: transform 0.3s var(--ease); }
.prod-card:hover .ph { transform: translateY(-6px); }
.ph .glyph { width: 40%; opacity: 0.92; filter: drop-shadow(var(--shadow-product)); transition: transform 0.45s var(--ease); }
.prod-card:hover .ph .glyph { transform: scale(1.05) translateY(-2px); }
.ph::after { display: none; }                 /* štítek kategorie na dlaždici pryč — čistota */
.prod-meta { padding: 1rem 0.2rem 0; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; gap: 0.35rem; }
.prod-meta h3 { font-size: 1rem; font-weight: 500; margin: 0; letter-spacing: -0.02em; }
.prod-grid .prod-meta .sub { display: none; }   /* na výloze jen název + cena */
.price { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2); margin-top: 0; }
.price .cur { color: var(--ink-3); font-weight: 400; font-size: 0.85em; margin-left: 0.15rem; }

/* ---------- product detail (vizuál dominuje; na mobilu „obrazovka
   produktu": celoplošný vizuál, přes který vyjede zaoblený panel) ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.4rem, 6vw, 5rem); align-items: start; padding: clamp(1.5rem, 4vw, 3rem) 0 4rem; max-width: var(--shop-maxw); margin: 0 auto; }
@media (min-width: 834px) { .pd-hero { position: sticky; top: 84px; } .pd-buy { margin-bottom: 1.6rem; } }
.pd .ph { aspect-ratio: 1/1; border-radius: var(--radius-lg); }
.pd .ph .glyph { width: 46%; }
.pd-cat { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.8rem; font-weight: 500; }
.pd-info h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.035em; font-weight: 600; margin: 0 0 0.5rem; line-height: 1.06; }
.pd-info .sub { color: var(--ink-3); font-size: 1.15rem; margin: 0 0 1.8rem; letter-spacing: -0.01em; font-weight: 400; }
.pd-price { font-size: 1.6rem; font-weight: 500; margin: 0 0 2rem; letter-spacing: -0.02em; }
.pd-desc { color: var(--ink-2); line-height: 1.65; margin: 0 0 2rem; }
.pd-buy { display: flex; gap: 0.7rem; align-items: center; margin: 0 0 1.2rem; flex-wrap: wrap; }
.pd-buy-price { display: none; }              /* cena se ukazuje jen v plovoucí pilulce na mobilu */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-pill); min-height: 48px; }
.qty button { width: 44px; height: 48px; background: none; border: none; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qty span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.pd-buy .btn-primary { min-height: 48px; padding: 0.7rem 1.8rem; }
.badge { display: inline-flex; align-items: center; font-size: 0.86rem; color: var(--ink-3); }

@media (max-width: 833px) {
  /* záhlaví se položí průhledně přes vizuál */
  .pd-view .shop-nav { position: absolute; left: 0; right: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: none; }
  .pd-view .crumbs { display: none; }

  .pd { display: block; padding: 0 0 6.5rem; margin: 0 calc(-1 * var(--wrap-pad)); }

  /* celoplošný vizuál od horní hrany displeje */
  .pd-hero { position: relative; }
  .pd-hero .ph { aspect-ratio: auto; height: 62dvh; border-radius: 0; }
  .pd-back { position: absolute; left: 14px; top: calc(var(--safe-t) + 60px); z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    color: var(--ink); box-shadow: var(--elev-1); }
  .pd-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .pd-hero .ph .glyph { width: 38%; }

  /* zaoblený panel vyjíždí přes spodní hranu vizuálu */
  .pd-info { position: relative; z-index: 2; margin-top: calc(-1 * var(--sheet-radius));
    background: var(--canvas); border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    padding: 2rem clamp(1.3rem, 6vw, 2rem) 0.5rem; text-align: center; }
  .pd-info::before { content: ""; position: absolute; top: 0.65rem; left: 50%; transform: translateX(-50%);
    width: 38px; height: 5px; border-radius: 999px; background: var(--hairline); }
  .pd-info h1 { font-size: clamp(2.1rem, 9vw, 2.7rem); }
  .pd-info .sub { margin-bottom: 1.2rem; }
  .pd-price { font-size: 1.15rem; font-weight: 500; color: var(--ink-2); margin-bottom: 1.6rem; }
  .pd-desc { text-align: left; max-width: 34rem; margin-left: auto; margin-right: auto; }
  .specs { max-width: 34rem; margin-left: auto; margin-right: auto; text-align: left; }

  /* nákup zůstává v textu pod parametry — nic nepřekrývá popis */
  .pd-buy { max-width: 34rem; margin-left: auto; margin-right: auto; justify-content: center; }
  .pd-buy .btn-primary { flex: 1; justify-content: center; }
}

/* ---------- cart ---------- */
.cart-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--hairline-soft); }
.cart-row .ph { aspect-ratio: 1; border-radius: var(--radius-sm); }
.cart-row h4 { margin: 0 0 0.15rem; font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.cart-row .rm { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 0.84rem; text-decoration: underline; padding: 0; }
.cart-summary { margin-top: 1.8rem; padding: 1.6rem; border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--parchment); max-width: 400px; margin-left: auto; }
.cart-line { display: flex; justify-content: space-between; padding: 0.4rem 0; color: var(--ink-2); }
.cart-line.total { color: var(--ink); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; border-top: 1px solid var(--hairline); margin-top: 0.5rem; padding-top: 0.9rem; }
.empty { text-align: center; color: var(--ink-3); padding: 4rem 1rem; }

/* ---------- crumbs + footer ---------- */
.crumbs { font-size: 0.84rem; color: var(--ink-3); padding: 1.2rem 0 0.4rem; }
.crumbs a { color: var(--ink-3); } .crumbs a:hover { color: var(--ink); } .crumbs .sep { margin: 0 0.4rem; opacity: 0.5; }
.shop-foot { background: var(--parchment); border-top: 1px solid var(--hairline-soft); margin-top: clamp(4rem, 9vw, 7rem); padding: 2.8rem 0; color: var(--ink-3); font-size: 0.85rem; }
.shop-foot-in { max-width: var(--shop-maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.4rem); display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; }
.shop-foot a { color: var(--ink-2); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--ink); color: var(--canvas); padding: 0.7rem 1.3rem; border-radius: var(--radius-pill); font-size: 0.9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- AI asistent ---------- */
.ai-fab { position: fixed; right: 26px; bottom: 26px; z-index: 70; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--accent); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); transition: transform 0.15s var(--ease); }
.ai-fab:hover { transform: scale(1.06); } .ai-fab:active { transform: scale(0.92); }
.ai-fab svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.ai-ph svg { width: 18px; height: 18px; fill: var(--accent); stroke: none; flex: none; }
.ai-panel { position: fixed; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px)); z-index: 75; display: none; flex-direction: column; background: var(--canvas); border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22); }
.ai-panel.open { display: flex; }
.ai-ph { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--hairline-soft); }
.ai-ph b { font-size: 0.95rem; letter-spacing: -0.01em; } .ai-ph .x { margin-left: auto; background: none; border: none; color: var(--ink-3); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.ai-thread { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.ai-msg { max-width: 90%; font-size: 0.95rem; line-height: 1.45; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 5px 18px; padding: 0.55rem 0.9rem; }
.ai-msg.bot { align-self: flex-start; background: var(--parchment); border-radius: 18px 18px 18px 5px; padding: 0.55rem 0.9rem; }
.ai-recs { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.ai-rec { display: flex; gap: 0.6rem; align-items: center; color: var(--ink); border: 1px solid var(--hairline); border-radius: 12px; padding: 0.4rem; background: var(--canvas); }
.ai-rec .ph { width: 44px; aspect-ratio: 1; border-radius: 8px; flex: none; }
.ai-rec .ph .glyph { width: 50%; }
.ai-rec .t { font-size: 0.86rem; font-weight: 600; letter-spacing: -0.01em; } .ai-rec .p { font-size: 0.82rem; color: var(--ink-3); }
.ai-comp { border-top: 1px solid var(--hairline-soft); padding: 0.7rem; display: flex; gap: 0.5rem; }
.ai-comp input { flex: 1; background: var(--parchment); border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 0.6rem 1rem; color: var(--ink); font: 400 0.95rem var(--font); outline: none; min-height: 44px; }
.ai-comp input:focus { border-color: var(--accent); }
.ai-comp button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; flex: none; }

/* =====================================================================
   RESPONZIVITA (breakpointy dle Apple specifikace)
   ===================================================================== */
/* tablet landscape a níž: horní odkazy schová dok (viz APP SHELL) */
@media (max-width: 833px) {
  .shop-nav-links { display: none; }
  .nav-cart { display: none; }               /* košík je ve spodním doku */
  .nav-burger { display: none; }
  .shop-mobile { display: none !important; } /* starý fullscreen hamburger nahrazuje dok */
  .pd { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1.2rem; }
}
/* phone: dvousloupcová výloha jako v nákupní appce, těsnější rytmus */
@media (max-width: 640px) {
  body.shop { font-size: 16px; }
  .cart-summary { max-width: none; margin-left: 0; }
  .cart-row { grid-template-columns: 60px 1fr; }
  .cart-row > div:last-child { grid-column: 2; text-align: left; }
  .shop-foot-in { flex-direction: column; }
}
/* small phone */
@media (max-width: 419px) {
  .hero h1 { font-size: 1.85rem; }
  .hero { padding-top: 1.4rem; }
  .cat-pill { font-size: 0.84rem; padding: 0.45rem 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .prod-card:hover { transform: none; }
}

/* ---------- „mohlo by se hodit" = menší/decentnější karty ---------- */
.rel-head h2 { font-size: 1.15rem; }
.rel { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
.rel .prod-card { padding: 0.7rem; }
.rel .prod-meta { padding: 0.6rem 0.1rem 0; }
.rel .prod-meta h3 { font-size: 0.9rem; }
.rel .prod-meta .sub { display: none; }
.rel .price { font-size: 0.9rem; }
@media (max-width: 640px) { .rel { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

/* ---------- admin (F2, bez plateb) ---------- */
.adm-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1.2rem; }
.adm-bar .sp { margin-left: auto; }
.adm-tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--hairline); margin: 0 0 1.4rem; flex-wrap: wrap; }
.adm-tab { background: none; border: none; padding: 0.7rem 1rem; font: 600 0.95rem var(--font); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; }
.adm-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.adm-prod { display: grid; grid-template-columns: 48px 1fr auto auto auto; gap: 0.9rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--hairline-soft); }
.adm-prod .ph { aspect-ratio: 1; border-radius: 8px; }
.adm-prod h4 { margin: 0; font-size: 0.96rem; font-weight: 600; letter-spacing: -0.01em; }
.adm-prod .meta { color: var(--ink-3); font-size: 0.82rem; }
.adm-prod .price { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.adm-prod .tg { background: none; border: 1px solid var(--hairline); border-radius: 999px; padding: 0.25rem 0.6rem; font: 600 0.74rem var(--font); cursor: pointer; color: var(--ink-3); }
.adm-prod .tg.on { color: var(--accent); border-color: var(--accent); }
.adm-prod .del { background: none; border: none; color: #d33; cursor: pointer; font-size: 0.85rem; }
.adm-gate { text-align: center; padding: 4rem 1rem; max-width: 460px; margin: 0 auto; }
.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; max-width: 660px; margin-top: 0.5rem; }
.adm-form .full { grid-column: 1 / -1; }
.adm-form label { display: block; font-size: 0.8rem; color: var(--ink-3); margin: 0 0 0.3rem; }
.adm-form input, .adm-form select, .adm-form textarea { width: 100%; background: var(--parchment); border: 1px solid var(--hairline); border-radius: 10px; padding: 0.6rem 0.85rem; color: var(--ink); font: 400 0.95rem var(--font); outline: none; box-sizing: border-box; }
.adm-form input:focus, .adm-form textarea:focus, .adm-form select:focus { border-color: var(--accent); }
@media (max-width: 640px) { .adm-form { grid-template-columns: 1fr; } .adm-prod { grid-template-columns: 40px 1fr auto; } .adm-prod .price, .adm-prod .tg { display: none; } }

/* =====================================================================
   DOPLŇKY ŠABLONY (IoT čipy, formuláře, tabulky, zprávy)
   ===================================================================== */

/* fotka produktu, pokud je nahraná (jinak se kreslí glyf) */
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph picture { display: block; width: 100%; height: 100%; }   /* obal <picture> nesmí měnit rozměr */
/* fotky se generují na jednotném pozadí --photo-bg → dlaždice na něj
   plynule navazuje a fotka působí jako součást stránky, ne jako výřez */
.ph-photo { background: var(--photo-bg); }

/* čipy na kartě produktu: protokol, „vyžaduje bránu", předplatné */

/* filtr výpisu kategorie */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 2.4rem; }
.filter-bar select, .filter-bar input { background: none; border: 1px solid var(--hairline-soft); border-radius: var(--radius-pill); padding: 0.5rem 1rem; color: var(--ink-2); font: 400 0.9rem var(--font); outline: none; min-height: 40px; transition: border-color 0.2s, color 0.2s; }
.filter-bar select:hover, .filter-bar input:hover { border-color: var(--hairline); color: var(--ink); }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--accent); }

/* obecný formulář (pokladna, účet, administrace) */
.frm { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; max-width: 640px; }
.frm .full { grid-column: 1 / -1; }
.frm label { display: block; font-size: 0.8rem; color: var(--ink-3); margin: 0 0 0.3rem; }
.frm input, .frm select, .frm textarea { width: 100%; background: var(--parchment); border: 1px solid var(--hairline); border-radius: 10px; padding: 0.65rem 0.9rem; color: var(--ink); font: 400 0.98rem var(--font); outline: none; box-sizing: border-box; }
.frm input:focus, .frm select:focus, .frm textarea:focus { border-color: var(--accent); }
.frm .err { grid-column: 1 / -1; color: #d33; font-size: 0.9rem; }
.choice { display: flex; align-items: center; gap: 0.7rem; border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 0.75rem 0.95rem; cursor: pointer; font-size: 0.95rem; }
.choice input { width: auto; accent-color: var(--accent); }
.choice .pr { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* tabulka (objednávky v účtu a administraci) */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { text-align: left; font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--hairline); }
.tbl td { padding: 0.7rem; border-bottom: 1px solid var(--hairline-soft); vertical-align: middle; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* stavový štítek objednávky / předplatného */
.st { display: inline-block; font-size: 0.76rem; font-weight: 600; border-radius: var(--radius-pill); padding: 0.22rem 0.65rem; background: var(--parchment); color: var(--ink-2); }
.st-new { color: var(--accent); } .st-paid, .st-active { color: #1d8f4e; }
.st-shipped { color: #b25000; } .st-cancelled { color: #d33; }

/* jednorázová zpráva po přesměrování (vykresluje paticka.php) */
.flash { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--canvas); color: var(--ink); border: 1px solid var(--hairline-soft); box-shadow: var(--elev-1); padding: 0.65rem 1.2rem; border-radius: var(--radius-pill); font-size: 0.9rem; font-weight: 500; z-index: 80; animation: flashOut 0.3s 2.4s var(--ease) both; }
@keyframes flashOut { to { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* parametry na detailu produktu */
.specs { border: none; border-top: 1px solid var(--hairline-soft); border-radius: 0; margin: 0 0 2rem; overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0.1rem; font-size: 0.92rem; border-bottom: 1px solid var(--hairline-soft); }
.specs div:last-child { border-bottom: none; }
.specs dt { color: var(--ink-3); } .specs dd { margin: 0; font-weight: 500; text-align: right; }

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

/* administrace: záložky jako odkazy + dlaždice přehledu */
.adm-tab { display: inline-block; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; margin: 0 0 2.2rem; }
.stat { border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.stat b { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.stat span { color: var(--ink-3); font-size: 0.82rem; }

/* přístupnost: vizuálně skrytý popisek pro čtečky obrazovky */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* odkazy uvnitř textu odlišené i podtržením (nejen barvou) — WCAG */
.pd-desc a, .crumbs a, .shop-foot a, .empty a, .cart-summary a, .badge a, main p a { text-decoration: underline; }

/* =====================================================================
   APP SHELL — mobilní zážitek jako v nativní aplikaci
   ---------------------------------------------------------------------
   Spodní dok (tab bar), vyjíždějící karty (bottom sheets), tapová
   odezva a nástupní animace. Vše je progresivní vylepšení: bez
   JavaScriptu zůstává obchod plně funkční (dok jsou obyčejné odkazy,
   AI má vlastní panel, přidání do košíku běží klasickým POSTem).
   ===================================================================== */

/* ---------- nástupní animace obsahu (jemné vyjetí zdola) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero > *, .sec-head, .cat-strip { animation: rise 0.6s var(--ease) both; }
.hero > *:nth-child(2) { animation-delay: 0.05s; }
.hero > *:nth-child(3) { animation-delay: 0.1s; }
.hero > *:nth-child(4) { animation-delay: 0.15s; }
.prod-grid .prod-card { animation: rise 0.55s var(--ease) both; }
.prod-grid .prod-card:nth-child(2) { animation-delay: 0.04s; }
.prod-grid .prod-card:nth-child(3) { animation-delay: 0.08s; }
.prod-grid .prod-card:nth-child(4) { animation-delay: 0.12s; }
.prod-grid .prod-card:nth-child(5) { animation-delay: 0.16s; }
.prod-grid .prod-card:nth-child(6) { animation-delay: 0.2s; }
.prod-grid .prod-card:nth-child(n+7) { animation-delay: 0.24s; }

/* ---------- karta produktu: hmatatelná odezva ---------- */
.prod-card { box-shadow: inset 0 1px 0 var(--card-hi); -webkit-tap-highlight-color: transparent; }
.prod-card:active { transform: scale(0.975); transition: transform 0.12s var(--ease); }
@media (hover: none) { .prod-card:hover { transform: none; } }

/* ---------- spodní dok: tenká lišta jen s ikonami (mobil/tablet) ---------- */
.dock { display: none; }
@media (max-width: 833px) {
  body.shop { padding-bottom: calc(var(--dock-h) + var(--safe-b) + 6px); }
  .shop-foot { margin-bottom: calc(var(--dock-h) + var(--safe-b)); }
  .dock {
    display: grid;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--dock-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--dock-bg);
    -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
    border-top: 1px solid var(--hairline-soft);
  }
}
.dock-item {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; text-decoration: none;
  color: var(--ink-3); -webkit-tap-highlight-color: transparent; transition: color 0.25s;
}
.dock-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dock-item[data-sheet="ai"] svg { fill: currentColor; stroke: none; }   /* jiskra AI je plná */
.dock-item:active { transform: scale(0.88); transition: transform 0.1s; }
.dock-item[aria-current] { color: var(--ink); }
.dock-item .dock-badge {
  position: absolute; top: 12px; right: calc(50% - 16px); min-width: 15px; height: 15px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 600 0.58rem/15px var(--font); text-align: center; padding: 0 4px; letter-spacing: 0;
}
.dock-item .dock-badge[data-n="0"] { display: none; }

/* ---------- vyjíždějící karta (bottom sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.sheet.open { visibility: visible; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 0.35s var(--ease); }
.sheet.open .sheet-scrim { opacity: 1; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh;
  display: flex; flex-direction: column;
  background: var(--sheet-bg); border-top: 1px solid var(--hairline-soft);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; box-shadow: var(--elev-sheet);
  padding: 0 clamp(1.1rem, 5vw, 1.5rem) calc(1rem + var(--safe-b));
  transform: translateY(101%); transition: transform 0.44s var(--spring);
}
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet.closing .sheet-panel { transition: transform 0.28s var(--ease); }
.sheet.closing .sheet-scrim { transition: opacity 0.24s var(--ease); }
.sheet-grab { flex: none; width: 38px; height: 5px; border-radius: 999px; background: var(--hairline); margin: 0.6rem auto 0.2rem; }
.sheet-head { flex: none; display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0 0.9rem; }
.sheet-head h3 { margin: 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.sheet-head .x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--parchment); border: none; color: var(--ink-2); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* na desktopu z bottom sheetu udělej klasický vystředěný dialog */
@media (min-width: 834px) {
  .sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(440px, calc(100vw - 40px));
    transform: translate(-50%, -46%); border-radius: var(--radius-lg); border: 1px solid var(--hairline);
    box-shadow: var(--elev-2); padding: 0 1.5rem 1.5rem; }
  .sheet.open .sheet-panel { transform: translate(-50%, -50%); }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 1.2rem; }
}

/* obsah sheetu: seznam kategorií */
.sheet-cats { display: flex; flex-direction: column; padding-bottom: 0.4rem; }
.sheet-cats a { display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 0.2rem; color: var(--ink);
  font-size: 1.05rem; font-weight: 500; letter-spacing: -0.02em; border-bottom: 1px solid var(--hairline-soft); }
.sheet-cats a:last-child { border-bottom: none; }
.sheet-cats a svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sheet-cats a .go { margin-left: auto; color: var(--ink-3); }

/* obsah sheetu: potvrzení „přidáno do košíku" */
.added { display: flex; align-items: center; gap: 0.9rem; padding: 0.2rem 0 1.1rem; }
.added .tick { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--parchment);
  display: grid; place-items: center; animation: pop 0.4s var(--spring) both; }
.added .tick svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.added .t { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em; }
.added .s { color: var(--ink-3); font-size: 0.9rem; }
.sheet-actions { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 0.2rem; }

/* ---------- AI jako sheet na mobilu ---------- */
@media (max-width: 833px) {
  .ai-fab { display: none; }   /* na mobilu spouští AI prostřední tlačítko doku */
  .ai-panel {
    right: 0; left: 0; bottom: 0; width: 100%;
    height: auto; max-height: 86dvh;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; border: none;
    box-shadow: var(--elev-sheet);
    transform: translateY(101%); transition: transform 0.44s var(--spring); display: flex;
    padding-bottom: var(--safe-b);
  }
  .ai-panel.open { transform: translateY(0); }
  .ai-thread { min-height: 40dvh; }
}

/* tlačítko zpět na vizuálu produktu — jen na mobilu, desktop má drobečky */
@media (min-width: 834px) { .pd-back { display: none; } }

/* tiché potvrzení přidání do košíku (desktop): odznak jen pružně pípne */
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.cart-count.bump, .dock-badge.bump { animation: bump 0.45s var(--spring); }

/* iOS: pole s písmem pod 16 px spouští při psaní zoom celé stránky —
   na dotykových zařízeních proto všechna pole drží minimálně 16 px */
@media (pointer: coarse), (max-width: 833px) {
  input, select, textarea { font-size: max(1rem, 16px) !important; }
}

/* ---------- kompaktní řada kategorií nahoře (miniatura + název) ---------- */
.cat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.55rem; padding: 1.1rem 0 0; }
.cat-item { display: flex; align-items: center; gap: 0.7rem; background: var(--parchment);
  border-radius: var(--radius-md); padding: 0.4rem 0.75rem 0.4rem 0.4rem; color: var(--ink);
  min-height: 54px; transition: background 0.2s, transform 0.12s; -webkit-tap-highlight-color: transparent; }
.cat-item:hover { background: var(--pearl); }
.cat-item:active { transform: scale(0.98); }
.cat-item .ph { width: 44px; border-radius: 9px; flex: none; }
.cat-item .t { font-size: 0.88rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.cat-item[aria-current] { background: var(--ink); color: var(--canvas); }
.cat-row + .filter-bar { margin-top: 1.6rem; }
.hero-tight p { margin-bottom: 0.4rem; }   /* nad řadou kategorií žádná díra */
@media (min-width: 600px) { .cat-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-row { grid-template-columns: repeat(6, 1fr); }
  .cat-item { min-height: 50px; padding-right: 0.6rem; } }

/* ---------- AI dovednost: kontextový čip (kompatibilita, prázdné hledání) ---------- */
.ai-ask { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0.2rem 0 1.5rem;
  background: var(--parchment); border: none; border-radius: var(--radius-pill);
  padding: 0.65rem 1.1rem; color: var(--ink); font: 500 0.92rem var(--font);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.2s, transform 0.12s; }
.ai-ask:hover { background: var(--pearl); }
.ai-ask:active { transform: scale(0.96); }
.ai-ask svg { width: 16px; height: 16px; fill: var(--ink); flex: none; }

/* ---------- AI chat: psací tečky a úvodní návrhy (vzor obsidia.cz/ai) ---------- */
.ai-typing { align-self: flex-start; display: inline-flex; gap: 0.3rem; padding: 0.85rem 1rem; background: var(--parchment); border-radius: 18px 18px 18px 5px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: aiBlink 1.2s infinite both; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.ai-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; margin-top: 0.2rem; }
.ai-chips button { font: 500 0.9rem var(--font); color: var(--ink); background: none; border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 0.55rem 1rem; cursor: pointer; text-align: left; transition: background 0.2s, transform 0.12s; -webkit-tap-highlight-color: transparent; }
.ai-chips button:hover { background: var(--parchment); }
.ai-chips button:active { transform: scale(0.97); }

/* ---------- symetrie: přihlášení a registrace v rovné mřížce ---------- */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); max-width: 860px; align-items: stretch; }
.auth-grid > div { display: flex; flex-direction: column; }
.auth-grid .frm { flex: 1; display: flex; flex-direction: column; gap: 0.9rem; }
.auth-grid .frm > div:last-child { margin-top: auto; padding-top: 0.3rem; }
@media (max-width: 640px) { .auth-grid { grid-template-columns: 1fr; } }

/* ---------- prémiová vrstva (podle rozboru designových principů) ---------- */

/* poctivý sociální důkaz: odznak počítaný z reálných prodejů */
.card-top { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: -0.05rem; }
.pd-top { display: inline-block; background: var(--ink); color: #fff; border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem; margin: 0 0 0.9rem; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; }

/* skutečné benefity na detailu produktu — místo výprodejového křiku */
.pd-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  margin: 1.3rem 0 0.4rem; padding: 1rem 0 0; border-top: 1px solid var(--hairline);
  color: var(--ink-3); font-size: 0.88rem; }
.pd-trust li { display: flex; align-items: center; gap: 0.45rem; }
.pd-trust li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }

/* příběhový blok na úvodní stránce: reflexivní rovina, hodně vzduchu */
.story { text-align: center; padding: clamp(5rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem); }
.story-mark { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.4rem; }
.story h2 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.15; margin: 0 0 1.2rem; }
.story p { max-width: 34rem; margin: 0 auto; color: var(--ink-2, var(--ink-3));
  font-size: 1.02rem; line-height: 1.65; }

/* péče po nákupu: kroky na potvrzení objednávky */
.care { max-width: 34rem; margin-top: 3rem; }
.care h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 1.3rem; }
.steps { list-style: none; counter-reset: krok; margin: 0 0 1.6rem; padding: 0;
  display: flex; flex-direction: column; gap: 1.15rem; }
.steps li { counter-increment: krok; display: grid; grid-template-columns: 30px 1fr;
  column-gap: 0.9rem; align-items: baseline; }
.steps li::before { content: counter(krok); grid-row: span 2; width: 30px; height: 30px;
  border: 1px solid var(--hairline); border-radius: 50%; display: grid; place-items: center;
  font-size: 0.82rem; font-weight: 600; color: var(--ink-3); align-self: start; }
.steps b { font-weight: 600; }
.steps span { grid-column: 2; color: var(--ink-3); font-size: 0.9rem; line-height: 1.5; }
.care-note { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 0.9rem; }

/* prázdný košík: vlídný start místo suchého konstatování */
.empty-cart { text-align: center; padding: clamp(2rem, 8vw, 4.5rem) 0; }
.empty-cart .empty { margin-bottom: 1.6rem; }
.empty-cart .empty span { color: var(--ink-3); font-size: 0.95rem; }
.empty-cart .btn { margin-bottom: 0.9rem; }
.empty-cart .ai-ask { display: inline-flex; margin: 0 auto; }
.empty-cart .btn + .ai-ask { display: flex; width: fit-content; margin: 0 auto; }

/* ---------- AI asistent jako plnohodnotná vyjíždějící karta (mobil) ---------- */
/* ztmavené pozadí pod kartou — stejné chování jako u ostatních sheetů */
.ai-scrim { position: fixed; inset: 0; z-index: 74; background: rgba(20, 20, 22, 0.34);
  opacity: 0; pointer-events: none; transition: opacity 0.32s var(--ease); }
.ai-scrim.open { opacity: 1; pointer-events: auto; }
.ai-panel .sheet-grab { margin: 0.65rem auto 0.1rem; }
@media (min-width: 834px) {
  .ai-scrim { display: none; }                /* desktop má plovoucí okno, scrim nepotřebuje */
  .ai-panel .sheet-grab { display: none; }
}
@media (max-width: 833px) {
  .ai-ph { border-bottom: none; padding: 0.5rem 1.1rem 0.65rem; }
  .ai-thread { padding: 0.4rem 1.1rem 1rem; }
  .ai-comp { padding: 0.7rem 0.9rem calc(0.7rem + var(--safe-b)); border-top: 1px solid var(--hairline-soft); }
  .ai-msg { font-size: 1rem; line-height: 1.5; }
  .ai-panel { box-shadow: var(--elev-sheet); }
}

/* ---------- detail: nákup v toku textu, poznámka o kompatibilitě ---------- */
.pd-buy { margin: 2rem 0 1.2rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline); }
.pd-note { border: 1px solid var(--hairline); border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem; font-size: 0.92rem; line-height: 1.55; color: var(--ink-2);
  margin: 1.4rem 0 0.6rem; max-width: 34rem; }
@media (max-width: 833px) {
  .pd-note { margin-left: auto; margin-right: auto; text-align: left; }
  .pd-buy { border-top: 1px solid var(--hairline); padding-top: 1.6rem; }
  .pd-buy .badge { width: 100%; justify-content: center; margin-top: 0.2rem; }
}
.pd-desc p { margin: 0 0 1rem; }
.pd-desc p:last-child { margin-bottom: 0; }
