:root{
  --bg:#efeae0;
  --header:#1e1b17;
  --header-text:#f4f1ea;
  --accent:#e2a13c;
  --accent-dark:#c7871f;
  --card:#ffffff;
  --border:#e2ddd0;
  --text:#211d18;
  --muted:#726c60;
  --placeholder:#e6e1d4;
  --danger:#c0453a;
  --radius:10px;
}
*{box-sizing:border-box;}
html{min-height:100%;}
body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
main{
  flex:1 0 auto;
}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;cursor:pointer;}
input,textarea{font-family:inherit;}

/* ---- shared site header/footer ---- */
.site-header{
  background:var(--header); color:var(--header-text);
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px;
}
.brand{display:flex; align-items:center; gap:12px;}
.brand-logo{
  width:160px;height:56px;
  display:flex;align-items:center;justify-content:flex-start;
  overflow:hidden;flex-shrink:0;
}
.brand-logo img{
  display:block;
  width:auto;height:auto;
  max-width:100%;max-height:100%;
  object-fit:contain;
}

.brand-text b{font-size:17px;display:block;}
.brand-text small{font-size:12px;color:#a49d8c;}
.phone-btn{
  background:var(--accent); color:#241a05; font-weight:700; font-size:14.5px;
  border:none; padding:11px 18px; border-radius:7px; display:flex; align-items:center; gap:8px;
}
.phone-btn:hover{background:var(--accent-dark);}
.site-footer{
  margin-top:auto;
  background:var(--header); color:#cfc9ba;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
  padding:22px 32px; font-size:13.5px;
}
.site-footer b{color:#fff;}
.site-footer .fphone{color:var(--accent); font-weight:700; font-size:15px; display:flex; align-items:center; gap:8px;}

/* ---- admin top bar (separate pages under /admin/) ---- */
.admin-topbar{
  background:var(--header); color:var(--header-text);
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px;
}
.admin-topbar b{font-size:17px;}
.muted-tag{color:#a49d8c; font-size:13px; margin-left:8px;}

/* ---- ADMIN PANEL ---- */
.admin-wrap{max-width:1100px; margin:0 auto; padding:32px 24px 60px;}
.panel{
  background:var(--card); border-radius:14px; border:1px solid var(--border);
  padding:28px 30px; margin-bottom:24px;
}
.panel h2{margin:0 0 4px; font-size:19px;}
.panel > p.hint{margin:0 0 22px; color:var(--muted); font-size:14px;}
.field-row{display:flex; gap:24px; flex-wrap:wrap; align-items:flex-end;}
.field{display:flex; flex-direction:column; gap:6px; flex:1; min-width:200px;}
.field label{font-size:11.5px; font-weight:700; letter-spacing:.04em; color:#8a8473; text-transform:uppercase;}
.field input, .field textarea{
  border:1px solid var(--border); border-radius:8px; padding:11px 13px;
  font-size:14.5px; background:#fbfaf7; color:var(--text); width:100%;
}
.field input:focus, .field textarea:focus{outline:2px solid var(--accent); outline-offset:1px; background:#fff;}
.logo-field{display:flex; flex-direction:column; gap:6px;}
.logo-picker{display:flex; align-items:center; gap:10px;}
.logo-preview{
  width:120px;height:56px;border:1px solid #c9c2b0;border-radius:8px;
  background:#fbfaf7;
  display:flex;align-items:center;justify-content:center;
  padding:5px; font-size:9px;color:#a49d8c;overflow:hidden;flex-shrink:0;
}
.logo-preview img{
  display:block;
  width:auto;height:auto;
  max-width:100%;max-height:100%;
  object-fit:contain;
}
.gallery-manage{display:flex; flex-wrap:wrap; gap:12px; margin-bottom:10px;}
.gallery-manage-item{display:flex; flex-direction:column; align-items:center; gap:6px; font-size:11.5px; color:var(--muted);}
.gallery-manage-item img{
  width:72px;height:72px;object-fit:cover;border-radius:8px;border:1px solid var(--border);
}
.gallery-manage-item span{display:flex; align-items:center; gap:4px;}
.btn{
  border:1px solid var(--border); background:#fff; color:var(--text);
  padding:10px 16px; border-radius:8px; font-size:13.5px; font-weight:600; display:inline-block;
}
.btn:hover{border-color:#c9c2b0;}
.btn-primary{background:var(--accent); border-color:var(--accent); color:#241a05;}
.btn-primary:hover{background:var(--accent-dark); border-color:var(--accent-dark);}
.save-row{display:flex; justify-content:flex-end; align-items:center; margin-top:20px;}
.saved-msg{font-size:13px; color:#3f7d4a; margin-right:14px;}

.panel-head-row{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px;}
table.eq-table{width:100%; border-collapse:collapse; font-size:14px;}
table.eq-table th{
  text-align:left; font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:#8a8473;
  border-bottom:1.5px solid var(--text); padding:0 10px 10px;
}
table.eq-table td{padding:14px 10px; border-bottom:1px solid var(--border); vertical-align:middle;}
.row-img{
  width:44px;height:44px;background:var(--placeholder);border-radius:6px;
  display:flex;align-items:center;justify-content:center;color:#bbb3a0;flex-shrink:0;overflow:hidden;
}
.row-img img{width:100%;height:100%;object-fit:cover;}
.row-name b{display:block; font-size:14.5px;}
.row-name span{color:var(--muted); font-size:12.5px;}
.net-input{width:90px; border:1px solid var(--border); border-radius:6px; padding:8px 10px; font-size:14px;}
.inline-price-form{display:inline-flex; align-items:center; gap:4px;}
.brutto-cell b{font-size:14.5px;}
.brutto-cell .auto{font-size:10px; color:#a49d8c; font-weight:700; margin-left:6px; letter-spacing:.03em;}
.row-actions{display:flex; gap:8px; justify-content:flex-end;}
.icon-btn{
  width:34px;height:34px; border-radius:7px; border:1px solid var(--border); background:#fff;
  display:flex; align-items:center; justify-content:center; font-size:15px; color:var(--text);
}
.icon-btn:hover{border-color:#c9c2b0;}
.icon-btn.danger{color:var(--danger); border-color:#f0d2ce;}
.icon-btn.danger:hover{background:#fdf2f1; border-color:var(--danger);}
.empty-row{text-align:center; padding:40px 10px; color:var(--muted);}

.specs-row{display:flex; gap:8px; margin-bottom:8px; align-items:center;}
.specs-row input{flex:1; border:1px solid var(--border); border-radius:6px; padding:8px 10px; font-size:13.5px;}
.specs-row .icon-btn{width:32px;height:32px;font-size:13px;flex-shrink:0;}
.add-spec-btn{font-size:12.5px; color:var(--accent-dark); font-weight:700; border:none; background:none; padding:4px 0;}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:20px;}

/* ---- PUBLIC LISTING ---- */
.hero{padding:56px 32px 44px;}
.eyebrow{font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent-dark); font-weight:700; margin:0 0 14px;}
.hero h1{font-size:40px; line-height:1.15; margin:0 0 18px; max-width:640px;}
.hero p{color:var(--muted); font-size:16px; max-width:560px; line-height:1.6; margin:0 0 26px;}
.cta-phone{
  display:inline-flex; align-items:center; gap:10px; background:var(--accent); color:#241a05;
  font-weight:700; font-size:15.5px; padding:14px 22px; border-radius:8px; border:none;
}
.cta-phone:hover{background:var(--accent-dark);}

.list-section{padding:8px 32px 60px;}
.list-head{display:flex; justify-content:space-between; align-items:baseline; border-bottom:2px solid var(--text); padding-bottom:14px; margin-bottom:24px; flex-wrap:wrap; gap:8px;}
.list-head h2{font-size:24px; margin:0;}
.list-head .note{font-size:13px; color:var(--muted);}
.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:22px;}
.card{background:var(--card); border-radius:12px; overflow:hidden; border:1px solid var(--border); display:flex; flex-direction:column;}
.card-img{
  aspect-ratio:16/10; background:var(--placeholder); display:flex; align-items:center; justify-content:center;
  color:#a9a08c; font-size:12px; letter-spacing:.04em;overflow:hidden;
}
.card-img img{width:100%;height:100%;object-fit:cover;}
.card-body{padding:20px 22px 22px; display:flex; flex-direction:column; gap:8px; flex:1;}
.card-body h3{margin:0; font-size:17px;}
.card-body .desc{color:var(--muted); font-size:13.8px; line-height:1.5; margin:0 0 6px; flex:1;}
.price-row b{font-size:20px;}
.price-row .unit{font-size:12.5px; color:var(--muted); margin-left:4px;}
.price-row .brutto{font-size:12.5px; color:var(--muted); margin-top:2px;}
.card-link{margin-top:10px; font-size:13.5px; font-weight:700; color:var(--text); display:inline-flex; align-items:center; gap:6px;}
.card:hover{border-color:#c9c2b0;}
.card:hover .card-link{color:var(--accent-dark);}
.empty-state{text-align:center; padding:70px 20px; color:var(--muted);}

/* ---- DETAIL PAGE ---- */
.detail-wrap{max-width:1180px; margin:0 auto; padding:26px 32px 60px;}
.back-link{display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--text); margin-bottom:20px;}
.back-link:hover{color:var(--accent-dark);}
.detail-grid{display:grid; grid-template-columns:1.15fr 0.85fr; gap:44px;}
.main-img{aspect-ratio:16/12; background:var(--placeholder); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#a9a08c; font-size:13px;overflow:hidden;}
.main-img img{width:100%;height:100%;object-fit:cover;}
.thumbs{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:12px;}
.thumb{aspect-ratio:1/1; background:var(--placeholder); border-radius:8px; overflow:hidden; cursor:pointer; border:2px solid transparent;}
.thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.thumb.active{border-color:var(--accent);}
.gallery-note{font-size:12.5px; color:var(--muted); margin-top:10px;}
.detail-title{font-size:29px; margin:0 0 16px;}
.detail-desc p{color:var(--text); font-size:15px; line-height:1.65; margin:0 0 14px;}
.spec-table{width:100%; border-collapse:collapse; margin:22px 0;}
.spec-table tr{border-bottom:1px solid var(--border);}
.spec-table td{padding:11px 0; font-size:14.5px;}
.spec-table td:first-child{color:var(--muted);}
.spec-table td:last-child{text-align:right; font-weight:600;}
.price-box{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:22px 24px;}
.price-box .label{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); font-weight:700; margin-bottom:6px;}
.price-box .netto{font-size:30px; font-weight:700;}
.price-box .netto .unit{font-size:14px; font-weight:400; color:var(--muted);}
.price-box .brutto{color:var(--muted); font-size:14px; margin:4px 0 18px;}
.call-btn{width:100%; background:var(--accent); color:#241a05; border:none; padding:15px; border-radius:8px; font-weight:700; font-size:15px; display:flex; align-items:center; justify-content:center; gap:9px;}
.call-btn:hover{background:var(--accent-dark);}

@media (max-width:820px){
  .detail-grid{grid-template-columns:1fr;}
  .hero h1{font-size:30px;}
  .site-header, .site-footer, .list-section, .hero, .detail-wrap, .admin-topbar{padding-left:18px; padding-right:18px;}
  .brand-logo{width:120px;height:48px;}
  .brand{gap:9px;}
  .brand-text b{font-size:15px;}
  .brand-text small{font-size:11px;}
  .panel{padding:20px;}
  .field-row{flex-direction:column; align-items:stretch;}
}


/* ---- polish / accessibility ---- */
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;}
.alert{padding:11px 13px;border-radius:8px;font-size:14px;margin-bottom:16px}.danger-alert{background:#fdf2f1;color:var(--danger);border:1px solid #f0d2ce}.login-page{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:20px}.login-panel{width:min(420px,100%);margin:0}.login-panel h1{margin:0 0 6px;font-size:23px}.login-panel .btn{width:100%;margin-top:18px}.checkline{font-size:12px;color:var(--muted);display:flex;gap:5px;align-items:center}.site-header{position:sticky;top:0;z-index:10}.hero,.list-section{max-width:1240px;margin-left:auto;margin-right:auto}.hero{padding-top:72px}.card{transition:transform .15s ease,box-shadow .15s ease}.card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(33,29,24,.07)}
@media(max-width:640px){.site-header{padding-top:12px;padding-bottom:12px}.brand-text{display:none}.brand-logo{width:115px}.phone-btn{padding:9px 12px;font-size:13px}.hero{padding-top:44px}.hero h1{font-size:28px}.list-head{align-items:flex-start}.grid{grid-template-columns:1fr}.detail-wrap{padding-top:20px}.detail-title{font-size:25px}.panel-head-row{flex-direction:column;gap:14px}.eq-table{display:block;overflow-x:auto;white-space:nowrap}.specs-row{align-items:stretch}.specs-row input{min-width:0}.site-footer{align-items:flex-start;flex-direction:column}}
