/* ==== Naukowe Place Zabaw - Strefa Dystrybutora ==== */

:root {
  --green:       #7cb342;
  --green-dark:  #558b2f;
  --green-soft:  #e8f5e0;
  --blue:        #2e7dbe;
  --blue-dark:   #1f5a8a;
  --navy:        #1f2d3d;
  --text:        #2b3440;
  --muted:       #6b7684;
  --border:      #e3e8ee;
  --bg:          #f5f8f3;
  --white:       #ffffff;
  --shadow-sm:   0 2px 6px rgba(30, 50, 60, 0.06);
  --shadow-md:   0 8px 24px rgba(30, 50, 60, 0.10);
  --shadow-lg:   0 20px 50px rgba(30, 50, 60, 0.14);
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==== Buttons ==== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font: inherit; font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .05s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 14px rgba(124, 179, 66, 0.35);
}
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--green-soft); color: var(--green-dark); text-decoration: none; }

.btn-outline {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; text-decoration: none; }

/* ==== Login page ==== */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at top left, rgba(124,179,66,0.25), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(46,125,190,0.18), transparent 55%),
    var(--bg);
  padding: 40px 20px;
}

.login-wrap {
  width: 100%;
  max-width: 460px;
  display: flex; flex-direction: column; align-items: center;
}

.login-card {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 36px 36px;
  text-align: center;
}

.login-logos {
  display: flex; justify-content: center; align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.login-logos img {
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.login-logos .logo-npz { max-width: 180px; }
.login-logos .logo-edu { max-width: 170px; }
.logo-divider {
  width: 1px; height: 46px;
  background: var(--border);
  display: inline-block;
}

.portal-label {
  display: inline-block;
  margin: 0 auto 10px;
  padding: 6px 18px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .12em;
  border-radius: 999px;
  text-transform: uppercase;
}

.login-title {
  font-size: 1.6rem;
  margin: 0 0 8px;
  color: var(--navy);
}
.login-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: .98rem;
}

.login-form {
  display: flex; flex-direction: column; gap: 14px;
}
.login-form input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  background: #fafbfa;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  text-align: center;
  letter-spacing: .05em;
}
.login-form input:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124, 179, 66, 0.18);
}

.login-error {
  min-height: 1.2em;
  color: #c0392b;
  font-size: .9rem;
  margin: 0;
}

.login-footer {
  margin-top: 22px;
  font-size: .85rem;
  color: var(--muted);
}

/* ==== Header ==== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
}
.brand img {
  height: 46px;
  width: auto;
}
.brand-divider {
  width: 1px; height: 32px;
  background: var(--border);
}
.brand-edu { height: 38px !important; }
.site-nav {
  display: flex; align-items: center; gap: 14px;
}
.nav-label {
  color: var(--navy);
  font-weight: 600;
  font-size: .95rem;
}

/* ==== Hero ==== */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(124,179,66,0.18), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(46,125,190,0.12), transparent 60%),
    linear-gradient(180deg, #f7fbf3 0%, #f5f8f3 100%);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 2rem;
}
.hero-sub {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 720px;
  font-size: 1.05rem;
}

.bulk-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.bulk-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.bulk-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
  color: var(--navy);
}
.bulk-icon {
  flex: 0 0 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
}
.bulk-text strong { display: block; font-size: 1.05rem; color: var(--navy); margin-bottom: 2px; }
.bulk-text span  { display: block; color: var(--muted); font-size: .92rem; }

/* ==== Catalog ==== */
.catalog {
  padding: 36px 0 60px;
}
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.search-wrap {
  flex: 1 1 260px;
  max-width: 360px;
}
.search-wrap input {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(124,179,66,0.18);
}

.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.filter-btn {
  padding: 8px 16px;
  font: inherit; font-size: .9rem; font-weight: 600;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.filter-btn:hover { border-color: var(--green); color: var(--green-dark); }
.filter-btn.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.series-block { margin-bottom: 40px; }
.series-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
  display: inline-block;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f1f7ea 0%, #e8f1f7 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.product-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--green-dark);
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  padding: 12px;
  width: 100%; height: 100%;
}
.product-placeholder .code {
  font-size: 1.9rem;
  background: #fff;
  color: var(--green-dark);
  padding: 8px 22px;
  border-radius: 999px;
  border: 2px solid var(--green);
}

.product-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--green);
  color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.product-badge.pending {
  background: #cfd6df;
  color: var(--navy);
}

.product-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.product-code {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  color: var(--green-dark);
  text-transform: uppercase;
}
.product-name-pl {
  margin: 0;
  font-size: 1.02rem; font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}
.product-name-en {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
}
.product-actions {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.product-actions a,
.product-actions span {
  flex: 1 1 auto;
  font-size: .82rem; font-weight: 600;
  padding: 8px 12px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fafbfa;
  color: var(--navy);
  transition: background-color .15s, color .15s, border-color .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.product-actions a:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  text-decoration: none;
}
.product-actions span.disabled {
  opacity: .55;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}

/* ==== Footer ==== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: .9rem;
}
.site-footer a { color: var(--blue-dark); }

/* ==== Responsive ==== */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.55rem; }
  .hero-sub { font-size: .98rem; }
  .header-inner { flex-wrap: wrap; }
  .nav-label { display: none; }
  .login-card { padding: 36px 24px 28px; }
}
