/* PartsMarket - Global Stylesheet */
/* Font: Nunito (matches original rounded sans-serif) */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #E8321A;
  --red-dark: #C42A14;
  --navy: #0F1923;
  --navy-light: #1A2733;
  --blue: #1a6fd4;
  --blue-dark: #1558aa;
  --gray-50: #FAFAFA;
  --gray-100: #F5F6F7;
  --gray-200: #E8EAED;
  --gray-300: #DADCE0;
  --gray-400: #9AA0A6;
  --gray-500: #80868B;
  --gray-600: #5F6368;
  --gray-700: #3C4043;
  --gray-800: #202124;
  --white: #FFFFFF;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --font-main: 'Nunito', 'Nunito Sans', sans-serif;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-width: 1280px;
}

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-main); }

/* =====================
   TOPBAR
   ===================== */
.topbar {
  background: var(--navy);
  color: var(--gray-400);
  font-size: 12px;
  padding: 7px 0;
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: var(--gray-400); transition: color 0.18s; }
.topbar a:hover { color: var(--white); }
.topbar-left { display: flex; gap: 20px; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.lang-active { color: var(--white) !important; font-weight: 700; }

/* =====================
   HEADER
   ===================== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 40px; width: auto; object-fit: contain; }

.search-bar {
  flex: 1;
  display: flex;
  max-width: 580px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--blue); }
.search-select {
  background: var(--gray-100);
  border: none;
  border-right: 1px solid var(--gray-200);
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-main);
  color: var(--gray-600);
  cursor: pointer;
  min-width: 90px;
  outline: none;
}
.search-input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-main);
  outline: none;
  background: var(--white);
  color: var(--gray-800);
}
.search-input::placeholder { color: var(--gray-400); }
.search-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 0 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
  flex-shrink: 0;
}
.search-btn:hover { background: var(--blue-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  flex-shrink: 0;
}
.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--gray-600);
  cursor: pointer;
  transition: color 0.18s;
  text-align: center;
}
.header-action:hover { color: var(--red); }
.cart-action { position: relative; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* =====================
   NAV
   ===================== */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
.nav-categories {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border-right: 1px solid var(--gray-200);
  margin-right: 4px;
  user-select: none;
  flex-shrink: 0;
  color: var(--gray-800);
  transition: color 0.18s;
}
.nav-categories:hover { color: var(--red); }
.categories-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  z-index: 300;
  padding: 6px 0;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cat-item:hover { background: var(--gray-100); color: var(--red); }

.nav-links { display: flex; align-items: center; flex: 1; }
.nav-link {
  padding: 12px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  transition: color 0.18s;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--red); }
.nav-link.active { color: var(--red); border-bottom-color: var(--red); }

.nav-top-ads {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  color: var(--gray-700);
  transition: color 0.18s;
  flex-shrink: 0;
  position: relative;
}
.nav-top-ads:hover { color: var(--red); }
.top-inzeraty-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  width: 320px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.top-ad-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-bottom: 1px solid var(--gray-100);
}
.top-ad-item:last-child { border-bottom: none; }
.top-ad-item:hover { background: var(--gray-50); }
.top-ad-img { width: 48px; height: 42px; border-radius: var(--radius-sm); background: var(--gray-100); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.top-ad-img img { width: 100%; height: 100%; object-fit: cover; }
.top-ad-title { font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-ad-price { font-size: 13px; font-weight: 900; color: var(--red); margin-top: 2px; }

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  font-family: var(--font-main);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 4px 12px rgba(232,50,26,0.3); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; color: var(--gray-800); border: 1.5px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-ghost { background: transparent; color: var(--blue); font-weight: 600; }
.btn-ghost:hover { background: rgba(26,111,212,0.08); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--gray-100); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-light); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-xl { padding: 15px 36px; font-size: 17px; }
.btn-full { width: 100%; }
.btn-rounded { border-radius: 30px; }

/* =====================
   HELP BAR
   ===================== */
.help-bar {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 22px 0;
}
.help-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.help-title { font-size: 16px; font-weight: 800; color: var(--navy); }
.help-sub { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.help-contacts { display: flex; gap: 32px; }
.help-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-800);
  transition: color 0.18s;
}
.help-contact:hover { color: var(--blue); }
.help-contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--blue);
  flex-shrink: 0;
}
.help-contact-label { font-size: 11px; color: var(--gray-400); font-weight: 600; letter-spacing: 0.3px; }
.help-contact-value { font-size: 14px; font-weight: 700; color: var(--navy); }

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding: 52px 0 28px;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  transition: color 0.18s;
  font-weight: 500;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 12px;
  gap: 24px;
}
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: all 0.18s;
}
.social-link:hover { background: var(--red); color: var(--white); }

/* =====================
   UTILITIES
   ===================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-sm { padding: 32px 0; }
.section-lg { padding: 72px 0; }
.divider { height: 1px; background: var(--gray-200); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-navy { color: var(--navy); }
.text-gray { color: var(--gray-500); }
.font-display { font-family: var(--font-main); font-weight: 900; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; padding: 10px 16px; gap: 12px; }
  .search-bar { order: 3; flex: 1 1 100%; max-width: 100%; }
  .header-actions { gap: 12px; }
  .topbar-left { display: none; }
  .nav-inner { padding: 0 16px; overflow-x: auto; }
  .help-bar-inner { flex-direction: column; align-items: flex-start; }
  .help-contacts { flex-direction: column; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
