/* Shopify Hub — light, moderní, smooth (inspirace railway.com).
   Firemní barvy Ingredi: tyrkys #00b2d9, limetka #bcd142. */
:root {
  --bg: #f7f8fa;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #eef6f9 0%, rgba(238,246,249,0) 60%), #f7f8fa;
  --card: #ffffff;
  --line: #e9ecf1;
  --line-strong: #dfe3ea;
  --text: #14171c;
  --muted: #69707d;
  --accent: #00b2d9;
  --accent-ink: #068aa8;
  --accent-soft: #e7f7fb;
  --green: #7a9c1f;
  --green-soft: #f2f7e1;
  --danger: #d64550;
  --danger-soft: #fcebed;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20,30,50,.04), 0 1px 3px rgba(20,30,50,.06);
  --shadow-md: 0 4px 12px rgba(20,30,50,.06), 0 2px 4px rgba(20,30,50,.04);
  --shadow-lg: 0 12px 32px rgba(20,30,50,.10);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 -apple-system, system-ui, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em;
}

/* Header */
header {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  height: 58px;
  display: flex;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
}
header .brand { display: flex; align-items: center; margin-right: 14px; }
header .brand img { height: 21px; display: block; }
header nav { display: flex; gap: 2px; align-items: center; }
header nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px; transition: all .15s var(--ease);
}
header nav a:hover { color: var(--text); background: rgba(20,30,50,.05); }
header .spacer { flex: 1; }
header .muted { font-size: 13.5px; }
.linkbtn {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px;
  padding: 7px 10px; border-radius: 8px; transition: all .15s var(--ease);
}
.linkbtn:hover { color: var(--text); background: rgba(20,30,50,.05); }

main { max-width: 980px; margin: 0 auto; padding: 34px 24px 80px; }

/* Typography */
h1 { font-size: 25px; font-weight: 680; margin: 0 0 20px; letter-spacing: -0.022em; }
h2 { font-size: 16px; font-weight: 620; margin: 28px 0 12px; letter-spacing: -0.012em; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
a.link { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
a.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.ok { color: var(--green); }
.err { color: var(--danger); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card.ok { background: var(--green-soft); border-color: #dcecb0; color: #4f6b12; }
.card.err { background: var(--danger-soft); border-color: #f3c6cb; }
.card.warn { background: #fff7e6; border-color: #ffe2a8; color: #8a5a00; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th {
  color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em;
}
tbody tr, table tr { transition: background .12s var(--ease); }
code { background: #f0f2f5; padding: 2px 7px; border-radius: 6px; font-size: 12.5px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 10px; padding: 9px 17px; font-size: 14px; font-weight: 550;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,120,150,.25); transition: all .15s var(--ease);
}
.btn:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .7; cursor: default; transform: none; box-shadow: none; }
.btn.secondary { background: #f0f2f5; color: var(--text); box-shadow: none; }
.btn.secondary:hover { background: #e6e9ee; }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #f8d6da; }
form.inline { display: inline; }

/* Forms */
label { display: block; margin: 13px 0 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select {
  width: 100%; background: #fff; border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-family: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type=file] { padding: 8px; background: #fafbfc; cursor: pointer; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filters { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.filters > div { min-width: 190px; }
.filters label { margin-top: 0; }

/* Pills & badges */
.pill {
  font-size: 12px; padding: 3px 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600;
}
.scopes { display: flex; flex-wrap: wrap; gap: 5px; max-width: 420px; }
.scope-chip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: #eef1f4; color: #5a6573; white-space: nowrap;
}
.badge { font-size: 11.5px; font-weight: 650; padding: 3px 10px; border-radius: 99px; }
.badge-ok { background: var(--green-soft); color: #4f6b12; }
.badge-warn { background: #fff7e6; color: #8a5a00; }
.badge-err { background: var(--danger-soft); color: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 2px; margin: 4px 0 22px; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 10px 15px; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; font-weight: 540; font-size: 14px;
  transition: color .15s var(--ease), border-color .15s var(--ease); margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* Store cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.storecard {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm); transition: all .18s var(--ease); position: relative; overflow: hidden;
}
.storecard::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px var(--accent); opacity: 0; transition: opacity .18s var(--ease); pointer-events: none;
}
.storecard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.storecard:hover::after { opacity: 1; }
.storecard b { font-size: 16px; font-weight: 600; }
.storecard .dom { color: var(--muted); font-size: 13px; margin-top: 3px; }
.storelogo-wrap { height: 44px; display: flex; align-items: center; margin-bottom: 16px; }
.storelogo { max-height: 42px; max-width: 150px; object-fit: contain; }
.storelogo-ph {
  width: 42px; height: 42px; border-radius: 12px; color: #fff; font-weight: 700; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--green));
}
.storecard.addcard {
  display: flex; align-items: center; justify-content: center; min-height: 140px;
  border-style: dashed; border-color: var(--line-strong); color: var(--accent-ink);
  font-weight: 550; box-shadow: none;
}
.storecard.addcard:hover { background: var(--accent-soft); border-color: var(--accent); transform: none; }
.storecard.addcard::after { display: none; }

/* Feed card */
.feed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.result { margin-top: 14px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.result.ok { background: var(--green-soft); color: #4f6b12; }
.result.err { background: var(--danger-soft); color: var(--danger); }

/* Spinner */
.spinner {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 34px; width: 100%; max-width: 350px;
}
.login-card .logo { display: block; height: 24px; margin: 4px auto 6px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-card .btn { width: 100%; padding: 12px; margin-top: 22px; font-size: 15px; }

/* Products — seznam */
.psearch { display: flex; gap: 8px; max-width: 440px; margin-bottom: 18px; }
.psearch input { flex: 1; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.prow {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.prow:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.prow img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: #f1f5f9; flex: none; }
.prow .pinfo { flex: 1; min-width: 0; }
.prow .ptitle { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbadge { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--accent-soft); color: var(--accent-ink); }
.pbadge.active { background: var(--green-soft); color: #4f6b12; }
.pbadge.draft { background: #fff7e6; color: #8a5a00; }
.pbadge.archived { background: #f1f5f9; color: var(--muted); }

/* Products — detail */
.pgrid { display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 550; }
.kv dd { margin: 0; word-break: break-word; }
.desc-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; max-height: 320px; overflow: auto; font-size: 14px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th, .ptable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ptable th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.ptable tr:last-child td { border-bottom: none; }
.pthumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.pthumbs img { width: 72px; height: 72px; object-fit: contain; background: #f8fafc; border-radius: 8px; border: 1px solid var(--line); padding: 3px; }

/* Products — dlaždice + filtry */
.pfilters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.pfilters input[name=q] { flex: 1; min-width: 200px; }
.pfilters select { width: auto; }
.ptiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .ptiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .ptiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .ptiles { grid-template-columns: 1fr; } }
.buildinfo { max-width: 980px; margin: 0 auto; padding: 0 24px 26px; color: var(--muted); font-size: 12px; text-align: center; }
.pcard {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pcard:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard-img { aspect-ratio: 1 / 1; background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 6px; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; }
.pcard-noimg { color: var(--muted); font-size: 12px; }
.noimg-svg { color: var(--line-strong); }
.pcard-body { padding: 10px 12px; display: flex; flex-direction: column; flex: 1; }
.pcard-title { font-weight: 550; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.pcard-price { font-weight: 600; font-size: 13px; }
.rich { font-size: 14px; }
.rich p { margin: 4px 0; }
.rich h1, .rich h2, .rich h3 { margin: 8px 0 4px; font-size: 15px; }
.rich ul, .rich ol { margin: 4px 0; padding-left: 20px; }
.pthumbs img.zoomable, img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(15,23,42,.85); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 95%; max-height: 95%; border-radius: 10px; box-shadow: var(--shadow-lg); }
.block-card { border-left: 3px solid var(--accent); }
.ptable td, .ptable th { word-break: break-word; vertical-align: top; }
.more summary { cursor: pointer; color: var(--accent-ink); font-weight: 500; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ' ▸'; color: var(--muted); }
.more[open] summary::after { content: ' ▾'; }
.more-body { margin-top: 6px; }
