/* ── Spareza — Header Styles ── */

/* ══════════════════════════════════════
   TOP INFO BAR
══════════════════════════════════════ */

.topbar {
  background: var(--neutral-900);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 7px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links {
  display: flex;
  gap: 20px;
}
.topbar-links a {
  transition: color 0.15s;
}
.topbar-links a:hover {
  color: white;
  text-decoration: underline;
}

/* ══════════════════════════════════════
   TOPBAR DROPDOWNS
══════════════════════════════════════ */
.tb-vat-wrap,
.tb-country-wrap,
.tb-lang-wrap {
  position: relative;
  display: inline-block;
}
.tb-vat-btn,
.tb-country-btn,
.tb-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-family: "Inter", sans-serif;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.12s;
}
.tb-vat-btn svg,
.tb-country-btn svg,
.tb-lang-btn svg {
  pointer-events: none;
}
.tb-vat-btn:hover,
.tb-country-btn:hover,
.tb-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.tb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--neutral-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.tb-dropdown.open {
  display: flex;
}
.tb-dropdown-country {
  width: 300px;
}
.tb-country-list {
  max-height: 600px;
  overflow: auto;
}
.tb-country-list-item {
  text-align: left;
}
.tb-dropdown-country-search {
  padding: 8px;
  margin: 8px;
  background-image: url(/assets/img/search.svg);
  background-repeat: no-repeat;
  background-position: 98% 50%;
  background-size: 15px;
  border-radius: 8px;
}

.tb-dd-item {
  padding: 9px 14px;
  font-size: 12px;
  font-family: "Inter", sans-serif;
  color: rgba(255, 255, 255, 0.8);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.tb-dd-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.tb-dd-item.active {
  color: var(--primary-400);
  font-weight: 600;
}

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--neutral-200);
  padding: 8px 0 12px;
  z-index: 100;
}
.mobile-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px;
  color: var(--neutral-400);
  text-decoration: none;
}
.mobile-nav-item.active {
  color: var(--primary-500);
}
.mobile-nav-icon {
  font-size: 20px;
}
.mobile-nav-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ══════════════════════════════════════
   SITE HEADER
══════════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 400;
  box-shadow: 0 1px 8px rgba(17, 25, 40, 0.06);
}
.hdr-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hdr-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.hdr-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hdr-logo-mark svg {
  width: 16px;
  height: 16px;
}
.hdr-logo-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--neutral-1000);
  letter-spacing: -0.4px;
}
.hdr-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--neutral-1000);
  border-radius: var(--radius-md);
  overflow: hidden;
  /*order: 3; */
  width: 100%;
}

.hdr-action-label {
  display: none;
}
.hdr-nav-inner::-webkit-scrollbar {
  display: none;
}
.hdr-nav-link {
  padding: 10px 10px;
  font-size: 12px;
}

.hdr-search-inner {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.hdr-search-ico {
  position: absolute;
  left: 12px;
  color: var(--neutral-400);
  pointer-events: none;
}
.hdr-search-input {
  flex: 1;
  height: 44px;
  padding: 0 36px 0 40px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--neutral-1000);
  font-family: "Inter", sans-serif;
}
.hdr-search-input::placeholder {
  color: var(--neutral-400);
}
.hdr-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--neutral-400);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.hdr-search-btn {
  height: 44px;
  padding: 0 22px;
  background: var(--neutral-1000);
  color: white;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.hdr-search-btn:hover {
  background: var(--neutral-800);
}
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.hdr-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--neutral-1000);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.hdr-menu-btn:hover,
.hdr-menu-btn[aria-expanded="true"] {
  color: var(--primary-500);
  border-color: var(--primary-500);
  background: var(--primary-100);
}
.hdr-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--neutral-600);
  transition: all 0.12s;
  position: relative;
  cursor: pointer;
  background-color: white;
  border: none;
}
.hdr-action-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-1000);
}
.hdr-action-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.hdr-action-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: var(--primary-500);
  color: white;
  font-size: 9px;
  font-weight: 800;
  border-radius: 99px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.hdr-cart {
  color: var(--primary-500);
}
.hdr-cart:hover {
  background: var(--primary-100);
}

/* Main nav strip */
.hdr-nav {
  background: var(--neutral-1000);
}
.hdr-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.hdr-nav-link {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.hdr-nav-link:hover,
.hdr-nav-link.active {
  color: white;
  border-bottom-color: white;
}
.hdr-nav-deals {
  color: #fb923c;
  font-weight: 700;
}
.hdr-nav-deals:hover {
  color: #fdba74;
  border-bottom-color: #fb923c;
}

/* Mobile navigation drawer */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(17, 25, 40, 0.48);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}
.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu {
  width: min(88vw, 370px);
  height: 100%;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: -18px 0 50px rgba(17, 25, 40, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu-overlay.open .mobile-menu {
  transform: translateX(0);
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--neutral-200);
}
.mobile-menu-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--neutral-1000);
}
.mobile-menu-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--neutral-100);
  color: var(--neutral-700);
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
}
.mobile-menu-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  padding: 0 10px;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 15px;
  font-weight: 650;
  color: var(--neutral-800);
}
.mobile-menu-links a span:last-child {
  font-size: 25px;
  color: var(--neutral-300);
  font-weight: 400;
}
.mobile-menu-links a.active {
  color: var(--primary-500);
}
.mobile-menu-links a.active span:last-child {
  color: var(--primary-500);
}
.mobile-menu-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 18px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-200);
}
.mobile-menu-quick a,
.mobile-menu-quick button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  color: var(--neutral-700);
  font-size: 11px;
  font-weight: 700;
}
.mobile-menu-settings {
  margin: 0 18px 20px;
}
.mobile-menu-settings-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  color: var(--neutral-600);
}
.mobile-setting,
.mobile-vat-setting {
  border-top: 1px solid var(--neutral-200);
}
.mobile-setting:last-of-type {
  border-bottom: 1px solid var(--neutral-200);
}
.mobile-setting summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}
.mobile-setting summary::-webkit-details-marker {
  display: none;
}
.mobile-setting summary > span:first-child,
.mobile-vat-setting > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mobile-setting small,
.mobile-vat-setting small {
  font-size: 12px;
  line-height: 1.35;
  color: var(--neutral-600);
  font-weight: 650;
}
.mobile-setting strong,
.mobile-vat-setting strong {
  font-size: 15px;
  line-height: 1.4;
  color: var(--neutral-900);
  font-weight: 700;
}
.mobile-setting-chevron {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-right: 2px solid var(--neutral-400);
  border-bottom: 2px solid var(--neutral-400);
  transform: rotate(45deg);
  transition: transform 0.18s;
}
.mobile-setting[open] .mobile-setting-chevron {
  transform: rotate(225deg);
}
.mobile-setting-panel {
  margin-bottom: 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  overflow: hidden;
}
.mobile-country-panel > input {
  width: calc(100% - 16px);
  height: 38px;
  margin: 8px;
  padding: 0 11px;
  border: 1px solid var(--neutral-200);
  border-radius: 7px;
  background: var(--white);
  font-size: 13px;
}
.mobile-country-list {
  max-height: 210px;
  overflow-y: auto;
}
.mobile-country-list button,
.mobile-language-list a {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid var(--neutral-100);
  background: transparent;
  color: var(--neutral-800);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
}
.mobile-language-list a.active {
  color: var(--primary-500);
  font-weight: 700;
}
.mobile-vat-setting {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--neutral-200);
}
.mobile-vat-toggle {
  display: flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--neutral-100);
}
.mobile-vat-toggle button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--neutral-700);
  font-size: 12px;
  font-weight: 700;
}
.mobile-vat-toggle button.active {
  background: var(--white);
  color: var(--primary-500);
  box-shadow: var(--shadow-sm);
}
.mobile-menu-note {
  margin-top: auto;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--neutral-1000);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  text-align: center;
}
body.mobile-menu-open {
  overflow: hidden;
}

@media (min-width: 769px) and (max-width: 1050px) {
  .topbar-inner {
    justify-content: center;
  }
  .topbar-inner > div:first-child {
    display: none;
  }
  .topbar-links {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar {
    display: none;
  }

  /* Header */
  .hdr-inner {
    padding: 10px 16px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .hdr-logo img {
    max-width: 108px;
    height: auto;
  }
  .hdr-logo-name {
    font-size: 17px;
  }
  .hdr-logo-mark {
    width: 32px;
    height: 32px;
  }
  .hdr-search {
    min-width: 0;
    border-width: 1.5px;
  }
  .hdr-search-input {
    min-width: 0;
    height: 40px;
    padding-right: 30px;
    font-size: 16px;
  }
  .hdr-search-btn {
    display: none;
  }
  .hdr-search-mobile {
    flex: 1;
    display: flex;
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
  }
  .hdr-search-mobile input {
    flex: 1;
    height: 38px;
    padding: 0 12px 0 36px;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--neutral-1000);
    font-family: "Inter", sans-serif;
  }
  .hdr-search-mobile input::placeholder {
    color: var(--neutral-400);
  }
  .hdr-search-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    pointer-events: none;
  }
  .hdr-action-label {
    display: none;
  }
  .hdr-action-btn {
    padding: 7px;
  }
  .hdr-action-btn:not(.hdr-cart) {
    display: none;
  }
  .hdr-cart {
    display: flex;
  }
  .hdr-menu-btn {
    display: inline-flex;
  }

  /* Nav */
  .hdr-nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .hdr-inner {
    padding: 9px 12px;
  }
  .hdr-logo img {
    max-width: 88px;
  }
  .hdr-actions {
    margin-left: 0;
  }
  .hdr-menu-btn {
    padding: 0 9px;
  }
  .hdr-menu-btn span {
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .hdr-logo img {
    max-width: 78px;
  }
  .hdr-inner {
    gap: 7px;
    padding-inline: 9px;
  }
  .hdr-menu-btn {
    width: 40px;
    padding: 0;
  }
  .hdr-menu-btn span {
    display: none;
  }
  .hdr-action-btn {
    padding-inline: 5px;
  }
}

/* Phone header: controls on top, full-width search below. */
@media (max-width: 600px) {
  .hdr-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 9px 10px;
    padding: 9px 12px 11px;
  }
  .hdr-logo {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .hdr-logo img {
    max-width: 108px;
    height: 30px !important;
    object-fit: contain;
  }
  .hdr-actions {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }
  .hdr-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .hdr-search-input {
    width: 100%;
    height: 42px;
    padding-left: 38px;
    text-overflow: ellipsis;
  }
  .hdr-menu-btn {
    min-height: 38px;
  }
  .hdr-action-btn {
    min-width: 38px;
    min-height: 38px;
  }
}

@media (max-width: 380px) {
  .hdr-logo img {
    max-width: 96px;
  }
}
