/* Layout wspólny dla wszystkich motywów. Kolory/fonty/akcenty żyją w
   theme-*.css jako zmienne CSS (--bg, --surface, --accent, itd.) — ten plik
   nie definiuje żadnego koloru wprost. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-heading); margin: 0; }
a { color: inherit; }

.hero-title { font-size: 40px; line-height: 1.1; margin-bottom: 16px; }
.hero-subtitle { font-size: 17px; color: var(--text-muted); max-width: 520px; line-height: 1.55; margin: 0 0 32px; }
.hero-accent { color: var(--accent); }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--border);
}
.brand { font-family: var(--font-heading); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.nav-cart {
  position: relative; text-decoration: none; font-size: 13px; color: var(--text);
  background: none; border: none; font-family: inherit; cursor: pointer; padding: 0;
}
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-contrast);
  font-size: 11px; font-weight: 700; margin-left: 6px;
}

/* Koszyk jako wysuwany panel z prawej strony */
.cart-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90;
  opacity: 0; transition: opacity .2s;
}
.cart-overlay.open { display: block; opacity: 1; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 400px;
  background: var(--surface); border-left: 1px solid var(--border); z-index: 91;
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
  border-bottom: 1px solid var(--border); font-family: var(--font-heading); text-transform: uppercase;
  letter-spacing: .06em; font-size: 14px;
}
.cart-drawer-close { background: none; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.cart-drawer-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.cart-drawer-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.cart-drawer-total { font-weight: 700; font-size: 17px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.cart-drawer-checkout { display: block; text-align: center; text-decoration: none; margin-top: 18px; }
@media (max-width: 480px) { .cart-drawer { max-width: 100%; } }

.page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }

/* Strona główna — siatka kafelków produktów */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.product-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .15s;
}
.product-card:hover { border-color: var(--accent); }
.product-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--surface2); }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 14px; min-height: 132px; }
.product-card-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.product-card-desc { font-size: 12px; color: var(--text-muted); }

.tag-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.product-card-body .tag-pills { margin-top: auto; padding-top: 10px; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface2);
  color: var(--text-muted); border: 1px solid var(--border);
}
.tag-icon { width: 12px; height: 12px; flex-shrink: 0; }

/* Kolor per typ tagu -- niesiony przez ikonkę (currentColor) + delikatna
   poświata na pigułce; tekst zostaje neutralny dla czytelności. */
.tag-pill.tag-physical { background: rgba(91, 141, 201, .12); border-color: rgba(91, 141, 201, .4); }
.tag-pill.tag-digital { background: rgba(155, 111, 224, .12); border-color: rgba(155, 111, 224, .4); }
.tag-pill.tag-free { background: rgba(69, 179, 132, .12); border-color: rgba(69, 179, 132, .4); }
.tag-icon-physical { color: #5b8dc9; }
.tag-icon-digital { color: #9b6fe0; }
.tag-icon-free { color: #45b384; }
.product-card-body .tag-pills { margin-top: 8px; }
.empty-hint { color: var(--text-muted); font-size: 13px; }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

.gallery { display: flex; flex-direction: column; gap: 12px; }
.main-image {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; opacity: .6;
}
.thumb.active { border-color: var(--accent); opacity: 1; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.info h1 { font-size: 28px; margin-bottom: 14px; }
.description { color: var(--text-muted); margin-bottom: 20px; }

.spec-table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 13px; }
.spec-table th, .spec-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--text-muted); font-weight: 500; width: 45%; }

.feature-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feature-list li { font-size: 14px; color: var(--text); }

.tip-box {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; font-size: 13px; color: var(--text-muted); margin-bottom: 20px;
}

.warning-box {
  border-left: 3px solid var(--accent); padding: 4px 16px; margin-bottom: 20px;
}
.warning-box p { font-size: 13px; color: var(--text-muted); margin: 8px 0; }

.terms-link { color: inherit; text-decoration: underline; }

.picker { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.picker-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px; }

.variant-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-option {
  flex: 1; min-width: 100px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.variant-option.on { border-color: var(--accent); color: var(--accent); }
.variant-price { font-weight: 600; }

.option-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.option-swatch {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0;
}
.option-swatch.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.option-swatch-label {
  padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit;
}
.option-swatch-label.on { border-color: var(--accent); color: var(--accent); }
.option-name { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); }
.qty-stepper button { width: 36px; height: 36px; background: var(--surface); border: none; color: var(--text); font-size: 16px; cursor: pointer; }
.qty-stepper input { width: 44px; text-align: center; border: none; background: transparent; color: var(--text); font-size: 14px; }

.cart-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 16px 0 24px;
}
.cart-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 10px; }
.cart-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cart-item-label { flex: 1; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; }
.cart-item-qty button {
  width: 22px; height: 22px; background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text); cursor: pointer; font-size: 13px; line-height: 1;
}
.cart-item-price { width: 90px; text-align: right; font-weight: 600; }
.cart-item-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; }

.cart-group { margin-bottom: 18px; }
.cart-group-title { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.cart-group-discount { font-size: 12px; color: var(--accent); margin-top: 4px; }

.price-box { display: flex; align-items: center; gap: 20px; margin-top: 14px; }
.price-total { font-size: 24px; font-weight: 700; }
.cta-button {
  padding: 12px 28px; background: var(--accent); color: var(--accent-contrast); border: none;
  border-radius: var(--radius); font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit;
}
.price-hints { display: flex; gap: 10px; margin-top: 8px; }
.upsell-hints { margin-top: 10px; font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.discount-badge, .shipping-badge {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface2);
  color: var(--accent); border: 1px solid var(--border);
}

.secondary-btn {
  width: 100%; padding: 10px; background: var(--surface); border: 1px solid var(--accent2); border-radius: var(--radius);
  color: var(--accent2); cursor: pointer; font-size: 13px;
}

.site-footer { text-align: center; padding: 24px; color: var(--text-muted); font-size: 12px; }

.summary-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px;
}

.field { margin-bottom: 10px; }
.field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.field input { width: 100%; }
input, textarea, select {
  font-size: 13px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text); font-family: inherit;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-street { display: grid; grid-template-columns: 1fr 90px; gap: 10px; margin-bottom: 10px; }
.form-grid-postcode { display: grid; grid-template-columns: 110px 1fr; gap: 10px; margin-bottom: 10px; }

.section-block { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--border); }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 10px; }

.ship-toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.ship-btn {
  flex: 1; padding: 9px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); cursor: pointer; font-size: 12px;
}
.ship-btn.on { border-color: var(--accent); color: var(--accent); }
.point-display {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; padding: 8px 12px;
  font-size: 12px; margin-bottom: 8px; font-family: var(--font-mono); color: var(--accent);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; margin: 8px 0; }
.payment-row.disabled { opacity: .5; }

.error-msg { color: #ff6b6b; font-size: 13px; margin: 10px 0; }
.loading { text-align: center; margin-top: 10px; color: var(--text-muted); font-size: 13px; }

.payment-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.payment-table th, .payment-table td { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--border); }
.payment-table th { color: var(--text-muted); width: 40%; }
