/* =========================
   RESET / VARIABLES
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main-color: #000;
  --bg-light: #f5f6f7;
  --bg-gray: #e5e7ea;
  --text-dark: #333;
  --border: #ddd;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}


/* =========================
   HEADER / NAV
========================= */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:16px 28px;
  flex-wrap:nowrap;              
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 66px;         
  width: auto;
  display: block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .logo img {
    height: 34px;       
  }
}

.nav a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: 8px 10px;   
}

@media (max-width: 768px) {
  .nav a {
    padding: 6px 8px;
  }
}

.nav a:hover {
  color: var(--main-color);
}


/* =========================
   HERO (HOME)
========================= */
.hero {
  background: #E5E7EA;
  padding: 80px 40px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  max-width: none;
  margin-bottom: 28px;
  text-align: center;

  font-size: 36px;     
  font-weight: 600;    
  letter-spacing: 0.3px;
  color: #222;
}

/* =========================
   ADVANCED SEARCH (HOME)
========================= */
.search-advanced {
  display: grid;
  grid-template-columns: 3fr 1.1fr 1.1fr 1.1fr auto; 
  gap: 14px;
  max-width: 1200px;      
  background: #fff;
  padding: 20px;           
  border-radius: 14px;     
  border: 2px solid #e3e5e8; 
  box-shadow: 0 12px 34px rgba(0,0,0,0.14);
}

.search-advanced input {
  padding: 16px 16px;  
  font-size: 16px;          
  height: 56px;             
  border: 2px solid #bfc5cc;
  border-radius: 10px;      
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-advanced input:focus {
  outline: none;
  border-color: #000;
}

.search-btn {
  background: #000;
  border: none;
  width: 56px;         
  height: 56px;        
  border-radius: 12px; 
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform .15s ease, background .2s ease;
}

.search-btn:hover {
  background: #222;
  transform: scale(1.05);
}

.search-icon {
  width: 20px;
  height: 20px;
  display: block;
}


/* =========================
   DIMENSIONS + TOLERANCE (HOME - jeśli używasz)
========================= */
.dim-field {
  display: flex;
  flex-direction: column;
}

.tolerance {
  display: none;
  margin-top: 6px;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.tolerance span {
  color: #555;
}

.tolerance input {
  width: 70px;
  padding: 6px 8px;
  font-size: 13px;
}


/* =========================
   PAGE HEADER (O NAS / KONTAKT)
========================= */
.page-header {
  background: #a9afb6;
  padding: 40px 0;
  margin-bottom: 32px;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-marker {
  width: 14px;
  height: 14px;
  background: #000;
}

.page-header h1 {
  color: #fff;
  font-size: 36px;
}


/* =========================
   PAGE CONTENT
========================= */
.page-content {
  background: #fff;
  padding: 60px 40px;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

.content-left p {
  margin-bottom: 20px;
}

.content-left .lead {
  font-size: 20px;
  border-left: 4px solid #000;
  padding-left: 20px;
}

.content-right ul {
  list-style: none;
}

.content-right li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
}

.content-right li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: #000;
}


/* =========================
   WYSZUKIWARKA PO LEWEJ (ASIDE.filters) — bez zmian w HTML
   ========================= */

.search-page{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:28px;
  align-items:start;
}

@media (max-width: 1000px){
  .search-page{ grid-template-columns:1fr; }
}

.filters{
  background:#fff;
  border:1px solid #ececec;
  border-radius:10px;
  padding:18px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  margin-top: 28px;
  margin-left: 28px;
}

.filters .dim-col{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.filters .tol-input{
  height:36px !important;
  font-size:13px;
}

.filters h3{
  margin:0 0 14px;
  font-size:22px;
  font-weight:700;
  color:#222;
}

#searchForm{
  display:flex;
  flex-direction:column;
  gap:14px;
}

#searchForm > div{
  margin:0 !important;
}

.filters input[type="text"]{
  width:100% !important;
  height:44px;
  padding:10px 12px;
  border:1px solid #e1e1e1;
  border-radius:8px;
  font-size:14px;
  box-sizing:border-box;
  background:#fff;
}

#searchForm > div:nth-of-type(2),
#searchForm > div:nth-of-type(3){
  padding-top:12px;
  border-top:1px solid #efefef;
}

#searchForm > div:nth-of-type(2)::before{
  content:"wymiary";
  display:block;
  margin:0 0 10px;
  font-size:14px;
  font-weight:700;
  color:#333;
  text-transform:lowercase;
}

#searchForm > div:nth-of-type(3)::before{
  content:"tolerancja";
  display:block;
  margin:0 0 10px;
  font-size:14px;
  font-weight:700;
  color:#333;
  text-transform:lowercase;
}

.filters form > div > div[style*="display:grid"]{
  gap:10px !important;
  align-items:start;
}

.filters input[type="number"]{
  width:68px !important;
  height:40px !important;
  padding:0 !important;
  text-align:center;
  border:1px solid #e1e1e1;
  border-radius:8px;
  font-size:14px;
  box-sizing:border-box;
  background:#fff;
}

.filters input[type="text"]:focus,
.filters input[type="number"]:focus{
  outline:none;
  border-color:#111;
  box-shadow:0 0 0 3px rgba(0,0,0,.08);
}

.filters button[type="submit"]{
  width:100%;
  height:46px;
  border-radius:8px !important;
  font-weight:700;
  letter-spacing:.2px;
  box-shadow:0 8px 16px rgba(0,0,0,.12);
}



/* =========================
   RESULTS (RIGHT COLUMN)
========================= */
.results h1 {
  margin-bottom: 16px;
}

.results {
  margin-top: 28px;
}

.results-tabs {
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.results-tabs button {
  background: none;
  border: none;
  padding: 12px 0;
  font-weight: 600;
  border-bottom: 2px solid #000;
}

/* ACTIONS */
.results-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.new-search {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 14px;
  width: fit-content;
  cursor: pointer;
}

.new-search:hover {
  background: #222;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #f0f0f0;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 3px;
}

/* PRODUCT LIST */
.product-list {
  border-top: 1px solid #ddd;
}

.product-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr;
  padding: 20px 0px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  align-items: center;
}

.product-name {
  padding-left: 30px;
}

.product-row.header {
  font-weight: 600;
  background: #f7f7f7;
}

.product-name strong {
  font-size: 15px;
}

.ok {
  color: #000;
  font-weight: 500;
}

.warn {
  color: #666;
}

.price.muted {
  color: #999;
}


/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .search-page {
    grid-template-columns: 1fr;
  }

  .filters {
    margin-bottom: 24px;
  }

  .product-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* === TOLERANCJA – KOMPAKTOWA === */
.tolerance-group .dimension-inputs {
  gap: 3px;              /* było 8px */
}

.tolerance-group input {
  padding: 8px 6px;      /* mniejsze inputy */
  font-size: 13px;
}


/* =========================
   RESPONSIVE – HOME SEARCH (MOBILE)
========================= */
@media (max-width: 768px) {

  .search-advanced {
    grid-template-columns: 1fr;   /* łamiemy jedną kolumnę */
    gap: 10px;
    padding: 16px;
  }

  .search-advanced input {
    width: 100%;
    font-size: 15px;
    padding: 14px;
  }

  .search-btn {
    width: 100%;
    height: 48px;
    border-radius: 6px;
  }
}

.product-link {
  color: inherit;
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}


.back-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: #000;
  color: #fff;

  padding: 10px 18px;
  border-radius: 4px;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  transition: background 0.2s ease, transform 0.15s ease;
}

.back-search-btn:hover {
  background: #222;
  transform: translateX(-2px);
}

.back-search-btn:active {
  transform: translateX(0);
}

.new-search {
  text-decoration: none;
}

/* =========================
   O NAS – RESPONSIVE
========================= */

@media (max-width: 900px) {

  .page-header {
    padding: 40px 20px;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .page-content {
    padding: 0 16px 40px;
  }

  .content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .content-left,
  .content-right {
    width: 100%;
  }

  .content-left p {
    font-size: 15px;
    line-height: 1.7;
  }

  .content-left .lead {
    font-size: 17px;
    line-height: 1.7;
  }

  .content-right h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .content-right ul {
    padding-left: 20px;
  }

  .content-right li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
  }
}

/* EXTRA: bardzo małe ekrany */
@media (max-width: 480px) {

  .page-header h1 {
    font-size: 28px;
  }

  .content-left .lead {
    font-size: 16px;
  }
}

.benefits {
  padding: 110px 20px;
  background-image: url("/img/bg-technical-drawing.jpg");
  min-height: 380px;
}

.benefits h2 {
  max-width: 1200px;
  margin: 0 auto 40px;
  font-size: 28px;
}

.benefits-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.benefit-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 24px;
  position: relative;
}

.benefit-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.benefit-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}



.feature-icon {
  width: 60px;          
  height: 60px;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;    
}


/* FOOTER */

.site-footer {
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  padding:  40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: start;
}



.footer-logo {
  max-width: 150px;
  display: block;
  margin-bottom: 20px;
}

.footer-powered,
.footer-copy,
.footer-col p,
.footer-col a {
  font-size: 15px;
  line-height: 1.8;
}

.footer-powered {
  color: #4b5563;
  margin-bottom: 12px;
}

.footer-copy {
  color: #6b7280;
  max-width: 280px;
}

.footer-right {
  display: flex;
  gap: 60px;
  justify-content: flex-end; 
}

.footer-col h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #111827;
}

.footer-col a {
  display: block;
  color: #374151;
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-col a:hover {
  color: #000;
  transform: translateX(2px);
}

.footer-col p {
  margin: 0;
  color: #374151;
}

.footer-categories {
  padding-left: 10px;
}

.footer-contact {
  padding-left: 10px;
}

.footer-powered a {
  color: #111827;
  text-decoration: none;
}

.footer-powered a:hover {
  text-decoration: underline;
}

/* DESKTOP */
.nav {
  display: flex;
  align-items: center;
  gap: 22px;              
  flex-wrap: nowrap;      
  justify-content: flex-end;
}

/* =========================
   HEADER RESPONSIVE (FINAL)
   ========================= */

/* DESKTOP – nic nie zmieniamy */
.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* MOBILE */
@media (max-width: 768px) {

  
  .nav-left {
    flex-wrap: wrap;         
    justify-content: flex-start; 
    gap: 8px 16px;
  }

  .lang-switch {
    flex: 0 0 100%;          
    order: 1;
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 6px;
  }


  .nav-left > a {
    order: 2;
    font-size: 15px;         
    white-space: nowrap;   
  }
}

@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* FLAGI */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
}

.lang-switch img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lang-switch img:hover {
  transform: scale(1.1);
}


.product-image-box {
  width: 100%;
  max-width: 420px;
  height: 420px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.zoom-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}


/* =========================
   WYNIKI – MOBILE (ładne karty)
========================= */
@media (max-width: 900px) {

  .filters{
    margin-left: 0;
    margin-right: 0;
  }

  .product-row{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
  }

  .product-row.header{
    display: none;
  }

  .product-name{
    padding-left: 0;
  }

  .product-row > div{
    font-size: 14px;
  }

  .product-row:not(.header) > div:nth-child(2)::before{
    content: "Wymiary: ";
    font-weight: 700;
    color: #333;
  }

  .product-row:not(.header) > div:nth-child(3)::before{
    content: "Dostępność: ";
    font-weight: 700;
    color: #333;
  }

  .product-row:not(.header) > div:nth-child(4)::before{
    content: "Cena: ";
    font-weight: 700;
    color: #333;
  }
}

@media (max-width: 900px){
  .search-page{
    gap: 18px;        
  }

  .results{
    margin-top: 0;    
  }

  .filters{
    margin-top: 0;      
  }
}

/* =========================
   WYNIKI – LEPSZE ODSTĘPY MOBILE
========================= */
@media (max-width: 900px){

  .results{
    padding: 0 16px;    
  }

  .results h1{
    margin-left: 2px;  
  }

  .results-tabs{
    margin-left: 2px;
  }

  .product-list{
    padding: 0 2px;
  }
}

/* =========================
   MOBILE – BOX "SZUKAJ DALEJ"
========================= */
@media (max-width: 900px){

  .filters{
    margin: 0 16px 20px 16px;
    max-width: 600px;
    width: auto;
    padding: 20px;
  }

  #searchForm{
    align-items: center;
  }

  #searchForm > div{
    width: 100%;
    max-width: 420px;
    margin: 0 auto !important;
  }

  .filters form > div > div[style*="display:grid"]{
    justify-content: center;
    justify-items: center;
  }

  .filters input[type="number"],
  .filters input[type="text"]{
    text-align: center;
  }

  .filters button[type="submit"]{
    max-width: 420px;
    margin: 8px auto 0 auto;
    display: block;
  }

  .filters h3,
  .filters h2{
    text-align: left;
  }
}

/* =========================
   PRODUKT – WYŚRODKOWANIE ZDJĘCIA (MOBILE)
========================= */
@media (max-width: 900px){

  .content-wrapper{
    display: flex;
    flex-direction: column;
    align-items: center; 
  }

  .content-wrapper > section:first-child{
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .product-image-box{
    margin: 0 auto;
  }

}

@media (max-width: 768px) {
  .back-search-btn {
    margin-top: 28px; 
  }
}


/* MOBILE FIX – wyszukiwarka */
@media (max-width: 768px) {
  .search-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .search-bar input {
    width: 100%;
    min-width: 0;
    font-size: 16px; 
  }

  .search-bar button {
    width: 100%;
    height: 44px;
  }
}

/* ===== MOBILE FORCE FIX (HOME SEARCH) ===== */
@media (max-width: 768px) {
  .hero {
    padding: 50px 16px !important;
  }

  .search-advanced {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 18px !important;
    width: calc(100% - 20px) !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    border-radius: 14px !important;
  }

  .search-advanced input {
    width: 100% !important;
    height: 54px !important;
    font-size: 16px !important;
    border-width: 2px !important;
    box-sizing: border-box !important;
  }

  .search-btn {
    width: 100% !important;
    height: 54px !important;
    border-radius: 12px !important;
  }
}

.product-row.zebra-odd  { background: #ffffff !important; }
.product-row.zebra-even { background: #f5f6f7 !important; }


/* PAGINACJA - WERSJA FINALNA (POPAKO STYLE) */
.pagination{
  display: flex;
  justify-content: center;   /* WYŚRODKOWANIE */
  align-items: center;
  gap: 10px;
  margin: 40px auto 60px;
  width: 100%;
}

/* wszystkie przyciski */
.pagination button{
  background: #111;          /* czarne */
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-width: 44px;
  transition: all 0.2s ease;
}

/* hover */
.pagination button:hover{
  background: #000;
  transform: translateY(-1px);
}

/* aktywna strona (np. 1, 2, 3) */
.pagination button.active{
  background: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* disabled (poprzednia/następna na końcach) */
.pagination button:disabled{
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

/* kropki ... */
.pagination span{
  padding: 0 6px;
  font-weight: 500;
  color: #666;
}

.filter-hidden{ display:none !important; }
.page-hidden{ display:none !important; }

/* USUŃ strzałki tylko w polach wymiarów (śr. wew., śr. zew., szer.) */
.dim-input::-webkit-outer-spin-button,
.dim-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.dim-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}



/*  NAV DROPDOWN HOVER */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropbtn {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.nav-dropmenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  min-width: 280px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  padding: 8px;
  display: none;
  z-index: 9999;
}

.nav-dropdown.open .nav-dropmenu {
  display: block;
}

.nav-dropmenu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  white-space: nowrap;
  font-size: 15px;
}

.nav-dropmenu a:hover {
  background: #f3f3f3;
}

/* MOBILE NAV UKŁAD 2 RZĘDY */
@media (max-width: 768px) {

  .nav-left {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .lang-switch {
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  .nav-dropdown,
  .nav-left a {
    order: 2;
  }

}

.ok{
  color:#22C55E;
  font-weight:600;
}

.search-page.no-filters{
  grid-template-columns: 1fr !important;
}

.search-page.no-filters .results{
  grid-column: 1 / -1;
}

.results{
  padding-left: 40px;
  padding-right: 40px;
}


.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.product-row.header > div {
  text-align: center;
}

.product-row > div {
  text-align: center;
}

.product-name {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.product-link {
  display: inline-block;
  text-align: center;
}

