.site-header {
  background: #fff;
  border-bottom: 1px solid #dee0e3;
  font-family: "Inter", sans-serif;
  min-height: 150px;
  height: auto;
}


.header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  gap: 15px 20px;
  padding: 15px 5vw;
  min-height: 100%;
  max-width: none;
}

.site-logo {
  margin-right: 10px;
  flex-shrink: 0;
}

.site-logo img {
  height: 100px;
  display: block;
  aspect-ratio: 6 / 5;
}

/* Campo de búsqueda */
.header-search-container {
  flex: 1 1 300px;
  max-width: 500px;
  min-width: 250px;
  position: relative;
  margin-right: 0;
}

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

.header-search-form .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

#header-search-input {
  width: 100%;
  height: 44px;
  padding: 10px 15px 10px 45px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

#header-search-input:focus {
  outline: none;
  border-color: #303b92;
  background: #fff;
  box-shadow: 0 2px 8px rgba(48, 59, 146, 0.1);
}

#header-search-input::placeholder {
  color: #999;
}

/* Resultados de búsqueda autocomplete */
.header-search-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results-list {
  padding: 8px 0;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f9f9f9;
}

.result-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-image .no-image {
  font-size: 11px;
  color: #999;
  text-align: center;
}

.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-title {
  font-weight: 600;
  font-size: 14px;
  color: #303b92;
  line-height: 1.3;
}

.result-sku {
  font-size: 12px;
  color: #666;
}

.result-price {
  font-size: 13px;
  font-weight: 600;
  color: #e30d13;
  margin-top: 2px;
}

.search-loading,
.search-no-results,
.search-error {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-menu li::before,
.header-menu li::marker {
  display: none;
  content: none;
}

.header-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-menu .sub-menu li {
  list-style: none;
}

.header-menu a,
.menu-link {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0;
  color: var(--secondary-normal, #666);
  text-decoration: none;
  transition: color 0.3s ease;
}

.header-menu a:hover,
.menu-link:hover {
  color: #000000;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 10px;
  flex-shrink: 0;         /* evita que se comprima */
  min-width: max-content; /* asegura que nunca se corten */
}

.header-icons img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-icons img:hover {
  transform: scale(1.15);
  opacity: 0.8;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  width: 50px;
}

  .cart-mobile, .menu-close, .wp-mobile{
    display: none;
  }

@media (max-width: 768px) {
  .site-header {
    height: auto;
    position: static;
  }

  .header-container {
    padding: 10px 5vw;
    height: auto;
    max-width: none;
    display: grid;
    grid-template-areas: 'logo . menu-toggle'
                         'search search search'
                         'contact . cart';
    grid-template-columns: 0.5fr 2fr 0.5fr;
    gap: 0.5rem;
  }

  .site-logo img {
    height: 50px;
    grid-area: logo;
  }

  .header-search-container {
    order: 2;
    width: 100%;
    max-width: none;
    margin-top: 10px;
    margin-right: 0;
    grid-area: search;
    padding: 0 1.5rem;
  }

  #header-search-input {
    height: 50px;
    font-size: 13px;
  }

  .menu-toggle {
    display: block;
    font-size: 26px;
    order: 3;
    background-color: #303b92;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    grid-area: menu-toggle;
    justify-self: end;
  }

  .menu-toggle:hover,
  .menu-toggle:focus,
  .menu-toggle:active {
    background-color: #303b92;
    transform: scale(0.95);
  }

  .menu-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 5vw;
    font-size: 32px;
    background-color: #303b92;
    color: #fff;
    border: none;
    padding: 3px 12px;
    border-radius: 6px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    z-index: 1000;
    line-height: 1;
    width: 50px;
  }

  .menu-close:hover,
  .menu-close:focus,
  .menu-close:active {
    background-color: #303b92;
    transform: scale(0.95);
  }

  .site-navigation {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8rem 1rem 2rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 999;
    min-height: auto;
    margin-left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .site-navigation.active {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  .site-navigation.active .menu-close {
    display: block;
  }

  .site-navigation .header-menu {
    flex-direction: column;
    width: 100%;
  }

  .site-navigation .menu-link,
  .site-navigation .header-menu a {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 2rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #AAA;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    box-sizing: border-box;
  }

  .site-navigation .menu-link:hover,
  .site-navigation .header-menu a:hover {
    color: #000000;
  }

  .header-icons {
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
  }

  .header-icons img {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cart-mobile{
    display: flex;
    grid-area: cart;
    width: 50px;
    height: auto;
    justify-self: end;
  }

  .wp-mobile{
    display: flex;
    grid-area: contact;
    width: 50px;
    height: auto;
    justify-content: center;
    align-items: center;
    width: 50px;
    aspect-ratio: 1 / 1;
    background-color: #34c759;
    color: #fff;
    border-radius: 50%;
  }

  .wp-mobile img{
    width: 24px;
    height: 24px;
  }

  body.admin-bar .site-navigation.active {
   top: 46px;
  }

}
