﻿/*
 * Header 9 — Veena / Outfit-inspired.
 * Scope: .bsp-h9 / .bsp-header--header-9
 */

.bsp-h9 {
  --bsp-h9-bg: #ffffff;
  --bsp-h9-text: #111111;
  --bsp-h9-muted: #666666;
  --bsp-h9-border: #e8e8e8;
  --bsp-h9-brand: #111111;
  --bsp-h9-accent: #c02026;
  --bsp-h9-announce-bg: #c02026;
  --bsp-h9-announce-text: #ffffff;
  --bsp-h9-pad: clamp(16px, 3vw, 40px);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--bsp-h9-text);
  background: var(--bsp-h9-bg);
}

.bsp-h9-announce {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 38px;
  padding: 8px var(--bsp-h9-pad);
  background: var(--bsp-h9-announce-bg);
  color: var(--bsp-h9-announce-text);
}

.bsp-h9-announce__track {
  position: relative;
  min-width: 0;
  text-align: center;
}

.bsp-h9-announce__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.bsp-h9-announce__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bsp-h9-announce__arrow:hover {
  opacity: 1;
  transform: scale(1.08);
}

.bsp-h9-container {
  width: min(calc(100% - (var(--bsp-h9-pad) * 2)), 1440px);
  margin: 0 auto;
}

.bsp-h9-main {
  border-bottom: 1px solid var(--bsp-h9-border);
  background: var(--bsp-h9-bg);
}

.bsp-h9-main .bsp-h9-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 78px;
}

.bsp-h9-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bsp-h9-mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--bsp-h9-text);
  border-radius: 1px;
}

.bsp-h9-nav {
  justify-self: start;
}

.bsp-h9-nav__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bsp-h9-nav__menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bsp-h9-text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.bsp-h9-nav__menu > li > a:hover,
.bsp-h9-nav__menu > li:hover > a {
  color: var(--bsp-h9-accent);
}

.bsp-h9-nav .bsp-nav-menu > li > a,
.bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bsp-h9-text);
  text-decoration: none;
  transition: color 0.25s ease;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bsp-h9-nav .bsp-nav-menu > li > a:hover,
.bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger:hover {
  color: var(--bsp-h9-accent);
}

.bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.75;
}

.bsp-h9-nav .bsp-submenu-toggle {
  display: none;
}

.bsp-h9-nav .bsp-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--bsp-h9-border);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.1);
  z-index: 310;
}

.bsp-h9-nav .bsp-nav-menu .sub-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--bsp-h9-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.bsp-h9-nav .bsp-nav-menu .sub-menu a:hover {
  background: var(--bsp-h9-soft, #f5f5f5);
  color: var(--bsp-h9-accent);
}

.bsp-h9-brand {
  justify-self: center;
  text-align: center;
}

.bsp-h9-logo {
  text-decoration: none;
  color: var(--bsp-h9-brand);
}

.bsp-h9-logo__title {
  font-family: "Archivo", "DM Sans", sans-serif;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.bsp-h9-logo__dot {
  color: var(--bsp-h9-accent);
}

.bsp-h9-logo__image img,
.bsp-h9-logo__image .custom-logo {
  display: block;
  max-height: 40px;
  width: auto;
}

.bsp-h9-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 10px;
  justify-self: end;
}

.bsp-h9-utility {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  font-size: 13px;
}

.bsp-h9-utility a {
  color: var(--bsp-h9-text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.bsp-h9-utility a:hover {
  color: var(--bsp-h9-accent);
}

.bsp-h9-utility__sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--bsp-h9-border);
}

.bsp-h9-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bsp-h9-text);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease;
}

.bsp-h9-action:hover {
  color: var(--bsp-h9-accent);
  transform: translateY(-1px);
}

.bsp-h9-action i {
  font-size: 16px;
}

.bsp-h9-cart-count,
.bsp-h9-wishlist-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bsp-h9-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.bsp-h9-wishlist-count[data-count="0"],
.bsp-h9-cart-count[data-count="0"] {
  display: none;
}

.bsp-h9-search-panel {
  border-top: 1px solid var(--bsp-h9-border);
  padding: 20px 0 24px;
  background: #fff;
}

.bsp-h9-search-form {
  display: flex;
  align-items: stretch;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--bsp-h9-border);
  border-radius: 8px;
  overflow: hidden;
}

.bsp-h9-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 14px;
}

.bsp-h9-search-form__submit {
  padding: 0 18px;
  border: 0;
  background: var(--bsp-h9-accent);
  color: #fff;
  cursor: pointer;
}

/* ============================= Desktop mega menu ========================= */

@media (min-width: 993px) {
  .bsp-h9 .bsp-nav-menu > .menu-item-has-children:not(.bsp-mega-menu-parent) {
    position: relative;
  }

  .bsp-h9 .bsp-nav-menu > .menu-item-has-children:not(.bsp-mega-menu-parent):hover > .sub-menu,
  .bsp-h9 .bsp-nav-menu > .menu-item-has-children:not(.bsp-mega-menu-parent):focus-within > .sub-menu {
    display: block;
  }

  .bsp-h9 .bsp-mega-menu-parent {
    position: static;
  }

  .bsp-h9 .bsp-mega-menu {
    position: fixed;
    top: var(--bsp-mega-menu-top, 78px);
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    transform: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    max-height: calc(100vh - var(--bsp-mega-menu-top, 78px));
    overflow-y: auto;
    z-index: 510;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
  }

  .bsp-h9 .bsp-mega-menu .bsp-container {
    width: min(calc(100% - (var(--bsp-h9-pad) * 2)), 1440px);
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }
}

body.bsp-mega-menu-open .bsp-h9 {
  z-index: 500;
}

/* ============================= Tablet + mobile ============================ */

@media (max-width: 992px) {
  .bsp-h9 {
    --bsp-h9-pad: clamp(14px, 4vw, 24px);
  }

  .bsp-h9-announce {
    gap: 10px;
    min-height: 34px;
    padding-block: 6px;
  }

  .bsp-h9-announce__msg {
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(72vw, 520px);
  }

  .bsp-h9-announce__arrow {
    flex: 0 0 auto;
  }

  .bsp-h9-main .bsp-h9-container {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "toggle brand actions";
    gap: 8px;
    min-height: 60px;
    padding-block: 8px;
    align-items: center;
  }

  .bsp-h9-mobile-toggle {
    display: flex;
    grid-area: toggle;
    flex-shrink: 0;
    align-self: center;
  }

  .bsp-h9-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .bsp-h9-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .bsp-h9-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .bsp-h9-mobile-toggle span {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .bsp-h9-brand {
    grid-area: brand;
    min-width: 0;
    padding: 0 4px;
  }

  .bsp-h9-actions {
    grid-area: actions;
    gap: 0;
    flex-shrink: 0;
  }

  .bsp-h9-utility,
  .bsp-h9-action--wishlist {
    display: none;
  }

  .bsp-h9-action {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .bsp-h9-action i {
    font-size: 17px;
  }

  .bsp-h9-logo__title {
    font-size: clamp(16px, 4.5vw, 22px);
  }

  .bsp-h9-logo__image img,
  .bsp-h9-logo__image .custom-logo {
    max-height: 34px;
  }

  /*
   * mega-menu.css sets .bsp-header-nav { position: relative } after header-9.css,
   * so use higher-specificity selectors to force the off-canvas drawer layout.
   */
  .bsp-header--header-9 .bsp-h9-main .bsp-h9-nav.bsp-header-nav {
    position: fixed;
    top: var(--bsp-mobile-nav-top, 60px);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    z-index: 480;
    grid-column: auto;
    grid-area: none;
    justify-self: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px var(--bsp-h9-pad) 40px;
    background: #fff;
    color: var(--bsp-h9-text);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
    transform: translateX(-100%);
    transition: transform 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
    visibility: hidden;
  }

  .bsp-header--header-9 .bsp-h9-main .bsp-h9-nav.bsp-header-nav.is-open,
  body.bsp-mobile-nav-open .bsp-header--header-9 .bsp-h9-main .bsp-h9-nav.bsp-header-nav {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
  }

  body.bsp-mobile-nav-open {
    overflow: hidden;
  }

  body.bsp-mobile-nav-open #masthead {
    position: relative;
    z-index: 481;
  }

  body.bsp-mobile-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    z-index: 470;
    pointer-events: none;
  }

  .bsp-h9-nav__menu,
  .bsp-h9-nav .bsp-nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .bsp-h9-nav__menu > li,
  .bsp-h9-nav .bsp-nav-menu > li {
    display: block;
    width: 100%;
  }

  .bsp-h9-nav__menu > li > a,
  .bsp-h9-nav .bsp-nav-menu > li > a,
  .bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--bsp-h9-border);
    color: var(--bsp-h9-text) !important;
  }

  .bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger::after {
    margin-left: auto;
  }

  .bsp-h9-nav .bsp-has-dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }

  .bsp-h9-nav .bsp-has-dropdown > a,
  .bsp-h9-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger {
    flex: 1;
    min-width: 0;
  }

  .bsp-h9-nav .bsp-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bsp-h9-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .bsp-h9-nav .bsp-submenu-toggle__icon {
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
  }

  .bsp-h9-nav .bsp-submenu-toggle[aria-expanded="true"] .bsp-submenu-toggle__icon,
  .bsp-h9-nav .is-submenu-open > .bsp-submenu-toggle .bsp-submenu-toggle__icon {
    transform: rotate(180deg);
  }

  .bsp-h9-nav .bsp-nav-menu .sub-menu,
  .bsp-h9-nav .bsp-mega-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    max-height: none;
    margin: 0;
    padding: 0 0 8px 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    overflow: visible;
  }

  .bsp-h9-nav .bsp-has-dropdown.is-submenu-open > .sub-menu,
  .bsp-h9-nav .bsp-mega-menu-parent.is-open > .bsp-mega-menu {
    display: block;
    flex: 0 0 100%;
  }

  .bsp-h9-nav .bsp-nav-menu .sub-menu a {
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(232, 232, 232, 0.7);
  }

  .bsp-h9-nav .bsp-mega-menu .bsp-mega-menu__grid {
    padding: 8px 0 0;
    gap: 16px;
  }

  .bsp-h9-search-panel {
    padding: 14px 0 18px;
  }

  .bsp-h9-search-form {
    max-width: none;
    border-radius: 6px;
  }

  .bsp-h9-search-form input[type="search"] {
    padding: 12px 14px;
    font-size: 16px;
  }

  .bsp-h9-search-form__submit {
    padding: 0 16px;
  }
}

@media (max-width: 576px) {
  .bsp-h9-announce__msg {
    max-width: min(64vw, 360px);
    font-size: 11px;
  }

  .bsp-h9-main .bsp-h9-container {
    min-height: 56px;
    gap: 4px;
  }

  .bsp-h9-action--account {
    display: none;
  }

  .bsp-h9-action {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .bsp-h9-action i {
    font-size: 16px;
  }

  .bsp-h9-logo__image img,
  .bsp-h9-logo__image .custom-logo {
    max-height: 30px;
  }

  .bsp-h9-cart-count,
  .bsp-h9-wishlist-count {
    top: 2px;
    right: 0;
    min-width: 14px;
    height: 14px;
    font-size: 9px;
    line-height: 14px;
  }
}
