.tp-header {
  background-color: #fff;
  color: #1e293b;
  padding: 0rem 0;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
  font-family: inherit;
  position: relative;
  z-index: 20000;
}

/* responsive margin */
@media (min-width: 1600px) {
  .tp-header {
    padding: 0rem 0;
  }
}

@media (max-width: 768px) {
  .tp-header {
    padding: 0rem 0;
  }
}

@media (max-width: 480px) {
  .tp-header {
    padding: 0rem 0;
  }
}

/* left group */
.tp-leftGroup {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* right group */
.tp-rightGroup {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* separator | */
.tp-separator {
  color: #cbd5e1;
  font-size: 1.2rem;
  font-weight: 200;
  margin: 0 0.2rem;
  -webkit-user-select: none;
  user-select: none;
}

/* dropdown block */
.tp-dropdownBlock {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  transition: all 0.15s ease;
  white-space: nowrap;
  background-color: transparent;
}

.tp-dropdownBlock:hover {
  background-color: #f1f5f9;
}

/* inner label/value */
.tp-blockLabel {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tp-blockValue {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #0f172a;
}

.tp-blockValue i {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* account specific */
.tp-accountIcon {
  font-size: 1.9rem !important;
  color: #334155;
}

.tp-accountText {
  display: flex;
  flex-direction: column;
}

.tp-accountLine1 {
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
}

.tp-accountLine2 {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: #0f172a;
}

/* star fav icon (unique) */
.tp-starIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #f59e0b;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 30px;
  transition: all 0.1s;
  background-color: transparent;
}

.tp-starIcon:hover {
  background-color: #fef3c7;
  transform: scale(1.05);
}

/* --- dropdown menus (clean flat design) --- */
.tp-dropdownMenu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  background-color: #ffffff;
  color: #1e293b;
  border-radius: 20px;
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
  padding: 0.75rem 0;
  min-width: 280px;
  max-width: 90vw;
  z-index: 99999;
  max-height: 70vh;
  overflow-y: auto;
  border: none;
}

/* special for delivery popup (two sections) */
.tp-deliveryMenu {
  min-width: 600px;
  padding: 0;
  flex-direction: row;
}

.tp-deliveryMenu.tp-dropdownMenu {
  overflow-y: hidden;
  /* handle overflow inside columns instead */
}

.tp-dropdownBlock.tp-active .tp-dropdownMenu {
  display: block;
}

.tp-dropdownBlock.tp-active .tp-deliveryMenu {
  display: flex !important;
}

/* delivery columns */
.tp-deliveryColumn {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow-y: auto;
}

.tp-deliveryColumn+.tp-deliveryColumn {
  border-left: 1px solid #e2e8f0;
}

/* menu items */
.tp-menuItem {
  list-style: none;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-left: 4px solid transparent;
  color: #000;
}

.tp-menuItem.tp-selected {
  background-color: #f1f5f9;
  border-left: 4px solid #3b82f6;
  font-weight: 600;
}

.tp-menuItem:hover {
  background-color: #f8fafc;
}

/* flag style */
.tp-flagIcon,
.tp-flagIcon img {
  font-size: 1.4rem;
  line-height: 1;
  width: 2rem;
  display: inline-block;
}

/* search box */
.tp-searchBox {
  padding: 0.5rem 1rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.3rem;
  position: sticky;
  top: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 5;
}

.tp-searchBox input {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 40px;
  font-size: 0.9rem;
  outline: none;
  background: #f8fafc;
  transition: 0.15s;
}

.tp-searchBox input:focus {
  border-color: #3b82f6;
  background: #ffffff;
}

/* divider line inside delivery menu */
.tp-menuDivider {
  height: 1px;
  background: #e2e8f0;
  margin: 0.8rem 0;
}

/* section label */
.tp-sectionLabel {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 0.5rem 1.2rem 0.2rem;
}

/* account menu specific */
.tp-accountMenu {
  min-width: 300px !important;
}

.tp-accountMenu li svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
  color: #475569;
}

.tp-accountMenu li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.tp-userNameItem {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #e2e8f0;
}

.tp-userFullname {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
}

/* ── Profile image in header ── */
.tp-profileImg {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

/* ── Mobile logo (hidden on desktop) ── */
.tp-mobileLogo {
  display: none;
}

/* ── Logo fade-in animation ── */
@keyframes tpLogoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ══════════════════════════════════════════════════
   MOBILE: Top panel + dropdown enhancements
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .tp-header {
    padding: 0;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 20000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background-color: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
  }

  /* Scroll shadow enhancement — applied via JS class */
  .tp-header.tp-header--scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    background-color: rgba(255, 255, 255, 0.96);
  }

  .tp-header>.container {
    padding-left: 10px;
    padding-right: 10px;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 0 !important;
    height: 100%;
  }

  /* ── Mobile logo: centered between left & right ── */
  .tp-mobileLogo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    order: 2;
  }

  .tp-mobileLogo a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tp-mobileLogo img {
    height: 48px;
    max-height: 48px;
    width: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
    animation: tpLogoFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    /* Prevent pixel blur on retina */
    image-rendering: -webkit-optimize-contrast;
  }

  .tp-leftGroup {
    order: 1;
    flex: 0 0 auto;
  }

  .tp-rightGroup {
    order: 3;
    flex: 0 0 auto;
  }

  /* Slim down the dropdown blocks */
  .tp-dropdownBlock {
    padding: 6px 6px;
    border-radius: 8px;
    gap: 0.2rem;
  }

  .tp-blockValue {
    font-size: 0.8rem;
    gap: 0.2rem;
  }

  .tp-blockValue i {
    font-size: 0.5rem;
  }

  /* Hide separator */
  .tp-separator {
    display: none;
  }

  /* Hide labels */
  .tp-blockLabel {
    display: none;
  }

  /* ── Delivery: only flag + currency on mobile ── */
  .tp-countryName {
    display: none !important;
  }

  /* ── Account: icon only, hide text ── */
  .tp-accountText {
    display: none;
  }

  .tp-accountIcon {
    font-size: 1.4rem !important;
  }

  .tp-profileImg {
    width: 28px;
    height: 28px;
    border-width: 1.5px;
  }

  /* ── Language: just abbreviation ── */
  #tpLangBlock {
    padding: 4px 6px;
  }

  /* ── Dropdown menus: bottom sheet on mobile ── */
  .tp-dropdownMenu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    animation: tpSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 100000;
  }

  .tp-deliveryMenu {
    min-width: 100%;
    flex-direction: column;
  }

  .tp-deliveryColumn+.tp-deliveryColumn {
    border-left: none;
    border-top: 1px solid #e2e8f0;
  }

  .tp-accountMenu {
    min-width: 100% !important;
  }

  .tp-searchBox {
    border-radius: 20px 20px 0 0;
    padding: 10px 14px 10px;
  }

  /* Flag — slightly smaller */
  .tp-flagIcon,
  .tp-flagIcon img {
    width: 1.4rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .tp-header {
    height: 58px;
  }

  .tp-dropdownBlock {
    padding: 4px 5px;
    gap: 0.15rem;
  }

  .tp-blockValue {
    font-size: 0.75rem;
  }

  .tp-rightGroup {
    gap: 0;
  }

  .tp-leftGroup {
    gap: 0;
  }

  .tp-mobileLogo img {
    height: 48px;
    max-height: 48px;
    width: 48px;
  }
}

@keyframes tpSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}