/* CobiMarket — hravý dětský e-shop se stavebnicemi COBI */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --blue:   #0087cc;   --blue-d:  #0069a3;
  --red:    #e30816;   --red-d:   #b8000c;
  --yellow: #ffce1e;   --yellow-d:#f0b400;
  --green:  #58b947;   --green-d: #45983a;
  --ink:    #16324a;   /* tmavě modrošedý text */
  --muted:  #5f7386;
  --paper:  #fff9ef;   /* teplé světlé pozadí */
  --card:   #ffffff;
  --line:   #e9e0cf;
  --shadow: 0 10px 24px rgba(22,50,74,.10);
  --shadow-lg: 0 18px 40px rgba(22,50,74,.16);
  --radius: 22px;
  --font-head: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% -5%, rgba(0,135,204,.10), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(255,206,30,.14), transparent 42%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.15; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1150px; margin: 0 auto; padding: 0 20px; }

/* Kostičkový pruh (studs) */
.studs { display: flex; gap: 10px; padding: 0; margin: 0; }
.studs span { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.studs .b { background: var(--blue); } .studs .r { background: var(--red); }
.studs .y { background: var(--yellow); } .studs .g { background: var(--green); }

/* ─── Header ─── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,249,239,.92); backdrop-filter: blur(8px); border-bottom: 3px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .mark { width: 46px; height: 46px; border-radius: 14px; background: var(--red); display: grid; place-items: center; box-shadow: inset 0 -5px 0 rgba(0,0,0,.15); }
.logo .mark::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 22px 0 0 -1px rgba(255,255,255,.9), 0 0 0 0 #fff; }
.logo .name { font-family: var(--font-head); font-weight: 700; font-size: 26px; letter-spacing: -.5px; }
.logo .name b { color: var(--red); } .logo .name i { color: var(--blue); font-style: normal; }
.search { flex: 1; max-width: 420px; margin: 0 auto; position: relative; }
.search input { width: 100%; padding: 11px 16px; border: 2px solid var(--line); border-radius: 999px; font: inherit; background: #fff; }
.search input:focus { outline: none; border-color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn { font-family: var(--font-head); font-weight: 600; font-size: 16px; border: none; border-radius: 999px; padding: 12px 22px; cursor: pointer; transition: transform .08s ease, box-shadow .12s ease; display: inline-flex; align-items: center; gap: 8px; }
.btn:active { transform: translateY(2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-d); }
.btn-red:active { box-shadow: 0 1px 0 var(--red-d); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-d); }
.btn-blue:active { box-shadow: 0 1px 0 var(--blue-d); }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 var(--yellow-d); }
.btn-yellow:active { box-shadow: 0 1px 0 var(--yellow-d); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 5px 0 var(--green-d); }
.btn-green:active { box-shadow: 0 1px 0 var(--green-d); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-lg { font-size: 19px; padding: 15px 30px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.cart-btn { position: relative; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 11px 18px; font-family: var(--font-head); font-weight: 600; box-shadow: 0 5px 0 var(--yellow-d); }
.cart-btn .count { position: absolute; top: -8px; right: -8px; background: var(--red); color: #fff; min-width: 24px; height: 24px; border-radius: 999px; font-size: 13px; display: grid; place-items: center; padding: 0 6px; border: 2px solid var(--paper); }

/* ─── Hero ─── */
.hero { margin: 26px 0; background: linear-gradient(120deg, var(--blue), #00a0e6); border-radius: 30px; color: #fff; padding: 44px 40px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(255,206,30,.35), transparent 60%); }
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 52px); margin: 0 0 10px; }
.hero p { font-size: 19px; max-width: 560px; margin: 0 0 22px; opacity: .96; }
.hero .studs { margin-bottom: 20px; }
.hero .studs span { width: 26px; height: 26px; }

/* ─── Sekce ─── */
.section { margin: 44px 0; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.section-head h2 { font-size: 30px; margin: 0; }
.section-head .pill { font-family: var(--font-head); font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); }
.section-head a.more { margin-left: auto; font-family: var(--font-head); font-weight: 600; }

/* ─── Lišta kategorií ─── */
.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip { font-family: var(--font-head); font-weight: 600; font-size: 15px; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: all .1s; }
.chip:hover { border-color: var(--blue); }
.chip.on { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 4px 0 var(--blue-d); }

/* ─── Mřížka produktů ─── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease; border: 2px solid transparent; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--yellow); }
.card .thumb { aspect-ratio: 1/1; background: #f4eede; display: grid; place-items: center; padding: 14px; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .5px; }
.card .title { font-family: var(--font-head); font-weight: 600; font-size: 17px; margin: 0; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .price { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--red); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--green); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 12px; padding: 4px 12px; border-radius: 999px; }
.card .thumb { position: relative; }

/* ─── Detail produktu ─── */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 30px 0; }
.detail .photo { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; display: grid; place-items: center; }
.detail h1 { font-size: 34px; margin: 6px 0 12px; }
.detail .price-big { font-family: var(--font-head); font-weight: 700; font-size: 40px; color: var(--red); margin: 14px 0; }
.detail .facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.detail .facts .fact { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 14px; font-size: 14px; font-weight: 700; }
.detail .photo img, .detail .photo video { width: 100%; height: 100%; max-height: 460px; object-fit: contain; border-radius: 12px; background: #fff; }
.media-col { display: flex; flex-direction: column; gap: 12px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-btn { width: 74px; height: 74px; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; padding: 5px; display: grid; place-items: center; transition: all .1s; }
.thumb-btn:hover { border-color: var(--blue); }
.thumb-btn.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.thumb-btn img { width: 100%; height: 100%; object-fit: contain; }
.thumb-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 22px; color: var(--blue); line-height: 1; }
.thumb-video b { font-family: var(--font-head); font-size: 12px; }
.photo .video-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { border: none; background: none; font-size: 22px; width: 42px; height: 44px; cursor: pointer; font-family: var(--font-head); color: var(--blue); }
.qty input { width: 46px; text-align: center; border: none; font: inherit; font-weight: 700; font-size: 18px; }

/* ─── Košík / pokladna ─── */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 2px solid var(--line); }
.line-item:last-child { border-bottom: none; }
.line-item .li-img { width: 72px; height: 72px; background: #f4eede; border-radius: 14px; padding: 6px; }
.line-item .li-img img { width: 100%; height: 100%; object-fit: contain; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; }
.summary-row.total { font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--ink); border-top: 3px solid var(--line); margin-top: 8px; padding-top: 14px; }
.summary-row.total b { color: var(--red); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.field input, .field textarea { width: 100%; padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; margin-bottom: 10px; background: #fff; transition: border-color .1s; }
.opt:hover { border-color: var(--blue); }
.opt input { accent-color: var(--blue); width: 20px; height: 20px; }
.opt .opt-label { font-weight: 700; }
.opt .opt-price { margin-left: auto; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.opt.selected { border-color: var(--blue); background: #f0f9ff; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 60px; }

.notice { background: #fff8e0; border: 2px solid var(--yellow); border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 600; }

/* ─── Footer ─── */
.site-footer { margin-top: 60px; background: var(--ink); color: #cdd9e4; padding: 40px 0 30px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-family: var(--font-head); margin: 0 0 12px; }
.site-footer a { color: #cdd9e4; }
.site-footer .bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; opacity: .8; }

.crumbs { font-size: 14px; color: var(--muted); margin: 20px 0 6px; }
.crumbs a { font-weight: 700; }

@media (max-width: 820px) {
  .detail, .two-col { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .header-in { flex-wrap: wrap; }
}
