/* BCS sklep — bcs.cometo.pl. Paleta: czerwień BCS + grafit, jasne tło. */
:root {
  --brand: #d71920;
  --brand-dk: #a90f15;
  --ink: #10151f;
  --ink-2: #3c4657;
  --bg: #f4f6f9;
  --paper: #ffffff;
  --line: #e2e7ee;
  --ok: #1a7f37;
  --radius: 12px;
  --mobnav-h: 62px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100dvh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }

/* ── Header ── */
.hdr { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.hdr-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.logo { display: flex; flex-direction: column; line-height: 1; flex: 0 0 auto; }
.logo-mark {
  background: var(--brand); color: #fff; font-weight: 800; letter-spacing: 2px;
  padding: 6px 10px; border-radius: 6px; font-size: 20px; display: inline-block;
}
.logo-mark.sm { font-size: 15px; padding: 4px 8px; }
.logo-sub { font-size: 10px; color: #aab4c4; margin-top: 3px; letter-spacing: 1px; text-transform: uppercase; }
.search { flex: 1; display: flex; max-width: 560px; }
.search input {
  flex: 1; border: 0; border-radius: 8px 0 0 8px; padding: 10px 14px; font-size: 15px; min-width: 0;
}
.search button { border: 0; background: var(--brand); color: #fff; border-radius: 0 8px 8px 0; padding: 0 16px; }
.hdr-actions { display: flex; gap: 14px; margin-left: auto; align-items: center; }
.hdr-link { position: relative; font-size: 14px; color: #dfe5ee; white-space: nowrap; }
.badge {
  position: absolute; top: -8px; right: -12px; background: var(--brand); color: #fff;
  font-size: 11px; border-radius: 999px; padding: 1px 6px; font-weight: 700;
}
.catbar {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; max-width: 1280px; margin: 0 auto;
  scrollbar-width: none;
}
.catbar::-webkit-scrollbar { display: none; }
.catbar a {
  flex: 0 0 auto; background: #202839; color: #dfe5ee; padding: 6px 12px;
  border-radius: 999px; font-size: 13px;
}
.catbar a:hover { background: var(--brand); color: #fff; }

/* ── Main ── */
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 16px; }

/* Hero */
.hero {
  background: linear-gradient(120deg, #10151f 0%, #1d2a44 60%, #2a3c63 100%);
  color: #fff; border-radius: var(--radius); padding: 36px 28px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(22px, 4vw, 34px); }
.hero p { margin: 0 0 16px; color: #b9c4d8; max-width: 560px; }
.hero .cta {
  display: inline-block; background: var(--brand); color: #fff; padding: 11px 22px;
  border-radius: 8px; font-weight: 700;
}
.hero .cta:hover { background: var(--brand-dk); }
.hero-icon { font-size: 72px; margin-left: auto; }

/* Sekcje + karuzele */
.sec { margin: 26px 0; }
.sec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { margin: 0; font-size: 20px; }
.sec-h a { color: var(--brand); font-size: 14px; font-weight: 600; }
.carousel {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x proximity; scrollbar-width: thin;
}
.carousel > * { scroll-snap-align: start; }

/* Kafle kategorii */
.cat-tile {
  flex: 0 0 150px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; transition: box-shadow .15s, transform .15s;
}
.cat-tile:hover { box-shadow: 0 6px 18px rgba(16,21,31,.12); transform: translateY(-2px); }
.cat-tile i { font-style: normal; font-size: 30px; display: block; margin-bottom: 8px; }
.cat-tile s { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Karty produktów */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s;
}
.carousel .pcard { flex: 0 0 220px; }
.pcard:hover { box-shadow: 0 6px 18px rgba(16,21,31,.12); }
.pcard .ph {
  aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.pcard .ph img { width: 100%; height: 100%; object-fit: contain; }
.pcard .ph .noimg { font-size: 42px; opacity: .25; }
.pcard .pb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .nm { font-size: 13.5px; line-height: 1.35; font-weight: 600; color: var(--ink); min-height: 36px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pr { font-size: 17px; font-weight: 800; color: var(--brand-dk); margin-top: auto; }
.pcard .add {
  border: 1px solid var(--brand); background: #fff; color: var(--brand); border-radius: 8px;
  padding: 7px 10px; font-weight: 700; font-size: 13px;
}
.pcard .add:hover { background: var(--brand); color: #fff; }

/* Karta produktu */
.pd { display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 26px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.pd-gal .main { aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pd-gal .main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: pointer; }
.pd h1 { font-size: 22px; margin: 0 0 10px; }
.pd .price { font-size: 30px; font-weight: 800; color: var(--brand-dk); margin: 12px 0; }
.pd .meta { color: var(--ink-2); font-size: 13px; margin: 4px 0; }
.pd .addbig {
  background: var(--brand); border: 0; color: #fff; font-weight: 800; font-size: 16px;
  padding: 13px 26px; border-radius: 10px; margin: 10px 0;
}
.pd .addbig:hover { background: var(--brand-dk); }
.pd .desc { margin-top: 18px; line-height: 1.6; font-size: 14.5px; color: #222b3a; white-space: pre-line; }
.pd .gpsr { margin-top: 18px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font-size: 13px; color: var(--ink-2); }
.pd .gpsr h3 { margin: 0 0 8px; font-size: 14px; color: var(--ink); }

/* Koszyk */
.cart-item { display: flex; gap: 14px; align-items: center; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.cart-item img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; }
.cart-item .ci-n { flex: 1; font-size: 14px; font-weight: 600; }
.cart-item .qty { display: flex; align-items: center; gap: 8px; }
.cart-item .qty button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.cart-sum { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-top: 14px; font-size: 15px; }
.cart-sum .tot { font-size: 22px; font-weight: 800; color: var(--brand-dk); }
.notice { background: #fff8e6; border: 1px solid #f0dfa8; color: #6b5518; border-radius: 10px;
  padding: 12px 16px; margin: 14px 0; font-size: 14px; line-height: 1.5; }

/* Stany */
.empty { text-align: center; padding: 46px 18px; color: var(--ink-2); }
.empty .big { font-size: 52px; margin-bottom: 12px; }
.spinner { text-align: center; padding: 40px; color: var(--ink-2); }
.pager { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.pager button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 8px 16px; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.crumbs a { color: var(--brand); }

/* ── Stopka ── */
.ftr { background: #0f172a; color: #cbd5e1; margin-top: 34px; }
.ftr-in { max-width: 1280px; margin: 0 auto; padding: 40px 16px 20px; display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
.ftr-brand p { font-size: 13.5px; line-height: 1.55; margin: 10px 0 0; }
.ftr-comp { color: #8fa0b8; font-size: 12.5px !important; }
.ftr-col h4 { margin: 0 0 10px; color: #fff; font-size: 14px; }
.ftr-col a { display: block; font-size: 13.5px; padding: 3px 0; color: #cbd5e1; }
.ftr-col a:hover { color: #fff; }
.ftr-bar { border-top: 1px solid #1e293b; text-align: center; padding: 14px; font-size: 12.5px; color: #8fa0b8; }

/* ── Dolna karuzela mobilna (standard: id=937) ── */
.mobnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink); border-top: 1px solid #232c3d;
  flex-direction: row; overflow-x: auto; height: var(--mobnav-h);
  padding: 0 4px; scrollbar-width: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobnav::-webkit-scrollbar { display: none; }
.mobnav a {
  flex: 0 0 auto; min-width: 62px; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; color: #c6cfdd; position: relative;
  padding: 0 6px;
}
.mobnav a.active { color: #fff; }
.mobnav a.active i { transform: scale(1.12); }
.mobnav i { font-style: normal; font-size: 20px; line-height: 1; }
.mobnav s { text-decoration: none; font-size: 9.5px; }
.mobnav .badge { top: 6px; right: 4px; }

@media (max-width: 760px) {
  .mobnav { display: flex; }
  body { padding-bottom: calc(var(--mobnav-h) + env(safe-area-inset-bottom, 0px)); }
  .hdr-actions .hdr-link span { display: none; }
  .hdr-in { gap: 10px; }
  .pd { grid-template-columns: 1fr; padding: 14px; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .hero { padding: 24px 18px; }
  .hero-icon { display: none; }
  main { padding: 12px; }
}
