/* =============================
   Header Modelos
   ============================= */

.header-modelos {
  position: relative;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Cuando se vuelve sticky (al hacer scroll) */
.header-modelos.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

/* Cuando llega al final de su contenedor (se queda estático) */
.header-modelos.sticky-end {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

.header-modelos {
  max-width: 100% !important;
  margin-top: 0px !important;
  background-color: #1D1D1C !important;
}

.header-modelos-container {
  max-width: 1200px;
  display: flex;
  align-items: center;
  margin: auto;
  gap: 32px;
  transition: all 0.3s ease;
}

/* ===== Nombre del Modelo ===== */
.header-modelo-nombre {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-modelo-nombre h1 {
  margin: 0;
  font-size: 18px;
  color: #E30614;
  font-weight: 600;
  white-space: nowrap;
}

/* Toggle button (solo visible en mobile) */
.header-modelo-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
}

.toggle-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  stroke: #FFFFFF;
}

.header-modelo-toggle.active .toggle-icon svg {
  transform: rotate(180deg);
}

/* ===== Navegación ===== */
.header-modelo-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  transition: all 0.3s ease;
}

.header-modelo-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
  flex: 1;
}

.header-modelo-menu .menu-item {
  position: relative;
}

.header-modelo-menu .menu-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 22.5px 26.5px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

  @media (min-width: 1300px) and (max-width: 1380px) {
  .header-modelo-menu .menu-item a  {
    padding: 20px;
  }
  .header-modelo-menu {
    max-width: 70%;
  }
}


.header-modelo-menu .menu-item a:hover {
  color: #E30614;
}

.header-modelo-menu .menu-item.active > a {
  border-bottom: 4px solid #E30614;
  border-radius: 0;
  color: white;
}

/* Flecha para items con submenu */
.header-modelo-menu .menu-item a .submenu-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.header-modelo-menu .menu-item a:hover .submenu-arrow {
  transform: rotate(180deg);
}

/* ===== Botones de Acción ===== */
.header-modelo-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-ficha {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: transparent;
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 0px;
}

.btn-cotizar {
  display: inline-block;
  padding: 9px 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border-radius: 0;
  white-space: nowrap;
}


.btn-ficha:hover {
  background: #E30614;
  color: white;
}

.btn-cotizar {
  background: #E30614;
  color: white;
  border: 2px solid #E30614;
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  transition: all 0.4s ease;
}

/* Mostrar botón Cotizar cuando se expande el header */
.header-modelos.expanded .btn-cotizar {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Botón Cotizar Mobile (solo visible en mobile) */
.btn-cotizar-mobile {
  display: none;
  padding: 11.5px 16px;
  background: #E30614;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid #E30614;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

@media(max-width: 1300px) {
  .btn-cotizar-mobile {
    padding: 10px 40px;
  }
}

.btn-cotizar-mobile:hover {
  background: #c00510;
  border-color: #c00510;
}


/* =============================
   RESPONSIVE: MOBILE
   ============================= */
@media (max-width: 1300px) {
  .header-modelos-container {
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    justify-content: space-between;
    align-items: center;
  }

  .header-modelo-nombre {
    flex: 0 1 auto;
    gap: 4px;
  }

  .header-modelo-nombre h1 {
    font-size: 18px;
    color: #E30614;
    font-weight: 600;
  }

  /* Mostrar toggle button */
  .header-modelo-toggle {
    display: flex;
  }

  /* Mostrar botón Cotizar Mobile */
  .btn-cotizar-mobile {
    display: inline-block;
  }

  /* Navegación: oculta por defecto, se muestra al hacer toggle */
  .header-modelo-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #eee;
  }

  .header-modelo-nav.active {
    display: flex;
  }

  .header-modelo-menu {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .header-modelo-menu .menu-item a {
    padding: 12px 16px;
    font-size: 16px;
  }

  .header-modelo-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-ficha {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  /* En mobile, OCULTAR el botón cotizar dentro del nav */
  .btn-cotizar {
    display: none !important;
  }

  /* Estados expandidos en mobile no cambian mucho */
  .header-modelos.expanded .header-modelos-container {
    padding: 12px 16px;
  }
}

/* Tablet ajustes */
@media (max-width: 768px) {
  .header-modelo-nombre h1 {
    font-size: 16px;
  }
}

/* =============================
   DROPDOWN (DESKTOP SUBMENU)
   ============================= */
.header-modelo-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: #FFFFFF;
  border-bottom: 2px solid #E30614;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.header-modelo-dropdown a {
  display: block !important;
  padding: 10px 14px !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  color: #1D1D1C !important;
  text-decoration: none !important;
  background: white !important;
}

.header-modelo-dropdown a:hover {
  background: rgba(227, 6, 20, 0.1);
  color: #E30614;
}

.menu-item:hover .header-modelo-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =============================
   MOBILE DRAWER
   ============================= */
.header-modelo-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 2000;
}

.header-modelo-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.header-modelo-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 90%;
  max-width: 380px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.header-modelo-drawer.is-open .header-modelo-panel {
  transform: translateX(0);
}

/* ===== Panel Head (Nombre del modelo + X) ===== */
.header-modelo-panel-head {
  background: #1D1D1C;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  min-height: 64px;
  flex-shrink: 0;
}

.header-modelo-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #E30614;
}

.header-modelo-panel-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-modelo-panel-close svg {
  display: block;
}

/* ===== Main Mobile Nav ===== */
.header-modelo-mnav {
  list-style: none;
  margin: 0;
  padding: 0;
  background: white;
}

.header-modelo-mnav li {
  border-bottom: 1px solid #eee;
}

.header-modelo-mitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}

.header-modelo-mitem a {
  font-size: 16px;
  font-weight: 600;
  color: #1D1D1C;
  text-decoration: none;
  flex: 1;
}

.header-modelo-mitem a.has-submenu {
  color: #E30614;
}

.header-modelo-mitem-arrow {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-modelo-msub {
  display: none;
}

/* ===== Subview (Mobile Submenu) ===== */
.header-modelo-subview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.header-modelo-drawer.show-sub .header-modelo-subview {
  transform: translateX(0);
}

/* Cabecera negra del subview (nombre del modelo + X) */
.header-modelo-subview-tophead {
  background: #1D1D1C;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  min-height: 64px;
  flex-shrink: 0;
}

.header-modelo-subview-tophead-title {
  font-size: 16px;
  font-weight: 700;
  color: #E30614;
}

.header-modelo-subview-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-modelo-subview-close svg {
  display: block;
}

/* Cabecera blanca del subview (botón volver + título submenú) */
.header-modelo-subview-head {
  background: #fff;
  color: #1D1D1C;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.header-modelo-subview-back {
  background: transparent;
  border: none;
  color: #E30614;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-modelo-subview-title {
  color: #E30614;
  font-weight: 600;
  text-transform: capitalize;
  font-size: 16px;
}

.header-modelo-subview-list {
  background: #fff;
  flex: 1;
  overflow-y: auto;
}

.header-modelo-subview-list a {
  display: block;
  padding: 20px 24px;
  color: #1D1D1C;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
}

.header-modelo-subview-list a:hover {
  background: #f5f5f5;
}

/* Ocultar drawer en desktop */
@media (min-width: 1300px) {
  .header-modelo-drawer {
    display: none;
  }
}

.header-modelos.expanded .header-modelos-container {
  max-width: 1300px;
}