:root{
  --bg:#0b0d10; --panel:#12161b; --ink:#e8edf2; --muted:#9fb0c0;
  --accent:#4aa8ff; --accent-2:#7ce2b1;
  --ring:0 0 0 3px rgba(74,168,255,.35);
  --radius:16px; --shadow:0 10px 30px rgba(0,0,0,.25);
}

/* Reset + bazowe */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,Helvetica,sans-serif;
  color:var(--ink); background:linear-gradient(180deg,#0b0d10 0%, #0f1216 100%);
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1100px; margin:0 auto; padding:24px}
h1{font-size:2rem; margin:8px 0 18px}
h2{font-size:1.25rem; margin:0 0 10px}
p{color:#d6dee6; line-height:1.6}

/* Header / Navi */
.site-header{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 24px; background:#0b0d10e6; backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid #1e232a;
}
.logo {
  display: inline-block;
  width: 800px;         /* szerokość logo */
  height: 80px;         /* wysokość logo */
  background: url("termoglasslogo2.png") no-repeat center;
  background-size: contain;
  border-radius: 25px;
  text-indent: -9999px; /* ukryj tekst "TERMOGLASS" */
  overflow: hidden;
}

.main-nav{display:flex; gap:16px}
.main-nav a{
  font-size:1.05rem; font-weight:600; padding:12px 18px;
  /* bardziej zaokrąglone BOKI (góra/dół subtelniej) */
  border-radius:24px / 50%;
  color:#fff; transition:background .2s ease;
}
.main-nav a:hover{background:rgba(255,255,255,.10)}
.main-nav a[aria-current="page"]{background:rgba(255,255,255,.15)}

.site-footer{
  border-top:1px solid #1e232a; padding:20px 24px; text-align:center;
  color:var(--muted); background:#0b0d10;
}

/* Formularze / pola */
input[type="search"], select, input[type="text"], input[type="email"], textarea{
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid #27303a;
  background:#0e1318; color:var(--ink); outline:none;
}
input:focus, select:focus, textarea:focus{box-shadow:var(--ring); border-color:#2b3947}
.btn{
  background:var(--accent); color:#031625; border:none; padding:10px 14px;
  border-radius:12px; font-weight:700; cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}

/* ===================== */
/*  HEADER + HAMBURGER   */
/* ===================== */

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg, #0e0f12);
}

.logo {
  font-weight: 800;
  letter-spacing: .5px;
  text-decoration: none;
}

/* ukryty przełącznik */
.nav-toggle {
  position: absolute;
  left: -9999px;
}

/* Przycisk hamburgera – domyślnie ukryty (pokazujemy na <=768px) */
.burger {
  display: none;
  inline-size: 44px;
  block-size: 44px;
  margin-left: auto;

  /* układ */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  /* wygląd */
  border-radius: 50px;
  /* background: rgba(255,255,255,.06); */
  /* border: 1px solid #27303a; */
  color: var(--ink, #e8edf2);
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 6px 16px rgba(0,0,0,.25);
  transition: background .2s ease, border-color .2s ease, transform .12s ease, color .2s ease;
  position: relative;
  z-index: 60; /* ponad menu */
}

/* paseczki */
.burger span {
  display: block;
  inline-size: 22px;
  block-size: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease, background .2s ease;
}

/* stany */
.burger:hover {
  background: rgba(255,255,255,.10);
  border-color: #32404e;
}
.burger:active { transform: scale(.98); }
.burger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74,168,255,.35);
}

/* animacja do „X” po otwarciu */
.nav-toggle:checked + .burger {
  background: rgba(74,168,255,.12);
  border-color: var(--accent, #4aa8ff);
  color: var(--accent, #4aa8ff);
}
.nav-toggle:checked + .burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle:checked + .burger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked + .burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===================== */
/*  NAV – DESKTOP        */
/* ===================== */

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ===================== */
/*  RESPONSIVE           */
/* ===================== */

/* Tablet i mniejsze */
@media (max-width: 1024px) {
  /* siatka produktów: 2 w rzędzie */
  #grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
  }
  .card img { width: 100%; height: auto; display: block; }
}

/* Telefony */
@media (max-width: 768px) {
  body { font-size: 15px; }

  /* hamburger on */
  .burger { 
    display: inline-flex;
    color: var(--text, #eaecef);
  }

  /* menu mobilne – domyślnie ukryte, z animacją */
  .main-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--bg, #0e0f12);
    border-top: 1px solid rgba(255,255,255,.06);
    display: grid;
    gap: 8px;
    padding: 12px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 50;
  }

  /* po otwarciu hamburgera pokaż menu */
  .nav-toggle:checked ~ .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* siatka produktów: 1 w rzędzie */
  #grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* karty produktów */
  .card .card-title { line-height: 1.25; }
  .card .price { margin-top: 6px; }
  .card .badge { margin-top: 8px; }

  /* <details> w kartach – nie rozpycha */
  .desc-panel { overflow: hidden; }
  .desc-panel > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
  }
  .desc-panel > summary::-webkit-details-marker { display: none; }

  /* slider/banner */
  #bannerSlider {
    position: relative;
    height: auto;
    max-height: 40vh;
    overflow: hidden;
    border-radius: 12px;
  }
  #bannerSlider .slide img {
    width: 100%;
    height: auto;
    display: block;
  }
  #bannerSlider .prev,
  #bannerSlider .next {
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 0;
  }

  /* logowanie / formularze */
  .auth-wrap { padding: 12px; }
  .auth-card { width: 100%; padding: 16px; border-radius: 14px; }
  .auth-row label { display: block; width: 100%; }
  .auth-row input, .auth-row button { width: 100%; }

  /* panel admina: lewa kolumna nad treścią */
  .admin-layout,
  .admin-page { display: block !important; }
  .admin-nav { 
    display: grid; 
    gap: 8px; 
    margin-bottom: 14px; 
  }
  .panel { display: grid; gap: 12px; }

  /* tabele/siatki – przewijanie poziome */
  .table-responsive { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
  }

  /* formularze produktów/bannerów – pełna szerokość */
  .prod-edit label,
  .banner-row label { width: 100%; display: block; }
  .prod-edit input[type="number"],
  .prod-edit textarea,
  .banner-row input { width: 100%; }
}

/* Ultra małe telefony */
@media (max-width: 420px) {
  .site-header { padding: 10px 12px; }
  .logo { font-size: 18px; }
  .burger { inline-size: 36px; block-size: 36px; }
  #grid { gap: 10px; }
}
