/* Storefront header navigation — shop mega menu & inline search */

/* Match footer "Join Now" button dimensions */
:root {
  --join-now-radius: calc(6px + 2 * (100vw - 320px) / 1600);
  /* Join Now height ≈ vertical padding × 2 + ~20px text line */
  --join-now-height: calc(36px + 4 * (100vw - 320px) / 1600);
}

/* Keep main nav beside the logo on desktop — single line; search absorbs width pressure */
@media (min-width: 992px) {
  header.header-5 .header-wrapper {
    flex-wrap: nowrap;
    gap: 16px;
    min-width: 0;
  }

  header.header-5 .header-wrapper > .logo,
  header.header-5 .header-wrapper > .navbar-toggler {
    flex-shrink: 0;
  }

  header.header-5 .header-wrapper .navbar {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 12px;
  }

  header.header-5 .header-wrapper .navbar-nav {
    margin-left: 0 !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    gap: clamp(10px, 1.2vw, 28px) !important;
  }

  header.header-5 .header-wrapper .navbar-nav .nav-item {
    flex-shrink: 0;
  }

  header.header-5 .header-wrapper .navbar-nav .nav-item .nav-link {
    padding: 0 4px;
    white-space: nowrap;
  }

  header.header-5 .header-wrapper .header-option {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  header.header-5 .header-wrapper .header-option > li:not(.header-search-item) {
    flex-shrink: 0;
  }
}

header .header-wrapper .header-option li.header-search-item {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 640px;
  width: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

header .header-wrapper .header-option li.header-search-item .header-search-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

header .header-wrapper .header-option li.header-search-item .lang-switcher {
  flex-shrink: 0;
}

header .header-wrapper .header-option li.header-quote-item {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 4px;
  list-style: none;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn,
header .header-request-quote-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  white-space: nowrap;
  height: var(--join-now-height);
  min-height: var(--join-now-height);
  padding: 0 18px !important;
  margin: 0;
  border-radius: var(--join-now-radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1 !important;
  text-decoration: none !important;
  color: #fff !important;
  background: rgba(var(--primary-color), 1);
  border: 1px solid rgba(var(--primary-color), 1);
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn span:not(.header-request-quote-icon),
header .header-request-quote-btn span:not(.header-request-quote-icon) {
  display: inline-block;
  line-height: 1;
  color: #fff !important;
  position: static;
  top: auto;
  transform: none;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn i,
header .header-request-quote-btn i,
header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn i {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  font-size: 15px !important;
  line-height: 1 !important;
  color: #fff !important;
  --color: #fff;
  --size: 15px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn .header-request-quote-icon,
header .header-request-quote-btn .header-request-quote-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  line-height: 0;
  opacity: 1 !important;
  visibility: visible !important;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn .header-request-quote-icon svg,
header .header-request-quote-btn .header-request-quote-icon svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  overflow: visible;
  color: #ffffff !important;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn .header-request-quote-icon svg path,
header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn .header-request-quote-icon svg circle,
header .header-request-quote-btn .header-request-quote-icon svg path,
header .header-request-quote-btn .header-request-quote-icon svg circle {
  fill: #ffffff !important;
  stroke: none !important;
  color: #ffffff !important;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover .header-request-quote-icon,
header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:focus-visible .header-request-quote-icon,
header .header-request-quote-btn:hover .header-request-quote-icon,
header .header-request-quote-btn:focus-visible .header-request-quote-icon,
header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover .header-request-quote-icon svg path,
header .header-request-quote-btn:hover .header-request-quote-icon svg path {
  color: #ffffff !important;
  fill: #ffffff !important;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover,
header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:focus-visible,
header .header-request-quote-btn:hover,
header .header-request-quote-btn:focus-visible {
  color: #fff !important;
  background: rgba(var(--primary-color), 0.9);
  border-color: rgba(var(--primary-color), 0.9);
  filter: none;
  transform: none;
  box-shadow: none;
}

header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover i,
header .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:focus-visible i,
header .header-request-quote-btn:hover i,
header .header-request-quote-btn:focus-visible i,
header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover i,
header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:focus-visible i {
  color: #fff !important;
  --color: #fff;
  background: transparent;
}

header .header-request-quote-btn:active {
  background: rgba(var(--primary-color), 0.85);
  border-color: rgba(var(--primary-color), 0.85);
  color: #fff !important;
  box-shadow: none;
  transform: none;
  filter: none;
}

header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn,
header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:hover,
header.storefront-header-dark .header-wrapper .header-option li.header-quote-item a.header-request-quote-btn:focus-visible {
  color: #fff !important;
}

/* Legacy class kept for any cached markup */
header .header-bulk-order-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 16px;
  border-radius: var(--join-now-radius);
  text-decoration: none;
  color: #fff !important;
  background-color: rgba(var(--primary-color), 1);
  border: 1px solid rgba(var(--primary-color), 1);
  box-shadow: none;
}

header .header-bulk-order-btn:hover,
header .header-bulk-order-btn:focus-visible {
  color: #fff !important;
  background-color: rgba(var(--primary-color), 0.9);
  border-color: rgba(var(--primary-color), 0.9);
  box-shadow: none;
}

header.storefront-header-dark .header-bulk-order-btn:hover {
  color: #fff !important;
  background-color: rgba(var(--primary-color), 0.9);
  border-color: rgba(var(--primary-color), 0.9);
}

header .header-search-wrap {
  position: relative;
  width: 100%;
}

header .header-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid rgba(var(--border-color), 1);
  border-radius: var(--join-now-radius);
  overflow: hidden;
  background: #fff;
  height: var(--join-now-height);
  min-height: var(--join-now-height);
}

header .header-search-form--amazon {
  border-color: #d5d9d9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

header .header-search-form .form-control {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  color: #0f1111;
}

header .header-search-form .form-control:focus {
  box-shadow: none;
}

header .header-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 100%;
  border: 0;
  background: rgba(var(--primary-color), 1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  transition: background-color 0.15s ease;
}

header .header-search-submit:hover,
header .header-search-submit:focus-visible {
  background: rgba(var(--primary-color), 0.9);
}

header .header-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  transform: translateY(-4px);
  width: 100%;
  min-width: 100%;
  z-index: 1050;
  background: #1a1d21;
  border: 1px solid #2a2f36;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

header .header-search-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

header .header-search-dropdown[hidden] {
  display: none !important;
}

header .header-search-results {
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}

header .header-search-columns {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.2fr);
  gap: 0;
  align-items: stretch;
  min-height: 120px;
}

header .header-search-columns--single {
  grid-template-columns: 1fr;
}

header .header-search-col {
  min-width: 0;
  padding: 10px 0 8px;
}

header .header-search-col--tags {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

header .header-search-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

header .header-search-result {
  margin: 0;
  padding: 0 8px;
}

header .header-search-section-label {
  margin: 0;
  padding: 6px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa3af;
}

header .header-search-keyword {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 6px;
  color: #d1d5db !important;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

header .header-search-keyword:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
}

header .header-search-keyword__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  word-break: break-word;
  color: inherit;
}

header .header-search-keyword__text b,
header .header-search-keyword__text strong {
  font-weight: 700;
  color: #ffffff;
}

header .header-search-product {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 6px;
  color: #e5e7eb !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
}

header .header-search-product:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
}

header .header-search-product__thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #2a2f36;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
  flex-shrink: 0;
}

header .header-search-product__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

header .header-search-product__body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

header .header-search-product__name {
  display: -webkit-box !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: #f3f4f6 !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

header .header-search-product__price {
  display: inline-flex !important;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

header .header-search-product__price-current,
header .header-search-product__price-old,
header .header-search-product__currency {
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  vertical-align: top;
}

header .header-search-product__price-current {
  font-weight: 700;
  color: #ffffff;
}

header .header-search-product__price-old {
  font-weight: 500;
  color: #9ca3af;
  text-decoration: line-through;
}

header .header-search-product__currency {
  font-weight: 500;
  color: #9ca3af;
}

header .header-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
}

header .header-search-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: header-search-spin 0.7s linear infinite;
}

@keyframes header-search-spin {
  to {
    transform: rotate(360deg);
  }
}

header .header-search-empty {
  padding: 28px 16px;
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
}

header .header-search-error {
  color: #f87171;
}

header .header-search-view-more,
header .header-wrapper .header-option li a.header-search-view-more,
.mobile-header-search .header-search-view-more {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff !important;
  text-align: left;
  text-decoration: none;
  background: #15181c;
}

header .header-search-view-more:hover,
header .header-wrapper .header-option li a.header-search-view-more:hover,
.mobile-header-search .header-search-view-more:hover {
  background: #101317;
  color: #ffffff !important;
}

header .header-search-view-more i,
header .header-search-view-more .ri-arrow-right-s-line,
header .header-wrapper .header-option li a.header-search-view-more i,
.mobile-header-search .header-search-view-more i {
  font-size: 16px;
  line-height: 1;
  color: #ffffff !important;
  --color: #ffffff;
}

.mobile-header-search {
  padding: 0 16px 16px;
  border-bottom: 1px solid rgba(var(--border-color), 1);
  margin-bottom: 12px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.mobile-header-search .header-search-form {
  max-width: none;
}

.mobile-header-search .header-search-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-header-search .header-search-dropdown {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  transform: translateY(-4px);
}

.mobile-header-search .header-search-dropdown.is-open {
  transform: translateY(0);
}

.mobile-header-search .header-search-columns {
  grid-template-columns: 1fr;
}

.mobile-header-search .header-search-col--tags {
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 767.98px) {
  header .header-search-columns {
    grid-template-columns: 1fr;
  }

  header .header-search-col--tags {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Language switcher — pill trigger + custom floating list (no search) */
.lang-switcher.lang-switcher__btn,
button.lang-switcher__btn[data-lang-switcher] {
  position: relative;
  flex: 0 0 auto;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--join-now-height);
  min-height: var(--join-now-height);
  box-sizing: border-box;
  padding: 0 10px 0 10px;
  margin: 0;
  border-radius: var(--join-now-radius);
  border: 1px solid #d5d9d9;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8f8 100%);
  color: #0f1111;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 17, 17, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  pointer-events: auto !important;
  max-width: none;
  min-width: 0;
}

.lang-switcher__btn:hover,
.lang-switcher__btn:focus-visible,
.lang-switcher.is-open.lang-switcher__btn {
  border-color: rgba(var(--primary-color), 1);
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.2);
  outline: none;
  background: #fff;
}

.lang-switcher__btn .ri-global-line {
  font-size: 16px;
  color: rgba(var(--primary-color), 1);
  pointer-events: none;
  flex: 0 0 auto;
}

.lang-switcher__flag {
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 15px;
}

.lang-switcher__flag-img,
.lang-switcher__option-flag .lang-switcher__flag-img {
  display: block;
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 17, 17, 0.08);
}

.lang-switcher__flag-fallback {
  font-size: 14px;
  line-height: 1;
}

.lang-switcher__caret {
  font-size: 16px;
  opacity: 0.65;
  transition: transform 0.15s ease;
  pointer-events: none;
  flex: 0 0 auto;
}

.lang-switcher.is-open .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher__label-text {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  pointer-events: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang-switcher--mobile {
  max-width: none;
}

.lang-switcher--mobile .lang-switcher__label-text {
  max-width: none;
}

/* Floating language list on body — not inside header */
#ksi-lang-menu,
.lang-switcher__panel {
  display: none;
  position: fixed;
  flex-direction: column;
  width: min(240px, calc(100vw - 24px));
  height: auto !important;
  max-height: min(300px, 70vh);
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  box-shadow:
    0 2px 4px rgba(15, 17, 17, 0.06),
    0 12px 28px rgba(15, 17, 17, 0.14);
  overflow: hidden;
  z-index: 2147483000;
  pointer-events: auto !important;
}

#ksi-lang-menu:not([hidden]) {
  display: flex !important;
}

.lang-switcher__search {
  position: relative;
  flex: 0 0 auto;
  padding: 8px;
  border-bottom: 1px solid #eef0f3;
  background: #fff;
}

.lang-switcher__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #8b939c;
  pointer-events: none;
  line-height: 1;
}

.lang-switcher__search-input {
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 0.65rem 0 1.85rem;
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  background: #f5f6f7;
  color: #0f1111;
  font-size: 13px;
  line-height: 1.2;
  outline: none;
}

.lang-switcher__search-input::placeholder {
  color: #8b939c;
}

.lang-switcher__search-input:focus {
  border-color: rgba(var(--primary-color), 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.12);
}

.lang-switcher__empty {
  padding: 14px 10px;
  color: #6b7280;
  font-size: 13px;
  text-align: center;
}

.lang-switcher__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto !important;
}

.lang-switcher__option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #1f2933;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  pointer-events: auto !important;
}

.lang-switcher__option:hover,
.lang-switcher__option:focus-visible {
  background: #f3f5f7;
  outline: none;
}

.lang-switcher__option.is-active {
  background: rgba(var(--primary-color), 0.12);
  color: #0f1111;
  font-weight: 700;
}

.lang-switcher__option-flag {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
}

.lang-switcher__option-flag .lang-switcher__flag-img {
  width: 20px;
  height: 14px;
}

.lang-switcher__option-label {
  pointer-events: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-switcher__option-code {
  flex: 0 0 auto;
  min-width: 2.4rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f4;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  pointer-events: none;
}

.lang-switcher__option.is-active .lang-switcher__option-code {
  background: rgba(var(--primary-color), 1);
  color: #fff;
}

.lang-switcher-status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2147483001;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f1111;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.lang-switcher-status[hidden] {
  display: none !important;
}

html.is-translating,
html.is-translating body {
  cursor: progress;
}

.storefront-header-chrome,
header.header-5,
header.storefront-header-dark,
header .header-wrapper,
header .header-wrapper .header-option,
header .header-wrapper .header-option li.header-search-item {
  overflow: visible !important;
}

header .header-wrapper .header-option li.header-search-item .header-search-wrap {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 992px) {
  header.header-5 .header-wrapper {
    position: relative;
  }

  /* Invisible slot keeps header layout stable while search overlays */
  header .header-search-expand-slot {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    height: var(--join-now-height);
    pointer-events: none;
  }

  header.header-5.is-search-expanded .header-search-expand-slot {
    display: block;
  }

  header.header-5.is-search-expanded .header-search-wrap.is-expanded {
    position: fixed;
    z-index: 1200;
    margin: 0;
  }

  header.header-5.is-search-expanded .header-search-form {
    border-color: rgba(var(--primary-color), 1);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.18);
    background: #fff;
  }

  header.header-5.is-search-expanded .header-search-columns {
    grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.25fr);
  }
}

@media (min-width: 1200px) {
  header .header-wrapper .header-option li.header-search-item {
    /* Prefer a wider search when space allows, but still shrink before wrapping menus */
    flex: 1 1 280px;
    max-width: 680px;
    min-width: 0;
  }
}

.shop-mega-menu {
  min-width: 720px;
  background: #ffffff !important;
  color: #232323;
}

.shop-mega-row {
  min-height: 280px;
}

.shop-mega-parents-col,
.shop-mega-children-col,
.shop-mega-image-col {
  padding: 20px;
}

.shop-mega-parents-col {
  border-right: 1px solid rgba(var(--border-color), 1);
}

.shop-mega-children-col {
  border-right: 1px solid rgba(var(--border-color), 1);
}

.shop-mega-parents {
  display: grid;
  gap: 4px;
}

/* Left column categories — always black (dark header nav forces white on `ul li a`) */
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item:link,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item:visited,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item:hover,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item:focus,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item.active,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item span,
header.header-5 .navbar ul li .shop-mega-parents a.shop-mega-parent-item i,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item:link,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item:visited,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item:hover,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item:focus,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item.active,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item span,
header.storefront-header-dark .navbar ul li .shop-mega-parents a.shop-mega-parent-item i {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.shop-mega-parent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transition: background 0.2s ease;
}

.shop-mega-parent-item:hover,
.shop-mega-parent-item.active {
  background: rgba(var(--primary-color), 0.08);
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.shop-mega-parent-item i {
  font-size: 16px;
  opacity: 0.55;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.shop-mega-children-header {
  margin-bottom: 12px;
}

.shop-mega-children-header h6 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #232323 !important;
}

.shop-mega-children-list {
  display: grid;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.shop-mega-children-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #555555 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.shop-mega-children-list a:hover {
  background: rgba(var(--primary-color), 0.08);
  color: rgba(var(--primary-color), 1) !important;
}

.shop-mega-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(var(--primary-color), 1) !important;
  text-decoration: none;
}

.shop-mega-image {
  height: 100%;
  min-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-mega-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.shop-mega-image img.is-placeholder {
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  opacity: 0.55;
}

.shop-mega-image img.is-fading {
  opacity: 0.4;
}

.shop-mega-placeholder,
.shop-mega-loading {
  font-size: 14px;
  color: #777777 !important;
}

@media (max-width: 1199.98px) {
  .shop-mega-menu {
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  header .header-wrapper .header-option li.header-search-item {
    display: none;
  }

  .shop-mega-row {
    min-height: 0;
  }

  .shop-mega-parents-col,
  .shop-mega-children-col,
  .shop-mega-image-col {
    padding: 12px 0;
    border-right: none;
    border-bottom: 1px solid rgba(var(--border-color), 1);
  }

  .shop-mega-image-col {
    display: none !important;
  }

  .shop-mega-children-col {
    display: none;
  }

  .shop-mega-children-col.is-open {
    display: block;
  }

  .shop-mega-parent-item i {
    transition: transform 0.2s ease;
  }

  .shop-mega-parent-item.is-open i {
    transform: rotate(90deg);
  }
}

/* Scroll-to-top button — keep above sticky bars and notifications */
.tap-to-top {
  z-index: 25;
}

.tap-to-top svg {
  pointer-events: none;
}

.tap-to-top:focus-visible {
  outline: 2px solid rgba(var(--primary-color), 1);
  outline-offset: 2px;
}

.product-box.is-out-of-stock .product-img {
  opacity: 0.45;
  filter: grayscale(0.35);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.product-box.is-out-of-stock .product-img img {
  opacity: 0.9;
}

.product-box .product-stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* Slanted green discount tag — used in product price row (and legacy img-box) */
.product-box .product-img-box label.product-discount-tag {
  top: 12px;
  left: 0;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 6px 22px 6px 12px;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(90deg, #1b5e3b 0%, #4caf50 48%, #b6f34d 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  box-shadow: none;
  z-index: 3;
}

/* Compact product card title + price */
.product-box.style-2 .product-details-wrap .product-name a {
  font-size: calc(14px + 1.5 * (100vw - 320px) / 1600) !important;
  line-height: 1.35;
}

.product-box.style-2 .product-details-wrap .product-name .rate-box h5 {
  font-size: calc(12px + 1 * (100vw - 320px) / 1600);
}

.product-box .price,
.product-box.style-2 .product-details-wrap .price {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: flex-start;
  gap: 6px;
  line-height: 1.2;
  font-size: calc(13px + 1.5 * (100vw - 320px) / 1600) !important;
  font-weight: 500;
  color: #000 !important;
}

.product-box .price > *,
.product-box.style-2 .product-details-wrap .price > * {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  align-self: center !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0;
  font-size: inherit !important;
  line-height: 1.2 !important;
  vertical-align: middle;
  box-sizing: border-box;
}

.product-box .price .product-price-value,
.product-box .price .product-currency-code,
.product-box.style-2 .product-details-wrap .price .product-price-value,
.product-box.style-2 .product-details-wrap .price .product-currency-code {
  color: #000 !important;
  opacity: 1 !important;
  font-weight: inherit;
}

.product-box .price .product-currency-code,
.product-box.style-2 .product-details-wrap .price .product-currency-code {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-box .price .product-discount-price,
.product-box.style-2 .product-details-wrap .price .product-discount-price,
.product-box.style-2 .product-details-wrap .price del {
  font-weight: 400;
  text-decoration: line-through;
  color: #9aa0a6 !important;
  opacity: 1 !important;
}

.product-box .price label.product-discount-tag,
.product-box.style-2 .product-details-wrap .price label.product-discount-tag {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 2px 10px 2px 6px !important;
  color: #fff !important;
  font-size: 0.92em !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2 !important;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(90deg, #1b5e3b 0%, #4caf50 48%, #b6f34d 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  box-shadow: none;
  transform: none !important;
  opacity: 1;
}

[dir="rtl"] .product-box .product-img-box label.product-discount-tag {
  left: auto;
  right: 0;
  padding: 6px 12px 6px 22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
  background: linear-gradient(270deg, #1b5e3b 0%, #4caf50 48%, #b6f34d 100%);
}

[dir="rtl"] .product-box .price label.product-discount-tag,
[dir="rtl"] .product-box.style-2 .product-details-wrap .price label.product-discount-tag {
  padding: 2px 6px 2px 10px !important;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%);
  background: linear-gradient(270deg, #1b5e3b 0%, #4caf50 48%, #b6f34d 100%);
}

@media (max-width: 575.98px) {
  .product-box .product-img-box label.product-discount-tag {
    min-height: 22px;
    padding: 5px 18px 5px 10px;
    font-size: 10px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  }

  .product-box.style-2 .product-details-wrap .product-name a {
    font-size: calc(13px + 1 * (100vw - 320px) / 255) !important;
  }

  .product-box .price,
  .product-box.style-2 .product-details-wrap .price {
    font-size: calc(12px + 1 * (100vw - 320px) / 255) !important;
  }

  .product-box .price label.product-discount-tag,
  .product-box.style-2 .product-details-wrap .price label.product-discount-tag {
    height: auto;
    min-height: 0 !important;
    padding: 2px 8px 2px 5px !important;
    font-size: 0.9em !important;
  }
}

/* Cart sidebar: quantity + variation side-by-side in boxes */
.offcanvas.cart-offcanvas .cart-item-meta,
.cart-section .cart-item-meta,
.cart-section .product-info .cart-item-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px;
}

.offcanvas.cart-offcanvas .cart-item-meta-box,
.cart-section .cart-item-meta-box,
.cart-section .product-info .cart-item-meta-box {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  padding: 5px 10px;
  border: 1px solid rgba(var(--border-color), 1);
  border-radius: 6px;
  background: #f5f6f8;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(var(--title-color), 0.8);
  white-space: nowrap;
}

.offcanvas.cart-offcanvas .cart-item-meta-box.cart-item-variant strong,
.cart-section .cart-item-meta-box.cart-item-variant strong {
  margin-left: 2px;
  color: rgba(var(--title-color), 1);
  font-weight: 600;
}

.offcanvas.cart-offcanvas .cart-item-meta .cart-item-qty,
.offcanvas.cart-offcanvas .cart-item-meta .cart-item-variant,
.cart-section .cart-item-meta .cart-item-qty,
.cart-section .cart-item-meta .cart-item-variant {
  margin: 0 !important;
  font-size: 12px;
}

/* Cart sidebar wishlist: outline + filled hearts — show only one at a time */
.offcanvas.cart-offcanvas .edit-delete-buttons .btn.wishlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.offcanvas.cart-offcanvas .edit-delete-buttons .btn.wishlist-btn .fill {
  display: none !important;
}
.offcanvas.cart-offcanvas .edit-delete-buttons .btn.wishlist-btn.active .line {
  display: none !important;
}
.offcanvas.cart-offcanvas .edit-delete-buttons .btn.wishlist-btn.active .fill {
  display: inline-block !important;
}
.offcanvas.cart-offcanvas .edit-delete-buttons .btn.wishlist-btn.active {
  color: rgba(var(--primary-color), 1);
  border-color: rgba(var(--primary-color), 0.35);
  background-color: rgba(var(--primary-color), 0.1);
}

/* Cart page table wishlist heart */
.cart-section .cart-btn-group a.wishlist-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(var(--title-color), 0.55);
  font-size: calc(18px + (20 - 18) * ((100vw - 320px) / (1920 - 320)));
  line-height: 1;
}
.cart-section .cart-btn-group a.wishlist-btn .fill {
  display: none !important;
}
.cart-section .cart-btn-group a.wishlist-btn.active {
  color: rgba(var(--primary-color), 1);
}
.cart-section .cart-btn-group a.wishlist-btn.active .line {
  display: none !important;
}
.cart-section .cart-btn-group a.wishlist-btn.active .fill {
  display: inline-block !important;
}
