/* ============================================================
   rabaty-bony-kupony.pl — Global Styles
   Motyw: zielony Groupon-like (#53a318)
   ============================================================ */

:root {
  --green:       #53a318;
  --green-dark:  #3d7a12;
  --green-light: #e8f5d9;
  --red:         #e31c23;
  --orange:      #f97316;
  --text:        #1a1a1a;
  --muted:       #6b7280;
  --border:      #e5e7eb;
  --bg:          #f9fafb;
  --white:       #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,.08);
  --radius:      10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

img { max-width: 100%; display: block; }

/* ── TOPBAR ── */
.topbar {
  background: #1a2700;
  color: #cde88a;
  font-size: .78rem;
  text-align: center;
  padding: 6px 16px;
  letter-spacing: .02em;
}
.topbar a { color: #a8d44e; }
.topbar a:hover { text-decoration: underline; }

/* ── HEADER ── */
.site-header {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -.02em;
}
.site-logo .logo-accent { color: #cde88a; }

.header-search {
  flex: 1;
  display: flex;
  gap: 0;
  max-width: 520px;
}
.header-search input {
  flex: 1;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 9px 14px;
  font-size: .9rem;
  outline: none;
}
.header-search button {
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 18px;
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s;
}
.header-search button:hover { background: #2d5a0c; }

.header-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-nav a {
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .15s;
}
.header-nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.header-nav .btn-login {
  background: #fff;
  color: var(--green);
  font-weight: 700;
  padding: 6px 16px;
}
.header-nav .btn-login:hover { background: #eeffcc; color: var(--green-dark); }

/* ── NAV KATEGORII ── */
.cat-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 100;
}
.cat-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-item {
  white-space: nowrap;
  padding: 10px 14px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.cat-nav-item:hover,
.cat-nav-item.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #2d5a0c 0%, var(--green) 60%, #78c832 100%);
  color: #fff;
  padding: 56px 24px;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -.03em;
}
.hero h1 span { color: #cde88a; }
.hero p {
  font-size: 1.05rem;
  opacity: .9;
  margin-bottom: 28px;
  max-width: 480px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}
.btn-primary { background: #fff; color: var(--green-dark); }
.btn-primary:hover { background: #cde88a; color: var(--green-dark); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* hero type pills */
.hero-types { display: flex; flex-direction: column; gap: 16px; }
.hero-type-pill {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  transition: background .2s;
}
.hero-type-pill:hover { background: rgba(255,255,255,.22); color: #fff; }
.hero-type-pill .pill-icon { font-size: 1.8rem; flex-shrink: 0; }
.hero-type-pill h3 { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.hero-type-pill p { font-size: .78rem; opacity: .8; margin: 0; }

/* ── TRUST BAR ── */
.trust-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.trust-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item { text-align: center; }
.trust-item .val { font-size: 1.5rem; font-weight: 800; color: var(--green); }
.trust-item .lbl { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ── SEKCJA ── */
.section { max-width: 1280px; margin: 0 auto; padding: 40px 24px; }
.section-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-hdr h2 { font-size: 1.45rem; font-weight: 800; }
.section-hdr a { font-size: .85rem; color: var(--green); }
.section-hdr a:hover { text-decoration: underline; }

/* badge szuflad kategorii */
.type-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.type-rabat   { background: #fef2f2; color: var(--red); }
.type-kupon   { background: #fff7ed; color: #c2410c; }
.type-bon     { background: #eff6ff; color: #1d4ed8; }
.type-cashback{ background: var(--green-light); color: var(--green-dark); }
.type-grupowe { background: #fdf4ff; color: #7e22ce; }

/* ── SIATKA OFERT ── */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.deal-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  color: var(--text);
}

.deal-img {
  position: relative;
  background: #eef6e0;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}
.deal-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; }

.deal-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .03em;
}
.deal-badge.cashback { background: var(--green); }
.deal-badge.bon { background: #2563eb; }
.deal-badge.kupon { background: var(--orange); }
.deal-badge.grupowe { background: #7c3aed; }

.deal-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.deal-brand { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.deal-title { font-size: .94rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; flex: 1; }

.deal-pricing { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.deal-price-new { font-size: 1.25rem; font-weight: 900; color: var(--green-dark); }
.deal-price-old { font-size: .85rem; text-decoration: line-through; color: var(--muted); }
.deal-discount { font-size: .78rem; font-weight: 700; color: var(--red); background: #fef2f2; padding: 2px 7px; border-radius: 4px; }

.deal-meta { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--muted); }
.deal-sold { display: flex; align-items: center; gap: 4px; }

.deal-progress { height: 4px; background: #e5e7eb; border-radius: 2px; margin: 8px 0 4px; }
.deal-progress-bar { height: 100%; background: var(--green); border-radius: 2px; }

.deal-cta {
  margin: 10px 16px 14px;
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 7px;
  font-weight: 700;
  font-size: .88rem;
  transition: background .18s;
}
.deal-card:hover .deal-cta { background: var(--green-dark); }

/* cashback card variant */
.deal-card.cashback-card .deal-img { background: #e8f5d9; }
.cashback-pct { font-size: 2.5rem; font-weight: 900; color: var(--green); }

/* ── SIATKA KATEGORII ── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: all .18s;
}
.cat-card:hover { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.cat-card .cat-icon { font-size: 2rem; margin-bottom: 8px; }
.cat-card .cat-label { font-size: .8rem; font-weight: 700; }
.cat-card .cat-count { font-size: .7rem; color: var(--muted); }

/* ── BANNER CASHBACK ── */
.cashback-banner {
  background: linear-gradient(135deg, var(--green) 0%, #78c832 100%);
  border-radius: 14px;
  padding: 40px 48px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.cashback-banner h2 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.cashback-banner p { opacity: .9; font-size: 1rem; }
.cashback-banner .cash-list { margin-top: 14px; display: flex; gap: 24px; flex-wrap: wrap; }
.cashback-banner .cash-item { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.cashback-banner .cash-pct { font-size: 2rem; font-weight: 900; color: #cde88a; }

/* ── NEWSLETTER ── */
.nl-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 40px;
  text-align: center;
}
.nl-banner h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.nl-banner p { color: var(--muted); margin-bottom: 20px; font-size: .9rem; }
.nl-form { display: flex; gap: 0; max-width: 440px; margin: 0 auto; }
.nl-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 11px 16px;
  font-size: .9rem;
  outline: none;
}
.nl-form input:focus { border-color: var(--green); }
.nl-form button {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s;
}
.nl-form button:hover { background: var(--green-dark); }

/* ── HOW IT WORKS ── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.how-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.how-icon { font-size: 2.5rem; margin-bottom: 12px; }
.how-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.how-item p { font-size: .82rem; color: var(--muted); }

/* ── OFERTA DETAIL ── */
.offer-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.offer-gallery {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}
.offer-sidebar {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  position: sticky;
  top: 130px;
}
.offer-price-block { margin-bottom: 20px; }
.offer-price-big { font-size: 2.2rem; font-weight: 900; color: var(--green-dark); }
.offer-price-old { font-size: 1rem; text-decoration: line-through; color: var(--muted); }
.offer-save-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 10px;
}
.offer-cta {
  display: block;
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 800;
  transition: background .2s;
  margin-bottom: 12px;
}
.offer-cta:hover { background: var(--green-dark); color: #fff; }
.offer-info-list { list-style: none; }
.offer-info-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.offer-info-list li:last-child { border-bottom: none; }
.offer-info-list li .lbl { color: var(--muted); }
.offer-info-list li .val { font-weight: 600; }

/* ── KONTO ── */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.account-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  height: fit-content;
}
.account-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  font-size: .88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s;
}
.account-sidebar-item:hover { background: var(--green-light); }
.account-sidebar-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 700; }
.account-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
}
.voucher-box {
  border: 2px dashed var(--green);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--green-light);
  text-align: center;
}
.voucher-code {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--green-dark);
}

/* ── ZALOGUJ ── */
.auth-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-box {
  background: var(--white);
  box-shadow: var(--card-shadow);
  border-radius: 14px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-box h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.auth-box .sub { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: .95rem;
  outline: none;
  transition: border .2s;
}
.form-control:focus { border-color: var(--green); }
.btn-full { width: 100%; justify-content: center; padding: 12px 0; font-size: 1rem; }
.sms-digits { display: flex; gap: 7px; margin-bottom: 16px; }
.sms-digits input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
}
.sms-digits input:focus { border-color: var(--green); }
.alert { padding: 11px 16px; border-radius: 7px; font-size: .88rem; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #86efac; }

/* ── FOOTER ── */
.site-footer {
  background: #1a2700;
  color: rgba(255,255,255,.7);
  padding: 48px 24px 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand .logo { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-brand .logo span { color: #cde88a; }
.footer-brand p { font-size: .82rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: .85rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .82rem; transition: color .15s; }
.footer-col ul li a:hover { color: #cde88a; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: .76rem;
  color: rgba(255,255,255,.4);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-types { display: grid; grid-template-columns: 1fr 1fr; }
  .offer-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .account-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 36px 16px; }
  .hero-types { grid-template-columns: 1fr; }
  .deals-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .cashback-banner { grid-template-columns: 1fr; text-align: center; padding: 28px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-search { display: none; }
}
@media (max-width: 480px) {
  .deals-grid { grid-template-columns: 1fr 1fr; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .nl-form { flex-direction: column; }
  .nl-form input { border-right: 1px solid var(--border); border-radius: var(--radius); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
  .nl-form button { border-radius: 0 0 var(--radius) var(--radius); padding: 12px; }
  .auth-box { padding: 28px 20px; }
}
