/*
Theme Name: GamerBasar – Kleinanzeigen Pro
Theme URI: https://example.com
Author: ChatGPT
Description: GamerBasar Kleinanzeigen-Theme mit modernem Design, Logo, Startseite (Hero), Anzeigen, Dashboard, Bilder, Kontaktformular.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kleinanzeigen-pro-theme
*/

:root{
  --max: 1160px;
  --pad: 18px;

  /* Brand (aus Logo abgeleitet) */
  --primary: #2563eb;        /* Blau */
  --primary-700: #1d4ed8;
  --primary-soft: #eff6ff;

  --accent: #fb8c00;         /* Orange */
  --accent-soft: #fff7ed;

  --success: #16a34a;        /* Grün */
  --success-soft: #ecfdf5;

  --bg: #f4f6f8;
  --card: #ffffff;
  --border: #e5e7eb;

  --text: #0f172a;
  --muted: #64748b;

  --radius: 18px;
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
}

*{ box-sizing:border-box; }
body{ margin:0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; line-height:1.6; background:var(--bg); color:var(--text); }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }
.container{ max-width:var(--max); margin:0 auto; padding:0 var(--pad); }

.site-header{
  border-bottom:1px solid var(--border);
  padding:16px 0;
  background:rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  position:sticky; top:0; z-index:10;
}
.header-row{ display:flex; gap:14px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.brand{ display:flex; gap:12px; align-items:baseline; }
.brand strong{ font-size:20px; }
.brand span{ color:var(--muted); font-size:14px; }

.nav{ display:flex; gap:10px; flex-wrap:wrap; }
.nav a{ padding:7px 11px; border:1px solid transparent; border-radius:999px; }
.nav a:hover{ background:#f5f5f5; text-decoration:none; }

.main{ padding:22px 0; }
.grid{ display:grid; grid-template-columns: 1fr; gap:14px; }
@media (min-width: 900px){ .grid{ grid-template-columns: 1fr 360px; } }

.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  background:var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.07);
}
.cards{ display:grid; grid-template-columns: 1fr; gap:14px; }
@media (min-width: 640px){ .cards{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px){ .cards{ grid-template-columns: 1fr 1fr 1fr; } }

.ad-card{ display:flex; flex-direction:column; gap:10px; }
.thumb{
  width:100%;
  aspect-ratio: 4/3;
  border-radius:14px;
  overflow:hidden;
  background:#f2f2f2;
  border:1px solid #f0f0f0;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.gallery{
  display:grid;
  grid-template-columns: repeat(1, 1fr);
  gap:10px;
}
@media (min-width: 720px){ .gallery{ grid-template-columns: repeat(2, 1fr); } }
.gallery .thumb{ aspect-ratio: 16/10; }

.price{ font-weight:800; font-size:18px; }
.meta{ color:var(--muted); font-size:13px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.badge{ display:inline-block; font-size:12px; padding:4px 9px; border-radius:999px; border:1px solid var(--border); color:var(--muted); background:#fff; }
.badge.featured{
  background:linear-gradient(135deg,#facc15,#fb923c);
  color:#78350f;
  border:none;
  font-weight:800;
}

.form-row{ display:grid; grid-template-columns: 1fr; gap:10px; margin-bottom:10px; }
@media (min-width: 760px){ .form-row.two{ grid-template-columns: 1fr 1fr; } }
label{ font-size:13px; color:var(--muted); display:block; margin-bottom:6px; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea{
  width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:12px; font:inherit; background:#fff;
}
textarea{ min-height:140px; }
button, .button{
  display:inline-block; padding:10px 14px; border-radius:12px; border:1px solid var(--border);
  background:#111; color:#fff; cursor:pointer; font-weight:650;
}
button:hover, .button:hover{ opacity:.93; text-decoration:none; }
.button.secondary{ background:#fff; color:#111; }
.button.danger{ background:#b00020; border-color:#b00020; }

hr.sep{ border:0; border-top:1px solid #eee; margin:16px 0; }

.notice{ padding:10px 12px; border-radius:12px; border:1px solid var(--border); background:#fafafa; }
.notice.ok{ border-color:#cdeccd; background:#f2fbf2; }
.notice.err{ border-color:#f0c2c2; background:#fff4f4; }

.small{ font-size:13px; color:var(--muted); }
.kv{ display:grid; grid-template-columns: 1fr; gap:8px; }
@media (min-width: 760px){ .kv{ grid-template-columns: 1fr 1fr; } }
.kv .card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  background:var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.07);
}

.site-footer{ border-top:1px solid var(--border); padding:18px 0; color:var(--muted); margin-top:24px; background:#fff; }

.table{ width:100%; border-collapse:separate; border-spacing:0; }
.table th, .table td{ text-align:left; padding:10px 8px; border-bottom:1px solid #eee; vertical-align:top; }
.table th{ font-size:12px; color:var(--muted); font-weight:650; }


/* Logo */
.site-logo{
  height: 52px;
  width: auto;
  max-width: 260px;
  display:block;
}
@media (max-width: 768px){
  .site-logo{ height: 42px; max-width: 200px; }
}

/* Hero (Startseite) */
.hero{
  border:1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, var(--primary-soft), #ffffff, var(--accent-soft));
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero h1{ margin:0 0 8px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; }
.hero p{ margin:0 0 14px; color: var(--muted); }
.hero .hero-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.hero .hero-search{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.hero input[type="text"]{ min-width: min(520px, 100%); }

.cat-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
@media (min-width: 720px){ .cat-grid{ grid-template-columns: repeat(4, 1fr); } }
.cat-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  transition: transform .12s ease, background .12s ease;
}
.cat-pill:hover{ transform: translateY(-1px); background: var(--primary-soft); text-decoration:none; }
.cat-pill small{ color: var(--muted); }


/* Header search + theme toggle */
.ka-header-search{ flex: 1 1 320px; max-width: 520px; }
.ka-header-search input{
  width:100%;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
}
.ka-header-search input:focus{
  outline:none;
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.ka-theme-toggle{ white-space:nowrap; }
.ka-theme-label{ font-size: 13px; }

/* Better focus rings globally */
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}



/* Dark mode (auto + manual override)
   - Auto dark: only when user has NOT chosen a theme (no data-theme attribute)
   - Manual: data-theme="dark" or data-theme="light"
*/
@media (prefers-color-scheme: dark){
  :root:not([data-theme]){
    --bg:#0b1220;
    --card:#0f172a;
    --border: rgba(148,163,184,.22);
    --text:#e2e8f0;
    --muted:#94a3b8;
    --shadow: 0 10px 25px rgba(0,0,0,0.35);
    --primary-soft: rgba(37,99,235,.14);
    --accent-soft: rgba(251,140,0,.14);
  }
  :root:not([data-theme]) .site-header{ background: rgba(15,23,42,.75); }
  :root:not([data-theme]) .thumb{ background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.18); }
  :root:not([data-theme]) .badge{ background: rgba(2,6,23,.25); }
  :root:not([data-theme]) .ka-header-search input{ background: rgba(2,6,23,.35); color: var(--text); }
  :root:not([data-theme]) .button.secondary{ background: rgba(2,6,23,.2); color: var(--text); }
}

:root[data-theme="dark"]{
  --bg:#0b1220;
  --card:#0f172a;
  --border: rgba(148,163,184,.22);
  --text:#e2e8f0;
  --muted:#94a3b8;
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
  --primary-soft: rgba(37,99,235,.14);
  --accent-soft: rgba(251,140,0,.14);
}
:root[data-theme="dark"] .site-header{ background: rgba(15,23,42,.75); }
:root[data-theme="dark"] .thumb{ background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.18); }
:root[data-theme="dark"] .badge{ background: rgba(2,6,23,.25); }
:root[data-theme="dark"] .ka-header-search input{ background: rgba(2,6,23,.35); color: var(--text); }
:root[data-theme="dark"] .button.secondary{ background: rgba(2,6,23,.2); color: var(--text); }

/* Force light even if system is dark */
:root[data-theme="light"]{
  --bg: #f4f6f8;
  --card: #ffffff;
  --border:#e5e7eb;
  --text:#0f172a;
  --muted:#64748b;
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --primary-soft:#eff6ff;
  --accent-soft:#fff7ed;
}
:root[data-theme="light"] .site-header{ background:rgba(255,255,255,0.88); }
:root[data-theme="light"] .ka-header-search input{ background:#fff; color: var(--text); }
:root[data-theme="light"] .badge{ background:#fff; }


/* Favorites */
.fav-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor:pointer;
}
.fav-btn:hover{ background: var(--primary-soft); text-decoration:none; }
.fav-btn.is-fav{
  background: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.35);
}
.fav-heart{ font-size: 16px; line-height:1; }

/* Featured slider */
.slider{
  display:flex;
  gap:14px;
  overflow:auto;
  padding-bottom:8px;
  scroll-snap-type: x mandatory;
}
.slider::-webkit-scrollbar{ height:10px; }
.slider::-webkit-scrollbar-thumb{ background: rgba(100,116,139,.35); border-radius:999px; }
.slide{
  min-width: min(320px, 88%);
  scroll-snap-align: start;
}
@media (min-width: 900px){
  .slide{ min-width: 360px; }
}

/* Category icon */
.cat-icon{
  width:28px;
  height:28px;
  border-radius:10px;
  object-fit:cover;
  border:1px solid var(--border);
  background:#fff;
}


/* Modern Home */
.home-hero{
  position:relative;
  overflow:hidden;
  border-radius: calc(var(--radius) + 10px);
  border:1px solid var(--border);
  background: linear-gradient(135deg, var(--primary-soft), #ffffff, var(--accent-soft));
  box-shadow: var(--shadow);
}
.home-hero__bg{
  position:absolute; inset:-20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,.22), transparent 45%),
    radial-gradient(circle at 70% 20%, rgba(251,140,0,.18), transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(22,163,74,.16), transparent 45%);
  filter: blur(10px);
  pointer-events:none;
}
.home-hero__inner{
  position:relative;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px;
}
@media (max-width: 980px){
  .home-hero__inner{ grid-template-columns: 1fr; }
}
.home-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.75);
  border:1px solid var(--border);
  font-weight:700;
  font-size: 13px;
  width: fit-content;
}
.home-hero h1{
  margin:10px 0 8px;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing:-0.03em;
  line-height: 1.05;
}
.home-hero p{
  margin:0 0 16px;
  color: var(--muted);
  max-width: 62ch;
}
.home-search{
  margin-top: 12px;
}
.home-search__row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.home-search input{
  flex: 1 1 320px;
  min-width: min(520px, 100%);
  padding: 14px 16px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.9);
}
.home-search button{ padding: 14px 18px; }
.home-cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 14px;
}
.home-stats{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 16px;
}
.home-stat{
  background: rgba(255,255,255,.75);
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 150px;
}
.home-stat__num{ font-size: 20px; font-weight: 900; }
.home-stat__label{ color: var(--muted); font-size: 12px; }

.home-section{ margin-top: 16px; }
.home-section__header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin: 18px 0 10px;
}
.home-section__header h2{ margin:0; }

.home-cats{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 720px){
  .home-cats{ grid-template-columns: repeat(4, 1fr); }
}
.home-cat{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px 12px;
  border-radius: 18px;
  border:1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration:none;
  color: inherit;
}
.home-cat:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.07);
  background: linear-gradient(180deg, rgba(37,99,235,.06), transparent);
}
.home-cat__emoji{
  width:28px; height:28px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 10px;
  border:1px solid var(--border);
  background:#fff;
}
.home-cat__name{ font-weight: 800; }
.home-cat__count{ margin-top: 2px; }

/* Modern slider */
.ka-slider{
  position:relative;
  margin-top: 12px;
}
.ka-slider__track{
  display:flex;
  gap: 12px;
  overflow:auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scroll-behavior:smooth;
}
.ka-slide{
  min-width: min(320px, 88%);
  scroll-snap-align: start;
  border:1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration:none;
  color:inherit;
  overflow:hidden;
  transition: transform .15s ease;
}
.ka-slide:hover{ transform: translateY(-2px); }
@media (min-width: 980px){
  .ka-slide{ min-width: 340px; }
}
.ka-slide__img img{ width:100%; height: 170px; object-fit: cover; display:block; }
.ka-slide__body{ padding: 12px 12px; }
.ka-slide__price{ font-weight: 900; font-size: 16px; }
.ka-slide__title{ font-weight: 800; margin-top: 2px; }
.ka-slider__btn{
  position:absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.88);
  cursor:pointer;
  box-shadow: var(--shadow);
  display:none;
}
.ka-slider__btn.prev{ left: 8px; }
.ka-slider__btn.next{ right: 8px; }
@media (min-width: 980px){
  .ka-slider__btn{ display:inline-flex; align-items:center; justify-content:center; }
}
.ka-slider__dots{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top: 8px;
}
.ka-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(100,116,139,.25);
}
.ka-dot.is-active{
  width: 18px;
  background: rgba(37,99,235,.55);
}


/* XL Hero */
.heroXL{
  position:relative;
  overflow:hidden;
  border-radius: calc(var(--radius) + 14px);
  border:1px solid var(--border);
  background: linear-gradient(135deg, var(--primary-soft), #ffffff, var(--accent-soft));
  box-shadow: var(--shadow);
}
.heroXL__bg{
  position:absolute; inset:-30%;
  background:
    radial-gradient(circle at 18% 30%, rgba(37,99,235,.22), transparent 48%),
    radial-gradient(circle at 72% 22%, rgba(251,140,0,.18), transparent 44%),
    radial-gradient(circle at 56% 82%, rgba(22,163,74,.16), transparent 46%);
  filter: blur(12px);
  pointer-events:none;
}
.heroXL__inner{
  position:relative;
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  padding: 26px;
}
@media (max-width: 980px){
  .heroXL__inner{ grid-template-columns: 1fr; }
}
.heroXL h1{
  margin:10px 0 8px;
  font-size: clamp(30px, 3.6vw, 52px);
  letter-spacing:-0.04em;
  line-height: 1.02;
}
.heroXL p{ margin:0 0 16px; color: var(--muted); max-width: 68ch; }
.heroXL .home-search input{ background: rgba(255,255,255,.94); }

.trend-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top: 10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  text-decoration:none;
  color: inherit;
  font-weight: 650;
  font-size: 12px;
  transition: transform .12s ease, background .12s ease;
}
.chip:hover{
  transform: translateY(-1px);
  background: var(--primary-soft);
}

.trust{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top: 14px;
}
@media (max-width: 980px){
  .trust{ grid-template-columns: 1fr; }
}
.trust__item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius: 18px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
}
.trust__icon{
  width: 38px; height: 38px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border);
  background:#fff;
  font-size: 18px;
}

.heroPanel{ padding: 16px; }
.heroPanel__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.heroPanel__foot{ margin-top: 12px; }

/* Mega footer */
.mega-footer{
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.mega-footer__grid{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display:grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 18px;
}
@media (max-width: 980px){
  .mega-footer__grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .mega-footer__grid{ grid-template-columns: 1fr; }
}
.mega-footer h3{ margin: 0 0 10px; font-size: 14px; }
.mega-footer ul{ list-style:none; padding:0; margin:0; }
.mega-footer li{ margin: 8px 0; }
.mega-footer a{ color: var(--text); text-decoration:none; }
.mega-footer a:hover{ text-decoration: underline; }
.mega-footer__brand{ display:flex; align-items:center; gap:12px; }

/* Smooth entrance */
@media (prefers-reduced-motion: no-preference){
  .heroXL__copy, .heroXL__panel{
    animation: kaFadeUp .45s ease both;
  }
  .heroXL__panel{ animation-delay: .06s; }
  @keyframes kaFadeUp{
    from{ opacity:0; transform: translateY(10px); }
    to{ opacity:1; transform: translateY(0); }
  }
}


/* Radius field */
.ka-radius{ padding:10px 12px; border-radius:14px; border:1px solid var(--border); }


details summary{ cursor:pointer; }
details summary:hover{ text-decoration: underline; }


/* Unread badge in menu */
.ka-badge-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  margin-left:6px;
  border-radius:999px;
  background: rgba(220,38,38,.16);
  border:1px solid rgba(220,38,38,.35);
  font-size:12px;
  font-weight:800;
}


/* Fair price tones */
.badge.good{ background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.35); }
.badge.neutral{ background: rgba(100,116,139,.10); border-color: rgba(100,116,139,.25); }
.badge.warn{ background: rgba(234,179,8,.12); border-color: rgba(234,179,8,.35); }
.badge.bad{ background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); }


/* Header fixes */
.site-header .brand img{
  height: 42px;
  width: auto;
  display:block;
}
.site-header .header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.site-header .main-nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}


/* GB HOME */
.gb-home .container{ max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.gb-hero{ padding: 42px 0 18px; }
.gb-hero-grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
@media (max-width: 980px){ .gb-hero-grid{ grid-template-columns: 1fr; } }
.gb-hero-copy h1{ font-size: clamp(28px, 3vw, 44px); line-height: 1.06; margin: 0; }
.gb-sub{ margin-top: 10px; color: var(--muted); font-size: 16px; }
.gb-search{ margin-top: 16px; display:grid; grid-template-columns: 1fr 180px 140px; gap: 10px; }
@media (max-width: 680px){ .gb-search{ grid-template-columns: 1fr; } }
.gb-search input, .gb-search select{ width: 100%; padding: 12px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: inherit; }
.gb-search button{ padding: 12px 14px; border-radius: 14px; font-weight: 800; }
.gb-quick{ margin-top: 12px; display:flex; flex-wrap:wrap; gap: 8px; }
.gb-chip{ display:inline-flex; padding: 7px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); text-decoration:none; font-weight: 700; font-size: 13px; }
.gb-cta{ margin-top: 14px; display:flex; gap: 10px; flex-wrap:wrap; }
.gb-stats{ margin-top: 16px; display:flex; gap: 10px; flex-wrap:wrap; }
.gb-stat{ padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); min-width: 140px; }
.gb-stat-num{ font-weight: 900; font-size: 18px; }
.gb-stat-label{ color: var(--muted); font-size: 12px; margin-top: 2px; }

.gb-hero-card{ border-radius: 22px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); overflow:hidden; }
.gb-slider{ padding: 14px; }
.gb-slider-head{ display:flex; justify-content:space-between; align-items:center; gap: 10px; margin-bottom: 10px; }
.gb-kicker{ font-weight: 900; font-size: 16px; }
.gb-small{ color: var(--muted); font-size: 12px; }
.gb-slider-controls{ display:flex; gap: 8px; }
.gb-icon{ width: 34px; height: 34px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: inherit; font-weight: 900; }
.gb-slides{ display:flex; transition: transform .45s ease; }
.gb-slide{ padding: 8px; box-sizing:border-box; }
.gb-slide-link{ display:grid; grid-template-columns: 120px 1fr; gap: 12px; text-decoration:none; color: inherit; padding: 10px; border-radius: 18px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.12); }
@media (max-width: 420px){ .gb-slide-link{ grid-template-columns: 1fr; } }
.gb-slide-media img{ width:100%; height: 90px; object-fit: cover; border-radius: 14px; display:block; }
.gb-ph{ width:100%; height: 90px; border-radius: 14px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,.04); font-size: 28px; }
.gb-slide-title{ font-weight: 900; line-height: 1.12; }
.gb-price{ margin-top: 6px; font-weight: 900; }
.gb-dots{ margin-top: 10px; display:flex; gap: 6px; justify-content:center; }
.gb-dot{ width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.25); }
.gb-dot.is-active{ background: rgba(255,255,255,.70); }
.gb-empty{ padding: 18px; border-radius: 18px; border: 1px dashed rgba(255,255,255,.18); text-align:center; }
.gb-empty-ico{ font-size: 26px; }
.gb-empty-title{ font-weight: 900; margin-top: 6px; }

.gb-section{ padding: 18px 0 28px; }
.gb-section-head{ display:flex; align-items:end; justify-content:space-between; gap: 12px; margin-bottom: 12px; }
.gb-section h2{ margin: 0; font-size: 22px; }
.gb-link{ text-decoration:none; font-weight: 800; }

.gb-cat-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px){ .gb-cat-grid{ grid-template-columns: repeat(2, 1fr);} }
.gb-cat{ padding: 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); text-decoration:none; color: inherit; }
.gb-cat-ico{ width: 34px; height: 34px; border-radius: 12px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,.06); font-weight: 900; }
.gb-cat-name{ margin-top: 10px; font-weight: 900; }

.gb-steps .gb-step-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px){ .gb-steps .gb-step-grid{ grid-template-columns: 1fr; } }
.gb-step{ padding: 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); }
.gb-step-num{ width: 34px; height: 34px; border-radius: 12px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,.06); font-weight: 900; }
.gb-step-title{ margin-top: 10px; font-weight: 900; }

.gb-trust{ display:grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 980px){ .gb-trust{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .gb-trust{ grid-template-columns: 1fr;} }
.gb-trust-item{ padding: 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); }
.gb-trust-ico{ font-size: 22px; }
.gb-trust-title{ margin-top: 8px; font-weight: 900; }

.gb-footer-cta .gb-footer-card{ padding: 18px; border-radius: 22px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); display:flex; justify-content:space-between; gap: 14px; align-items:center; flex-wrap:wrap; }
.gb-footer-actions{ display:flex; gap: 10px; flex-wrap:wrap; }


/* Theme toggle button */
.gb-theme-toggle{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gb-theme-toggle:hover{ transform: translateY(-1px); }
.gb-theme-ico{ font-size: 16px; line-height: 1; }


/* ===== Theme tokens (Dark/Light) — refined ===== */
:root{
  /* default: dark */
  --bg: #070A12;
  --surface: rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.06);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --border: rgba(255,255,255,.10);
  --input: rgba(255,255,255,.05);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --accent: #6EA8FF;
  --accent-2: #A6C6FF;
}

html, body{ background: var(--bg); color: var(--text); }

/* Apple-like light mode */
[data-theme="light"]{
  --bg: #F5F6FA;
  --surface: rgba(255,255,255,.78);
  --surface-2: rgba(255,255,255,.92);
  --text: rgba(15, 20, 30, .92);
  --muted: rgba(15, 20, 30, .64);
  --border: rgba(15, 20, 30, .10);
  --input: rgba(15, 20, 30, .04);
  --shadow: 0 12px 30px rgba(15,20,30,.10);
  --accent: #0A84FF;
  --accent-2: #4DA3FF;
}

/* Apply tokens to common elements */
.card,
.gb-hero-card,
.gb-cat,
.gb-step,
.gb-trust-item,
.gb-footer-card,
.gb-stat{
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow);
}

.gb-slide-link{
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}

input, select, textarea{
  background: var(--input) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.small, .gb-small, .gb-sub, .gb-stat-label{ color: var(--muted) !important; }
a{ color: inherit; }

/* Buttons (clean) */
button, .button{
  border-radius: 14px;
}
.button{
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: 1px solid rgba(255,255,255,.12);
  color: #fff !important;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(10,132,255,.22);
}
[data-theme="dark"] .button{
  box-shadow: 0 12px 26px rgba(110,168,255,.18);
}
.button.secondary{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text) !important;
  box-shadow: none;
}
.button.secondary:hover{
  background: var(--surface-2);
}

/* Header */
.site-header{
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
[data-theme="light"] .site-header{
  background: rgba(245,246,250,.70);
}

/* Theme toggle button */
.gb-theme-toggle{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.gb-theme-toggle:hover{ transform: translateY(-1px); }
.gb-theme-ico{ font-size: 16px; line-height: 1; }

/* Fine-tune dark mode components */
:root[data-theme="dark"] .gb-slide-media img{ filter: saturate(1.05) contrast(1.02); }
:root[data-theme="dark"] .gb-chip{ background: rgba(255,255,255,.04); }
:root[data-theme="dark"] .gb-icon{ background: rgba(255,255,255,.06); }
:root[data-theme="light"] .gb-icon{ background: rgba(15,20,30,.04); }


/* GB ARCHIVE */
.gb-archive .container{ max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.gb-archive-head{ display:flex; justify-content:space-between; gap: 12px; align-items:flex-end; padding: 22px 0 10px; }
.gb-h1{ margin: 0; font-size: 28px; }
.gb-archive-grid{ display:grid; grid-template-columns: 320px 1fr; gap: 16px; align-items:start; }
@media (max-width: 980px){ .gb-archive-grid{ grid-template-columns: 1fr; } }

.gb-filters{ position: sticky; top: 14px; }
@media (max-width: 980px){ .gb-filters{ position: static; } }

.gb-filter-form{ display:flex; flex-direction:column; gap: 10px; }
.gb-filter-card{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.gb-filter-title{ font-weight: 900; margin-bottom: 8px; }
.gb-filter-form input, .gb-filter-form select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
}
.gb-two{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px){ .gb-two{ grid-template-columns: 1fr; } }

.gb-filter-actions{ display:flex; gap: 10px; flex-wrap:wrap; }
.gb-results-bar{
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.gb-cards{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 1100px){ .gb-cards{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 640px){ .gb-cards{ grid-template-columns: 1fr;} }

.gb-card{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.gb-card-link{ display:block; color: inherit; text-decoration:none; }
.gb-card-media img{ width: 100%; height: 160px; object-fit: cover; display:block; }
.gb-card-body{ padding: 12px; }
.gb-card-title{ font-weight: 900; line-height: 1.12; }
.gb-card-price{ margin-top: 8px; font-weight: 900; font-size: 18px; }
.gb-card-meta{ margin-top: 10px; display:flex; gap: 10px; flex-wrap:wrap; color: var(--muted); font-size: 12px; }

.gb-pagination{ margin: 16px 0 8px; }
.gb-pagination .page-numbers{
  display:inline-flex;
  min-width: 34px;
  height: 34px;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration:none;
  margin-right: 6px;
  box-shadow: none;
}
.gb-pagination .page-numbers.current{
  background: var(--surface-2);
  font-weight: 900;
}

.gb-empty-big{
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed var(--border);
  background: var(--surface);
  text-align:center;
  box-shadow: var(--shadow);
}
.gb-empty-title{ font-weight: 900; margin-top: 6px; }


/* GB SINGLE */
.gb-single .container{ max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.gb-breadcrumb{ padding: 16px 0 6px; display:flex; gap: 8px; flex-wrap:wrap; color: var(--muted); font-size: 12px; }
.gb-breadcrumb a{ text-decoration:none; }
.gb-single-grid{ display:grid; grid-template-columns: 1fr 360px; gap: 16px; align-items:start; padding: 10px 0 28px; }
@media (max-width: 980px){ .gb-single-grid{ grid-template-columns: 1fr; } }

.gb-single-card{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.gb-single-head{ display:flex; justify-content:space-between; gap: 12px; align-items:flex-start; flex-wrap:wrap; }
.gb-single-title{ margin: 0; font-size: 28px; line-height: 1.08; }
.gb-single-sub{ margin-top: 8px; display:flex; gap: 10px; flex-wrap:wrap; color: var(--muted); font-size: 12px; }
.gb-single-price{ text-align:right; font-weight: 900; font-size: 26px; }
@media (max-width: 520px){ .gb-single-price{ text-align:left; } }

.gb-single-media{ margin-top: 12px; }
.gb-single-img img{ width: 100%; height: 340px; object-fit: cover; border-radius: 18px; display:block; }
@media (max-width: 520px){ .gb-single-img img{ height: 240px; } }
.gb-single-hw{ margin-top: 12px; }
.gb-single-content{ margin-top: 14px; line-height: 1.6; }

.gb-single-side{ position: sticky; top: 14px; }
@media (max-width: 980px){ .gb-single-side{ position: static; } }
.gb-side-card{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.gb-side-title{ font-weight: 900; margin-bottom: 10px; }
.gb-seller{ display:flex; gap: 12px; align-items:center; }
.gb-seller-avatar{
  width: 44px; height: 44px; border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 900;
}
.gb-seller-name{ font-weight: 900; }
.gb-side-actions{ margin-top: 12px; display:flex; flex-direction:column; gap: 10px; }
.gb-details{ display:flex; flex-direction:column; gap: 10px; }
.gb-detail-row{ display:flex; justify-content:space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.gb-detail-row strong{ color: var(--text); }

.gb-cards-compact .gb-card-media img{ height: 130px; }


/* GB CREATE FORM */
.gb-form .gb-form-head{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.gb-form .gb-form-head h1{ margin: 0; font-size: 26px; }
.gb-form-card{
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.gb-form-grid{
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px){ .gb-form-grid{ grid-template-columns: 1fr; } }
.gb-form input[type="text"],
.gb-form input[type="number"],
.gb-form input[type="email"],
.gb-form input[type="search"],
.gb-form select,
.gb-form textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
}
.gb-form textarea{ min-height: 140px; }


/* GB_HIDE_LEGACY_FIELDS (backup) */
input[name="ka_contact_email"],
input[name="ka_lat"],
input[name="ka_lng"]{
  display:none !important;
}


/* GB_CREATE_TIPS */
.gb-help details{ border-top:1px solid var(--border); padding-top:10px; margin-top:10px; }
.gb-help summary{ cursor:pointer; font-weight:900; list-style:none; }
.gb-help summary::-webkit-details-marker{ display:none; }
.gb-help summary:after{ content:"›"; float:right; transform: rotate(90deg); opacity:.7; }
.gb-help details[open] summary:after{ transform: rotate(-90deg); }


/* GB_CREATE_COSMETIC */
.gb-create-wrap{
  background: radial-gradient(900px 360px at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
              radial-gradient(700px 300px at 85% 10%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}
.gb-create-card{ transition: transform .15s ease; }
.gb-create-card:hover{ transform: translateY(-1px); }


/* GB_TWO_GENERIC */
.gb-two{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
@media (max-width:420px){ .gb-two{ grid-template-columns:1fr; } }


/* GB_SITE_POLISH_V37 */
:focus-visible{ outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 10px; }
.main-nav a{ padding: 8px 10px; border-radius: 12px; }
.main-nav a:hover{ background: var(--surface-2); }
@media (max-width: 760px){
  .main-nav{ gap: 8px; }
  .main-nav a{ padding: 8px 8px; font-size: 14px; }
}
.notice{ padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); margin: 12px 0; }
.notice.err{ border-color: color-mix(in srgb, #ff4d4d 40%, var(--border)); }
.notice.warn{ border-color: color-mix(in srgb, #ffb020 40%, var(--border)); }
.badge{ display:inline-flex; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); font-weight: 900; font-size: 12px; }
.badge.good{ background: rgba(0,200,120,.12); border-color: rgba(0,200,120,.25); }
.badge.high{ background: rgba(255,80,80,.12); border-color: rgba(255,80,80,.25); }
.badge.low{ background: rgba(255,176,32,.12); border-color: rgba(255,176,32,.25); }


/* GB_TIPS_CLICK_HELP */
.gb-help-title, .tip-title, .gb-tip-title{ cursor: default; }


/* GB_LIST_POLISH_SAFE_V39 */
.gb-card{ transition: transform .16s ease; }
.gb-card:hover{ transform: translateY(-2px); }
.gb-card-media{ overflow:hidden; }
.gb-card-media img{ transition: transform .22s ease; }
.gb-card:hover .gb-card-media img{ transform: scale(1.03); }


/* GB_LIST_BADGES_SAFE_V40 */
.gb-card-media{ position: relative; }
.gb-card-badges{
  position:absolute; left:10px; top:10px;
  display:flex; gap:6px; flex-wrap:wrap; z-index:2;
}
.gb-seller-inline{ color: var(--muted); font-size: 12px; }
