/* ─── Variables ─── */
:root {
  --bg:        #f7f7f5;
  --surface:   #ffffff;
  --border:    #e8e8e4;
  --text:      #111111;
  --muted:     #6b7280;
  --accent:    #0057b8;
  --accent-hv: #004494;
  --danger:    #dc2626;
  --green:     #16a34a;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 4px rgba(0,0,0,.06), 0 4px 20px rgba(0,0,0,.07);
  --shadow-hv: 0 2px 8px rgba(0,0,0,.08), 0 8px 32px rgba(0,0,0,.10);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Layout ─── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ─── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 64px;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo em { font-style: normal; color: var(--accent); }

.header-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.header-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.header-nav a:hover { color: var(--text); background: var(--bg); }
.header-nav a.active { color: var(--text); font-weight: 600; }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.cart-btn:hover { border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cart-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ─── Hero ─── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 72px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef4ff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 440px;
}
.hero-actions { display: flex; gap: 12px; align-items: center; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hv); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: #aaa; background: var(--bg); }
.hero-img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: #f0f0ec;
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Trust bar ─── */
.trust-bar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0;
}
.trust-bar-inner {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.trust-item svg { color: var(--accent); flex-shrink: 0; }

/* ─── Categories ─── */
.section { padding: 56px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.section-header a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.section-header a:hover { text-decoration: underline; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.cat-card:hover {
  box-shadow: var(--shadow-hv);
  transform: translateY(-2px);
  border-color: #d0d0cc;
}
.cat-icon {
  width: 48px; height: 48px;
  background: #eef4ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.cat-card span {
  font-size: 13px;
  font-weight: 600;
}

/* ─── Product grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hv);
  transform: translateY(-3px);
}
.card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f4f4f2;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.product-card:hover .card-img img { transform: scale(1.04); }
.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-bestseller { background: var(--accent); color: #fff; }
.badge-nowość     { background: #111; color: #fff; }
.badge-promocja   { background: #dc2626; color: #fff; }

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.card-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-name a:hover { color: var(--accent); }
.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.review-count { font-size: 12px; color: var(--muted); }
.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.card-old-price {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
}
.btn-cart {
  padding: 9px 18px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-cart:hover { background: #333; }

/* ─── Filter bar ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 7px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  color: var(--muted);
}
.filter-btn:hover { border-color: #999; color: var(--text); }
.filter-btn.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ─── Product page ─── */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
  padding: 48px 0 64px;
}
.product-gallery {
  position: sticky;
  top: 88px;
}
.gallery-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1/1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.product-crumb {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.product-crumb a:hover { color: var(--text); }
.product-crumb span::before { content: '›'; margin-right: 8px; }
.stock-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eafaf0;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.stock-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.product-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.product-sku {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.rating-num { font-size: 14px; font-weight: 700; }
.reviews-link { font-size: 13px; color: var(--muted); }

.price-block { margin-bottom: 20px; }
.price-main {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
}
.price-main-currency { font-size: 22px; font-weight: 600; color: #444; margin-left: 2px; }
.price-old-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.price-old { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.price-save {
  font-size: 13px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.price-vat { font-size: 12px; color: var(--muted); margin-top: 4px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.features-list { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 9px; }
.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #333;
}
.features-list li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }

.purchase-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-ctrl button {
  width: 36px; height: 36px;
  background: var(--bg);
  border: none;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  transition: background .1s;
}
.qty-ctrl button:hover { background: var(--border); }
.qty-ctrl input {
  width: 48px; height: 36px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
}
.qty-ctrl input:focus { outline: none; }

.btn-add-cart {
  width: 100%;
  padding: 15px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}
.btn-add-cart:hover { background: #333; }
.btn-buy-now {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}
.btn-buy-now:hover { background: var(--accent-hv); }
.pay-methods-row {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.pm-badge {
  height: 24px;
  padding: 0 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #555;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.3px;
}
.pm-badge.pm-blik { background: #000; color: #fff; border-color: #000; }
.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Cart ─── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 40px 0 64px;
  align-items: start;
}
.cart-table { display: flex; flex-direction: column; gap: 12px; }
.cart-row {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.cart-row-img {
  width: 90px; height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.cart-row-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.cart-row-sku  { font-size: 12px; color: var(--muted); }
.cart-row-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  transition: color .15s;
}
.cart-row-remove:hover { color: var(--danger); }
.cart-row-price { font-size: 18px; font-weight: 800; white-space: nowrap; }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 88px;
}
.cart-summary h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--muted);
}
.summary-row.total {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.btn-checkout {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-checkout:hover { background: var(--accent-hv); }
.empty-cart {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
.empty-cart svg { margin: 0 auto 16px; opacity: .3; }
.empty-cart h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }

/* ─── Alerts ─── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-success { background: #eafaf0; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb span::before { content: '›'; margin-right: 6px; }

/* ─── Footer ─── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 40px;
}
.footer-brand .logo { display: inline-block; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  color: var(--text);
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--text); }
.pay-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ─── Page header ─── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.page-header p { font-size: 14px; color: var(--muted); }

/* ─── Utilities ─── */
.text-muted { color: var(--muted); }
.mb-24 { margin-bottom: 24px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-img { display: none; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-nav { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 34px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 70px 1fr auto; }
  .cart-row-price { grid-column: 2 / -1; }
  .footer-inner { grid-template-columns: 1fr; }
  .trust-bar-inner { gap: 20px; }
}
