:root{
  --bg: #0b0b0d;
  --panel:#111218;
  --card:#13151d;
  --line:#1b1d28;
  --text:#f2f4f8;
  --muted:#aab3c0;
  --gold:#d4af37;
  --gold-2:#f1db8c;
  --gold-d:#9e7f1f;
  --shadow: 0 10px 32px rgba(0,0,0,.45);
  --radius: 18px;
  --max: 1200px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:linear-gradient(140deg,#090a0c 0%, #0c0f15 60%, #0a0b0f 100%);
  color:var(--text); font:500 16px/1.6 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* header */
.site-header{
  position:sticky; top:0; z-index:20;
  background:rgba(11,11,13,.8); backdrop-filter: blur(10px); border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0;
}
.container{width:100%; max-width:var(--max); margin:0 auto; padding:0 20px}

.brand{display:flex; align-items:center; gap:14px}
.logo{
  width:48px; height:48px; border-radius:14px;
  background: radial-gradient(120% 120% at 10% 10%, var(--gold-2) 0%, var(--gold) 45%, var(--gold-d) 100%);
  color:#0b0b0d; display:grid; place-items:center; font:700 20px/1 Cinzel, serif; letter-spacing:1px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.35), 0 6px 20px rgba(212,175,55,.25);
}
.brand-text h1{margin:0; font:700 22px/1.2 Cinzel, serif}
.brand-text p{margin:2px 0 0; color:var(--muted); font-size:13px}

.nav a{
  color:var(--muted); text-decoration:none; margin-left:18px; padding:8px 10px; border-radius:10px;
  transition: color .2s, background .2s;
}
.nav a:hover{color:var(--text); background:rgba(255,255,255,.04)}
.nav a.active{color:#111; background: linear-gradient(135deg,var(--gold-2),var(--gold))}

/* cards & layout */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.0));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.filters{margin:22px 0}
.filters-row{display:flex; gap:12px; flex-wrap:wrap}
.field{display:flex; flex-direction:column; gap:6px; min-width:160px}
.field.grow{flex:1}
label{font-size:12px; color:var(--muted)}
input[type="search"], select{
  background:var(--panel); border:1px solid var(--line); color:var(--text);
  border-radius:12px; padding:10px 12px; outline:none;
}
.checkbox{display:flex; align-items:center; gap:8px; color:var(--muted); margin-top:8px; user-select:none}
.checkbox input{transform:translateY(1px)}

.grid{
  display:grid;
  grid-template-columns: repeat( auto-fill, minmax(230px, 1fr) );
  gap:16px; margin:18px 0 60px;
}

.product{display:flex; flex-direction:column; overflow:hidden}
.thumb{
  aspect-ratio:1/1; overflow:hidden; margin:0 0 10px; border-radius:16px;
  background: radial-gradient(120% 120% at 10% 10%, rgba(212,175,55,.08), rgba(255,255,255,.02));
  border:1px solid var(--line);
}
.thumb img{width:100%; height:100%; object-fit:cover; display:block; transition: transform .35s ease}
.product:hover .thumb img{transform: scale(1.03)}
.product-body{display:flex; flex-direction:column; gap:6px}
.product h3{margin:0; font:600 16px/1.4 Poppins, sans-serif}
.muted{color:var(--muted)}
.small{font-size:13px}
.price{margin-top:4px; font:700 16px/1 Cinzel, serif; color:var(--gold-2); letter-spacing:.3px}

.actions{margin-top:auto}
.button{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 12px; border-radius:12px; border:1px solid var(--line);
  background:linear-gradient(135deg, var(--gold), var(--gold-2)); color:#151515; font-weight:700; text-decoration:none;
  box-shadow: 0 8px 20px rgba(212,175,55,.18); cursor:pointer;
}
.button.ghost{
  background:transparent; color:var(--text); border:1px solid var(--line);
}
.button.ghost:hover{border-color:var(--gold); color:var(--gold-2)}

/* modal */
.modal.hidden{display:none}
.modal{position:fixed; inset:0; display:grid; place-items:center; z-index:50}
.modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.65)}
.modal-dialog{
  position:relative; width:min(100%, 980px);
  background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); overflow:hidden;
}
.modal-close{
  position:absolute; top:10px; right:12px; width:36px; height:36px; border-radius:10px;
  border:1px solid var(--line); background:var(--panel); color:var(--text); cursor:pointer; font-size:20px;
}
.modal-body{display:grid; grid-template-columns: 1.2fr 1fr; gap:0}
.modal-body img{width:100%; height:100%; object-fit:cover; display:block}
.modal-info{padding:18px}
.modal-info h3{margin:0 0 6px}
.modal-info .button{margin-top:10px}

/* utils */
#results-count{margin:6px 4px 0; color:var(--muted)}
.empty{padding:28px; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--muted)}

@media (max-width: 880px){
  .modal-body{grid-template-columns: 1fr}
}
.logo-img {
  width: 56px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.logo-link {
  display: inline-flex;
  align-items: center;
}
.button.gold {
  background:linear-gradient(135deg, var(--gold-2), var(--gold));
  color:#111;
  border:none;
  font-weight:700;
  padding:10px 16px;
  border-radius:12px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(212,175,55,.25);
  transition: transform .2s;
}
.button.gold:hover {
  transform:translateY(-2px);
}

.gallery-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  color: #fff;
  background: rgba(0,0,0,0.3);
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  z-index: 9999;
  transition: 0.2s;
}
#gallery-prev { left: 10px; }
#gallery-next { right: 10px; }
.gallery-nav:hover {
  background: rgba(255,255,255,0.2);
  color: #00eaff;
}
/* --- STYLE DLA NOWEGO SKLEPU (MODESCHMUCK) --- */
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 18px rgba(212,175,55,0.25);
}

.product-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.product-card h3 {
  margin: 12px 10px 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.product-card p {
  margin: 0 10px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 20px 0 60px;
}
.price {
  color: #d4af37;
  font-weight: 600;
  font-size: 1rem;
  margin: 4px 0;
}

/* --- MODAL --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-dialog {
  background: #111;
  border-radius: 12px;
  padding: 1rem;
  max-width: 600px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,238,255,0.3);
}

.modal img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: pointer;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}
/* === 📱 MOBILE STYLING === */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    overflow-x: hidden;
  }

  header .container,
  .filters,
  .product-grid,
  footer .container {
    padding: 0 12px;
  }

  /* Nawigacja i logo */
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .site-header .brand img {
    max-width: 150px;
    height: auto;
  }
  nav.nav {
    margin-top: 8px;
  }

  /* Filtry */
  .filters-row {
    flex-direction: column;
    gap: 10px;
  }
  .filters .field {
    width: 100%;
  }
  .filters select,
  .filters input {
    width: 100%;
  }

  /* Siatka produktów */
  #grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .product-card {
    padding: 8px;
  }
  .product-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
  .product-card h3 {
    font-size: 0.9rem;
  }
  .product-card p {
    font-size: 0.8rem;
  }

  /* Modal */
  #modal .modal-content {
    width: 90%;
    max-width: 380px;
    padding: 12px;
  }
  #modal img {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }
  #modal h2 {
    font-size: 1rem;
    text-align: center;
  }
  #modal p {
    font-size: 0.85rem;
  }
  #modal .controls {
    display: flex;
    justify-content: space-between;
  }

  /* Przyciski */
  button,
  .btn,
  .pay-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Koszyk */
  .cart-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .cart-item img {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
  }

  /* Stopka */
  footer {
    text-align: center;
    font-size: 0.8rem;
  }
}

/* === 📱 ULTRA SMALL (≤480px) === */
@media (max-width: 480px) {
  #grid {
    grid-template-columns: 1fr;
  }
  .filters {
    font-size: 14px;
  }
  .site-header .brand img {
    max-width: 120px;
  }
  #modal .modal-content {
    width: 95%;
    max-width: 320px;
  }
}
