/* Shared styling for the curved A1 Shipping header */

:root {
  --header-gradient-start: #004aad;
  --header-gradient-end: #002b5b;
  --header-text-light: #ffffff;
  --header-accent: #ffb800;
  --header-body-dark: #0f172a;
}

body.menu-open {
  overflow: hidden;
}

.text-danger {
  color: #b91c1c;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.main-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
  color: var(--header-text-light);
  padding-block: 14px;
  border-bottom-right-radius: 90px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.main-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  min-height: 72px;
}

.main-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-header.is-rtl .main-header__inner {
  direction: rtl;
}

.main-header.is-rtl .main-header__left {
  flex-direction: row-reverse;
}

.main-header__logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: 0.4px;
}

.main-header__logo img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.main-header__toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: var(--header-text-light);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-header__toggle:hover {
  background: rgba(255, 255, 255, 0.24);
}

.main-header__nav {
  flex: 1 1 auto;
}

.main-header__nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.main-header__link {
  color: var(--header-text-light);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding-block: 6px;
  transition: color 0.25s ease;
}

.main-header__link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: -6px;
  width: 0%;
  height: 2px;
  background: var(--header-accent);
  transition: width 0.25s ease;
}

.main-header__link:hover,
.main-header__link.is-active {
  color: var(--header-accent);
}

.main-header__link:hover::after,
.main-header__link.is-active::after {
  width: 100%;
}

.main-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-header__search {
  position: relative;
}

.main-header__input {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 8px 42px 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--header-text-light);
  font-size: 14px;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.main-header.is-rtl .main-header__input {
  padding: 8px 16px 8px 42px;
}

.main-header__input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.main-header__input:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
}

.main-header__search-btn {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 15px;
}

.main-header.is-rtl .main-header__search-btn {
  inset-inline-start: 10px;
  inset-inline-end: auto;
}

.main-header__languages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.main-header__languages a {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--header-text-light);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-header__languages a:hover,
.main-header__languages a.is-active {
  background: rgba(255, 255, 255, 0.25);
}

.main-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--header-text-light);
  color: var(--header-body-dark);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.main-header__cta:hover {
  background: var(--header-accent);
  color: var(--header-body-dark);
  transform: translateY(-2px);
}

.main-header__cta span {
  background: var(--header-accent);
  color: #111827;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.main-header__user {
  position: relative;
}

.main-header__user-btn {
  background: none;
  border: none;
  color: var(--header-text-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.main-header__user-menu {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 210px;
  padding: 14px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 110;
}

.main-header.is-rtl .main-header__user-menu {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

.main-header__user-menu.open {
  display: flex;
}

.main-header__user-name {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
}

.main-header__user-menu a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  border-radius: 10px;
  padding: 6px 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-header__user-menu a:hover {
  background: rgba(15, 23, 42, 0.08);
}

.main-header__mobile {
  display: none;
}

.main-header__overlay {
  display: none;
}

.main-header__mobile-nav {
  display: grid;
  gap: 12px;
}

.main-header__mobile-nav a {
  color: var(--header-body-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-header__mobile-nav a:hover {
  background: rgba(15, 23, 42, 0.08);
}

.main-header__mobile-meta {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.main-header__mobile-account {
  display: grid;
  gap: 10px;
}

.main-header__mobile-account a {
  color: var(--header-body-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-header__mobile-account a:hover {
  background: rgba(15, 23, 42, 0.12);
}

.main-header__mobile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--header-gradient-start), var(--header-gradient-end));
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.main-header__mobile-cta:hover {
  transform: translateY(-2px);
}

.main-header__mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.main-header__mobile-search input {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.main-header__mobile-search button {
  border: none;
  border-radius: 12px;
  background: var(--header-gradient-start);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
}

.main-header__mobile .main-header__languages a {
  background: rgba(15, 23, 42, 0.08);
  color: var(--header-body-dark);
}

.main-header__mobile .main-header__languages a.is-active {
  background: var(--header-gradient-start);
  color: #ffffff;
}

@media (max-width: 1180px) {
  .main-header__nav-list {
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  .main-header {
    border-bottom-right-radius: 70px;
  }
  .main-header__inner {
    gap: 18px;
  }
  .main-header__nav-list {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .main-header {
    border-bottom-right-radius: 56px;
    padding-block: 10px;
  }

  .main-header__inner {
    min-height: 64px;
    padding-inline: 18px;
  }

  .main-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-header__nav,
  .main-header__actions {
    display: none;
  }

  .main-header__mobile {
    display: block;
    position: absolute;
    inset-inline: 16px;
    inset-block-start: calc(100% + 12px);
    background: #ffffff;
    color: var(--header-body-dark);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
    padding: 20px;
    max-height: calc(70vh);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 75;
  }

  .main-header--open .main-header__mobile {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-header__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 70;
  }

  .main-header--open + .main-header__overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .main-header__languages {
    gap: 10px;
  }

  .main-header__languages a {
    font-size: 13px;
  }
}

@media (max-width: 540px) {
  .main-header__logo img {
    height: 44px;
  }
  .main-header__mobile {
    inset-inline: 12px;
  }
}
