/* ==================== ESTILOS GENERALES DEL HEADER ==================== */
.main-header {
  font-family: var(--font-main);
  position: relative;
  width: 100%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==================== BARRA SUPERIOR (CONTACTO + LOGIN) ==================== */
.top-bar {
  background-color: #ff6b00; /* Color naranja corporativo */
  color: white;
  padding: 8px 0;
  font-size: 13px;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-info {
  display: flex;
  gap: 20px;
}

.contact-item {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s;
}

.contact-item:hover {
  opacity: 0.8;
  color: white;
}

.contact-item i {
  font-size: 14px;
}

.user-actions {
  display: flex;
  align-items: center;
}

.login-btn {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s;
}

.login-btn:hover {
  opacity: 0.8;
  color: white;
}

.user-dropdown .dropdown-toggle {
  background: transparent;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  font-size: 13px;
}

.user-dropdown .dropdown-menu {
  border-radius: 5px;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.user-dropdown .dropdown-item {
  padding: 8px 15px;
  font-size: 13px;
}

.user-dropdown .dropdown-item i {
  margin-right: 8px;
  width: 18px;
  text-align: center;
}

/* ==================== BARRA PRINCIPAL (LOGO + BUSCADOR + ACCIONES) ==================== */
.main-nav {
  background-color: white;
  padding: 15px 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: auto;
  max-height: 85px;
  object-fit: contain;
}

.logo-text {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: #333;
  font-size: 20px;
  margin-left: 10px;
}

/* ==================== BUSCADOR ==================== */
.search-container {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-form {
  position: relative;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #ff6b00;
  border-radius: 30px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.search-input:focus {
  border-color: #e05d00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.search-button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #ff6b00;
  cursor: pointer;
  font-size: 16px;
}

/* Sugerencias de búsqueda */
.search-suggestions {
  position: absolute;
  background: white;
  width: 100%;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 2000; /* CORREGIDO */
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f1f1f1;
  font-size: 14px;
}

.suggestion-item:hover {
  background-color: #f8f8f8;
  color: #ff6b00;
}

/* ==================== ACCIONES (COTIZACIÓN) ==================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.action-item {
  position: relative;
}

.quote-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
  padding: 5px 10px;
  border-radius: 5px;
}

.quote-btn:hover {
  color: #ff6b00;
}

.action-count {
  position: absolute;
  top: -5px;
  right: 0;
  background: #ff6b00;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}

.action-text {
  font-size: 12px;
  margin-top: 3px;
}

/* Panel de cotización */
.quote-panel {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 350px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.quote-dropdown:hover .quote-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.quote-header {
  background: #2c3e50;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.quote-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-header h4 i {
  font-size: 18px;
}
.clear-quote {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.clear-quote:hover {
  background: rgba(255, 255, 255, 0.3);
}

.quote-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: #f9f9f9;
}

#quote-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#quote-list li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

#quote-list li:last-child {
  border-bottom: none;
}
#quote-list li:hover {
  background: #fafafa;
}

.empty-quote {
  padding: 20px;
  text-align: center;
  color: #888;
}

.empty-quote i {
  font-size: 30px;
  margin-bottom: 10px;
  color: #ddd;
}

.empty-quote p {
  margin: 0;
  font-size: 13px;
}

.quote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
}

.quote-info {
  flex: 1;
}

.quote-info h5 {
  margin: 0 0 5px 0;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-price {
  font-size: 13px;
  font-weight: 600;
  color: #ff6b00;
}

.remove-item {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  margin-left: 10px;
  transition: color 0.3s;
}

.remove-item:hover {
  color: #ff6b00;
}

.quote-footer {
  padding: 12px 15px;
  border-top: 1px solid #f1f1f1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-quote-btn,
.whatsapp-quote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
}

.view-quote-btn {
  background: #f8f8f8;
  color: #333;
}

.view-quote-btn:hover {
  background: #eee;
}

.whatsapp-quote-btn {
  background: #25d366;
  color: white;
}

.whatsapp-quote-btn:hover {
  background: #128c7e;
  color: white;
}

/* ==================== BOTÓN FLOTANTE DE WHATSAPP ==================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: translateY(-3px);
  color: white;
}

/* ==================== MEDIA QUERIES PARA RESPONSIVO ==================== */
@media (max-width: 992px) {
  .nav-content {
    flex-wrap: wrap;
  }

  .brand-logo {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .search-container {
    order: 3;
    flex: 100%;
    margin-top: 15px;
  }

  .quote-panel {
    right: -50px;
    width: 280px;
  }
}

@media (max-width: 768px) {
  .top-bar-content {
    flex-direction: column;
    gap: 8px;
  }

  .contact-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }

  .logo-text {
    display: none;
  }

  .quote-panel {
    position: fixed;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 25px;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 576px) {
  .quote-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 10px 10px 0 0;
    transform: translateY(100%);
    margin-top: 0;
  }

  .quote-dropdown:hover .quote-panel {
    transform: translateY(0);
  }

  .quote-body {
    max-height: 50vh;
  }

  .quote-footer {
    flex-direction: row;
  }

  .view-quote-btn,
  .whatsapp-quote-btn {
    flex: 1;
  }
}
