:root{
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;

  --text: #111827;
  --muted: #4b5563;
  --border: rgba(17,24,39,.12);
  --shadow: 0 2px 10px rgba(0,0,0,.08);

  --brand: #c19957;
  --brand-hover: #a18045;
}

html{ scroll-behavior:smooth; }
*, *::before, *::after{ box-sizing:border-box; }

/* brak zaokrągleń globalnie */
*{ border-radius:0 !important; }

/* wyjątek: tylko "Nowość" */
.badge{ border-radius:20px !important; }

body{
  margin:0;
  font-family:"Poppins",sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{ color:var(--brand); text-decoration:none; transition:color .2s ease; }
a:hover{ color:var(--brand-hover); text-decoration:underline; }

.container{
  max-width:1000px;
  width:100%;
  margin:0 auto;
  padding:0 20px;
}

/* =========================
   HEADER (ciemny jak wcześniej)
   ========================= */
header{
  background-color:#3a3a3a !important;
  padding:15px 20px;
  display:flex; align-items:center; justify-content:space-between;
  position:fixed; top:0; left:0;
  width:100%; max-width:100vw;
  z-index:9999;
  transition:all .3s ease;
  height:80px;
  box-sizing:border-box;
  box-shadow:0 2px 5px rgba(0,0,0,.2) !important;
  backdrop-filter:none !important;
}

header.scrolled{ height:55px; padding:10px 20px; }

.logo{ height:60px; transition:height .3s ease; }
header.scrolled .logo{ height:45px; }

.nav-list{ list-style:none; display:flex; gap:20px; margin:0; padding:0; }
header nav a{ color:#fff !important; font-size:18px; font-weight:400; transition:color .2s ease; }
header nav a:hover{ color:var(--brand) !important; }

.hamburger{
  display:none;
  flex-direction:column;
  justify-content:space-between;
  width:30px; height:20px;
  cursor:pointer;
  z-index:10000;
  position:absolute;
  top:50%; right:10px;
  transform:translateY(-50%);
}
.hamburger span{ width:100%; height:3px; background-color:#fff !important; transition:all .3s ease; }

@media (max-width:768px){
  .nav-list{
    display:none;
    flex-direction:column;
    position:fixed;
    top:55px; left:0;
    background-color:rgba(0,0,0,.9) !important;
    width:100%;
    padding:20px;
    z-index:998;
    box-shadow:none !important;
  }
  .nav-list.active{ display:flex; }
  .hamburger{ display:flex; right:10px; }
  .hamburger.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2){ opacity:0; }
  .hamburger.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
}

/* =========================
   BUTTON
   ========================= */
.btn{
  font-size:clamp(12px,1.5vw,16px);
  padding:clamp(8px,1vw,12px) clamp(12px,2vw,18px);
  background:var(--brand);
  color:#fff;
  border:none;
  cursor:pointer;
  transition:background-color .2s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  line-height:1;
}
.btn:hover{ background:var(--brand-hover); }

/* =========================
   START PRODUKTU (bez hero-zdjęcia)
   ========================= */
.product-hero{ display:none !important; } /* jeśli masz gdzieś jeszcze hero */

.product-head{
  margin-top:80px;          /* pod fixed header */
  background:var(--bg);
  padding:26px 0 18px;
}

.breadcrumbs{
  font-size:14px;
  color:var(--muted);
  margin-bottom:10px;
}
.breadcrumbs a{ color:var(--muted); }
.breadcrumbs a:hover{ color:var(--brand); }

.head-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:22px;
  align-items:start;
}
@media (max-width:980px){
  .head-grid{ grid-template-columns:1fr; }
}

.product-title{
  margin: 8px 0 6px 0;
  font-size: clamp(24px, 3.5vw, 38px);
  line-height:1.12;
  color:var(--text);
}

.product-subtitle{
  margin:0 0 12px 0;
  color:var(--muted);
  font-size:16px;
  line-height:1.55;
  max-width:62ch;
}

.meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  font-size:13px;
  color:var(--muted);
  margin:10px 0 14px;
}
.meta-row strong{ color:var(--text); font-weight:700; }

.head-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* =========================
   PRICE CARD
   ========================= */
.price-card{
  background:#fff;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:16px;
  color:var(--text);
}

.head-right .price-card{
  position: sticky;
  top: 95px; /* trzyma się pod headerem */
}
@media (max-width:980px){
  .head-right .price-card{ position: static; }
}

.price-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.price{
  font-size:30px;
  font-weight:700;
}
.availability{
  font-size:13px;
  color:var(--muted);
}
.small-note{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
}

/* =========================
   WARIANTY (layout elastyczny)
   - działa na 0/1/2/3 pola
   ========================= */
.variant-box{ margin-top:12px; }

.variant-row{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
}

.variant-field label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin:0 0 6px;
}

.variant-select{
  height:40px;
  width:100%;
  padding:0 10px;
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  outline:none;
}
.variant-select:focus{
  border-color: rgba(193,153,87,.7);
}

.variant-fixed{
  height:40px;
  width:100%;
  display:flex;
  align-items:center;
  padding:0 10px;
  border:1px solid var(--border);
  background:#fff;
  color:#111;
}

/* =========================
   GALERIA + OPIS
   ========================= */
.product-top{ background:var(--surface-2); padding:35px 0; }

.top-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}
@media (max-width:980px){
  .top-grid{ grid-template-columns:1fr; }
}

/* stały viewport na zdjęcie, bez przeskakiwania */
.gallery{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.gallery-main{
  height:420px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-bottom:1px solid rgba(17,24,39,.08);
  overflow:hidden;
}
.gallery-main img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
@media (max-width:768px){
  .gallery-main{ height:300px; padding:12px; }
}

/* miniatury jako grid (bez poziomego scrolla) */
.gallery-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px;
  background:#fff;
}

.thumb{
  width: calc((100% - 30px)/4);
  height:70px;
  border:1px solid var(--border);
  overflow:hidden;
  cursor:pointer;
}
.thumb img{
  width:100%;
  height:100%;
  /* nie przycinaj miniatur (cover ucinało górę/dół) */
  object-fit:contain;
  display:block;
}

/* jednolite tło pod miniaturą (przy "contain" mogą pojawić się marginesy) */
.thumb{ background:#fff; }

@media (max-width:980px){
  .thumb{ width: calc((100% - 20px)/3); }
}
@media (max-width:768px){
  .thumb{ width: calc((100% - 10px)/2); }
}

.thumb.is-active{
  border-color: rgba(193,153,87,.85) !important;
}

.highlights{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:16px;
}

.highlights h2{
  margin:0 0 10px;
  font-size:20px;
  color:var(--text);
}

.highlights p{
  margin:0 0 12px 0;
  color:var(--muted);
  font-size:15px;
  line-height:1.55;
}

.highlights ul{
  margin:0;
  padding:0;
  list-style:none;
}
.highlights li{
  padding-left:24px;
  margin-bottom:10px;
  position:relative;
  font-size:15px;
  color:var(--muted);
  line-height:1.55;
}
.highlights li::before{
  content:'';
  position:absolute;
  left:5px;
  top:8px;
  width:5px;
  height:5px;
  border-radius:50%;
  background-color:var(--brand);
}

/* =========================
   SEKCJE
   ========================= */
.section{ padding:40px 0; }
.section.dark{ background:var(--surface); }
.section.mid{ background:var(--surface-2); }
.section h2{ font-size:26px; margin:0 0 18px; color:var(--text); }

/* tabela spec */
.spec-table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  background:var(--surface);
}
.spec-table th,.spec-table td{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size:15px;
  color:var(--text);
}
.spec-table th{
  background:#f3f4f6;
  font-weight:700;
}
.spec-table tbody tr:nth-child(even) td{
  background:#fbfbfc;
}
.spec-table tr:last-child td{ border-bottom:none; }
.spec-table td:first-child{
  font-weight:700;
  width:38%;
}

/* karty docs/rysunki */
.cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
@media (max-width:980px){ .cards{ grid-template-columns:1fr; } }

.card{
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:14px;
  overflow:hidden; /* ważne: nic nie wyjdzie poza */
  display:flex;
  flex-direction:column;
}
.card h3{ margin:0 0 8px; font-size:16px; color:var(--text); }
.card .meta{ font-size:13px; color:var(--muted); margin-bottom:10px; }
.card .meta:last-of-type{ margin-top:auto; }

.card .btn{
  width:100% !important;
  max-width:100% !important;
  display:flex !important;
  justify-content:center;
  white-space:nowrap;
}

/* FAQ (bez emoji, pro strzałka) */
.faq-section{ background:var(--surface); padding:40px 0; }
.faq-item{ margin-bottom:18px; }
.faq-item h3{
  font-size:18px;
  color:var(--text);
  cursor:pointer;
  display:flex;
  align-items:center;
  margin:0;
}
.faq-item h3::before{
  content:"";
  width:0; height:0;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
  border-left:8px solid var(--brand);
  margin-right:10px;
  transition: transform .15s ease;
}
.faq-item.active h3::before{ transform: rotate(90deg); }

.faq-item p{
  font-size:15px;
  color:var(--muted);
  padding-left:18px;
  display:none;
  margin:10px 0 0;
}
.faq-item.active p{ display:block; }

/* modal 3D */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:10001;
  padding:20px;
}
.modal.active{ display:block; }
.modal-inner{
  max-width:1100px;
  margin:60px auto 0;
  background:var(--surface);
  border:1px solid var(--border);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
  color:var(--text);
}
.modal-close{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text);
  padding:8px 10px;
  cursor:pointer;
}
.modal-close:hover{
  border-color:rgba(193,153,87,.85);
  color:var(--brand);
}
.modal-body{ padding:10px; }
.model-wrap {
  position: relative;
  background: radial-gradient(
    circle at 50% 55%,
    rgba(0,0,0,0.14) 0%,
    rgba(0,0,0,0.08) 30%,
    rgba(0,0,0,0.0) 65%
  );
}

.model-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(0,0,0,0.0) 40%,
    rgba(0,0,0,0.05) 100%
  );
}


model-viewer {
  width: 100%;
  height: min(70vh, 700px);
  background: transparent;
}



/* ===== Variant UI – wyrównanie i spójność ===== */

/* kontener wariantów w price-card */
.price-card .variant-box{
  margin-top: 14px;
}

/* 3 kolumny, ale z sensownymi szerokościami i bez rozjazdu */
.price-card .variant-row{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: end;
}

/* etykiety nad polami */
.price-card .variant-row .availability{
  display: block;
  margin-bottom: 6px !important;
  line-height: 1.2;
}

/* select i fixed mają wyglądać identycznie */
.price-card .variant-select,
.price-card .variant-fixed{
  width: 100% !important;
  height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(17,24,39,.12) !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 16px;
  box-sizing: border-box;
}

/* fixed ma wyśrodkowaną wartość pionowo */
.price-card .variant-fixed{
  display: flex !important;
  align-items: center !important;
}

/* żeby selecty nie były “wąskie” */
.price-card select.variant-select{
  min-width: 0 !important;
}

/* opis wybranego wymiaru – mniejszy, czytelny */
.price-card #variantDim{
  font-weight: 700;
}
.price-card .small-note{
  margin-top: 10px !important;
  line-height: 1.35;
}

/* na mniejszych ekranach: 2 kolumny, potem 1 */
@media (max-width: 980px){
  .price-card .variant-row{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 520px){
  .price-card .variant-row{
    grid-template-columns: 1fr !important;
  }
}








/* kontener z wymiarami: zawsze tyle kolumn ile elementów */
.variant-row{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
  align-items:end;
}

/* pojedyncza kolumna wymiaru */
.variant-col{
  min-width:0;
}

/* input/select zawsze wypełnia kolumnę */
.variant-select,
.variant-fixed{
  width:100%;
  height:40px;
  box-sizing:border-box;
}

/* na wąskich ekranach zbij do 2 kolumn */
@media (max-width: 520px){
  .variant-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
