/* Oferta Submenu Sidebar — shared by product cards that do not load style.css */
.oferta-submenu {
  position: fixed;
  top: 72px;
  left: 0;
  width: 160px;
  background: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  padding: 14px 0;
  z-index: 30;
  height: calc(100vh - 72px - 250px);
  max-height: calc(100vh - 72px - 250px);
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
}

.oferta-submenu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.oferta-submenu li {
  margin: 0;
  padding: 0;
}

.oferta-submenu a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.oferta-submenu a:hover {
  background: #f9fafb;
  color: #2563eb;
}

.oferta-submenu a.active {
  background: #dbeafe;
  color: #1e40af;
  border-left-color: #3b82f6;
}

.oferta-submenu-models {
  list-style: none;
  padding: 0;
  margin: 0;
}

.oferta-submenu .oferta-submenu-model {
  display: block;
  padding: 8px 14px 8px 28px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.oferta-submenu .oferta-submenu-model:hover {
  background: #f9fafb;
  color: #2563eb;
}

.oferta-submenu .oferta-submenu-model.active {
  background: #dbeafe;
  color: #1e40af;
  border-left-color: #3b82f6;
}

body.has-oferta-menu main {
  margin-left: 160px;
}

body.gx165-body.has-oferta-menu .oferta-submenu {
  top: var(--gx-header-h, 4rem);
  height: calc(100vh - var(--gx-header-h, 4rem) - 250px);
  max-height: calc(100vh - var(--gx-header-h, 4rem) - 250px);
}

@media (max-width: 1024px) {
  .oferta-submenu {
    width: 150px;
  }

  body.has-oferta-menu main {
    margin-left: 150px;
  }
}

@media (max-width: 768px) {
  .oferta-submenu {
    position: relative;
    top: 0;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 12px 0;
    overflow-x: auto;
    overflow-y: visible;
  }

  .oferta-submenu ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 16px;
  }

  .oferta-submenu li {
    flex-shrink: 0;
  }

  .oferta-submenu a {
    padding: 10px 16px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .oferta-submenu a.active {
    border-left: none;
    border-bottom-color: #2563eb;
  }

  .oferta-submenu .oferta-submenu-models {
    padding: 0;
  }

  .oferta-submenu .oferta-submenu-model {
    padding: 8px 16px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .oferta-submenu .oferta-submenu-model.active {
    border-left: none;
    border-bottom-color: #2563eb;
  }

  body.has-oferta-menu main {
    margin-left: 0;
  }

  body.gx165-body.has-oferta-menu .oferta-submenu {
    top: 0;
    height: auto;
    max-height: none;
  }
}

/* Mobile brand/model selector — replaces the sidebar below 768px */
.brand-switch {
  display: none;
}

@media (max-width: 768px) {
  body.has-brand-switch .oferta-submenu {
    display: none;
  }

  .brand-switch {
    display: block;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .brand-switch,
  .brand-switch * {
    box-sizing: border-box;
  }

  .brand-switch-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
  }

  .brand-switch-summary::-webkit-details-marker {
    display: none;
  }

  .brand-switch-summary::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-right: 3px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
  }

  .brand-switch[open] .brand-switch-summary::after {
    transform: rotate(-135deg);
  }

  .brand-switch-current {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .brand-switch-list {
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
  }

  .brand-switch-list--brands {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 8px;
  }

  .brand-switch-item {
    display: block;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    border-left: 3px solid transparent;
    overflow-wrap: anywhere;
  }

  .brand-switch-item.active {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
  }
}
