/* ==========================================================================
   SS Nav Menu
   ========================================================================== */

/* ── Nav bar ── */
#ss-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.ss-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}

.ss-nav-item {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
}

.ss-nav-link {
  color: #111111;
  text-decoration: none;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  position: relative;
}

.ss-nav-link:hover {
  color: #111111;
}

.ss-nav-link--mega::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 4px;
  height: 4px;
  background: #111;
  border-radius: 50%;
  transition: transform .2s ease;
}

.ss-nav-link--mega:hover::after {
    transform: translateX(-50%) scale(1);
  }

/* ── Mega dropdown — positioned via JS (position:fixed) ── */
.ss-mega {
  position: fixed;
  background: #fff;
  box-shadow: 0 20px 48px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  border-top: 2px solid #111;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0 0 12px 12px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, visibility .22s ease, transform .22s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  overflow: hidden;
}

.ss-nav-item.ss-open .ss-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.ss-mega-inner {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

/* ── Columns ── */
.ss-mega-col {
  flex: 1;
  padding: 32px 36px;
}

.ss-mega-col--bordered {
  border-right: 1px solid #f0f0f0;
}

/* Columna brands: blanco */
.ss-mega-col--brands {
  background: #fff;
}

/* Columna uso: fondo levemente gris como en el mockup */
.ss-mega-col:not(.ss-mega-col--brands) {
  background: #fafafa;
}

.ss-mega-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #aaa;
  text-transform: uppercase;
  margin: 0 0 18px;
}

/* ── Brand grid: 2 columnas con chips de color ── */
.ss-brands-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.ss-brand-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #111;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  transition: background .15s;
}

.ss-brand-item:hover {
  background: #f5f5f5;
  color: #111;
}

.ss-brand-chip {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
}

.ss-brand-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.ss-brand-initials {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  line-height: 1;
}

.ss-brand-chip[data-color="0"] { background: #1a6b3a; }
.ss-brand-chip[data-color="1"] { background: #111; }
.ss-brand-chip[data-color="2"] { background: #c0392b; }
.ss-brand-chip[data-color="3"] { background: #2980b9; }
.ss-brand-chip[data-color="4"] { background: #8e44ad; }
.ss-brand-chip[data-color="5"] { background: #c9a84c; }
.ss-brand-chip[data-color="6"] { background: #16a085; }
.ss-brand-chip[data-color="7"] { background: #d35400; }
.ss-brand-chip[data-color="8"] { background: #555; }
.ss-brand-chip[data-color="9"] { background: #27ae60; }

.ss-col-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ss-brand-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111;
}

.ss-brand-count {
  font-size: 11px;
  color: #aaa;
  line-height: 1.3;
  margin-top: 1px;
}

/* ── Uso: cards con borde, fondo blanco, icono SVG ── */
.ss-uso-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ss-uso-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  background: #fff;
  border: 1.5px solid #eee;
  transition: border-color .15s;
}

.ss-uso-item:last-child {
  border-bottom: 1.5px solid #eee;
}

.ss-uso-item:hover {
  border-color: #111;
}

.ss-uso-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #555;
  transition: color .15s;
}

.ss-uso-item:hover .ss-uso-icon {
  color: #111;
}

.ss-uso-name {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

.ss-uso-sub {
  font-size: 11px;
  color: #999;
  margin-top: 1px;
  line-height: 1.3;
  font-weight: 400;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  #ss-nav { display: none; }
}

/* ── Mobile bar (Panda #mobile_bar slots) ── */
.ss-mobile-logo {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #111;
  text-decoration: none;
}

.ss-mobile-logo .ss_logo_scooters { color: #555; }

.ss-mobile-cart {
  position: relative;
  color: #111;
  display: flex;
  align-items: center;
}

.ss-mobile-cart-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  background: #111;
  color: #fff;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  line-height: 1.4;
}

/* ── Mobile search overlay ── */
#ss-mobile-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 60px;
}

#ss-mobile-search-box {
  width: calc(100% - 32px);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  position: relative;
}

#ss-mobile-search-close {
  position: absolute;
  top: 8px;
  right: 10px;
}

/* ── Mobile hamburger button ── */
#ss-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

#ss-mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s;
  transform-origin: center;
}

/* Hamburger → X animation */
#ss-mobile-menu-btn.ss-menu-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#ss-mobile-menu-btn.ss-menu-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#ss-mobile-menu-btn.ss-menu-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 991px) {
  #ss-mobile-menu-btn { display: flex; }
}

/* ── Mobile drawer overlay ── */
#ss-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 19998;
  opacity: 0;
  transition: opacity .25s ease;
}

#ss-mobile-overlay.ss-visible {
  display: block;
}

#ss-mobile-overlay.ss-active {
  opacity: 1;
}

/* ── Mobile drawer panel ── */
#ss-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 88vw;
  background: #fff;
  z-index: 19999;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

#ss-mobile-drawer.ss-open {
  transform: translateX(0);
}

.ss-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.ss-drawer-logo {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #111;
  text-decoration: none;
}

.ss-drawer-logo span { color: #555; }

.ss-drawer-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #555;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.ss-drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.ss-drawer-search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 10px 14px;
}

.ss-drawer-search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: #111;
}

.ss-drawer-search-inner input::placeholder { color: #bbb; }

.ss-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Drawer nav items ── */
.ss-drawer-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.ss-drawer-section-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #111;
  text-transform: uppercase;
}

.ss-drawer-section-arrow {
  font-size: 12px;
  color: #999;
  transition: transform .2s;
}

.ss-drawer-section.ss-drawer-open .ss-drawer-section-arrow {
  transform: rotate(90deg);
}

.ss-drawer-sub {
  display: none;
  flex-direction: column;
}

.ss-drawer-sub.ss-drawer-open {
  display: flex;
}

/* Sub-level 1 */
.ss-drawer-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px 13px 32px;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  user-select: none;
}

.ss-drawer-sub-head span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

/* Sub-level 2: leaf items */
.ss-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px 11px 48px;
  border-bottom: 1px solid #e8e8e8;
  text-decoration: none;
  color: #444;
  font-size: 13px;
}

.ss-drawer-link:hover { background: #f5f5f5; color: #111; }

.ss-drawer-link--top {
  padding-left: 20px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  background: #fafafa;
  color: #111;
  text-transform: uppercase;
}

.ss-drawer-link-count {
  font-size: 10px;
  color: #bbb;
}

/* ── Drawer account section ── */
.ss-drawer-account-head {
  background: #f5f5f5;
  padding: 8px 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #999;
}

.ss-drawer-account-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid #e8e8e8;
  text-decoration: none;
  color: #333;
  font-size: 13px;
}

.ss-drawer-account-link:hover { background: #f5f5f5; color: #111; }

.ss-drawer-account-link--logout { color: #888; }
.ss-drawer-account-link--logout:hover { color: #c0392b; background: #fff5f5; }

/* ── Reset button used as icon btn ── */
button.ss_icon_btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

/* ── Action wrap (search + account) ── */
.ss-action-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ss-action-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ss-account-name {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}

/* ── Shared dropdown panel ── */
.ss-action-drop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  pointer-events: none;
}

.ss-action-wrap.ss-open .ss-action-drop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Search dropdown ── */
.ss-search-drop {
  width: 320px;
  padding: 12px;
  right: 0;
  left: auto;
}

.ss-search-form {
  width: 100%;
  position: relative;
}

.ss-search-inner {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s;
}

.ss-search-inner:focus-within {
  border-color: #111;
}

.ss-search-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0 12px;
  font-size: 14px;
  background: transparent;
  color: #111;
}

.ss-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #111;
  transition: color .15s;
}

.ss-search-submit:hover {
  color: #555;
}

/* ── Search autocomplete results ── */
.ss-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
  z-index: 10001;
  overflow: hidden;
}

.ss-ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: #111;
  transition: background .12s;
  border-bottom: 1px solid #f0f0f0;
}

.ss-ac-item:last-child {
  border-bottom: none;
}

.ss-ac-item:hover,
.ss-ac-item.ss-ac-active {
  background: #f7f7f7;
}

.ss-ac-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.ss-ac-img--placeholder {
  background: #eee;
}

.ss-ac-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ss-ac-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111;
}

.ss-ac-price {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* ── Account dropdown ── */
.ss-account-drop {
  min-width: 160px;
  padding: 6px 0;
}

.ss-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s;
}

.ss-drop-item:hover {
  background: #f5f5f5;
  color: #111;
}

.ss-drop-item--logout {
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
  color: #888;
}

.ss-drop-item--logout:hover {
  color: #c0392b;
  background: #fff5f5;
}
