/* ===========================
   HEADER STYLES
   =========================== */

#message-top {
  width: 100%;
  height: 44px;
  background-color: #838383;
  font-weight: 500;
  font-family: "Roboto", Sans-serif;
}
#message-top * {
  text-decoration: none !important;
  color: #ffffff;
  line-height: 44px;
  font-size: 15px;
}
#message-top i,
.header-sticky i {
  margin-right: 5px;
}
.contact-info a {
  margin: 0 8px;
}
.header-sticky {
  width: 100%;
  background-color: #ffffff;
  color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
  margin-top: 0px;
  /* margin-bottom: 30px; */
  padding: 20px 15px;
}
.header-sticky.sticky {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  margin-bottom: 0px;
}
.header-logo {
  max-width: 250px;
  height: auto;
}
.whatsapp-button {
  background-color: #00bc10;
  color: #ffffff;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  display: none;
  justify-content: center;
  align-items: center;
  width: 155px;
  margin-right: 20px;
}
@media (min-width: 768px) {
  .whatsapp-button {
    display: flex;
  }
}
.whatsapp-button:hover {
  text-decoration: none !important;
  color: #ffffff;
}
.social-icon {
  background-color: rgb(1, 112, 185);
  margin-right: 10px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}
.social-icon * {
  color: #ffffff;
  font-size: 18px;
}
.social-icon i {
  margin-right: 0;
}

.sticky-right {
  width: 70%;
}
.sticky-right nav {
  width: 100%;
}

#menu-principal-container {
  padding-right: 20px;
  margin-top: 10px;
}

#menu-principal {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
  margin-top: 5px;
  display: flex;
}
#menu-principal li {
  padding: 10px 0;
  position: relative;
}
#menu-principal li a {
  font-size: 15px;
  font-family: "Roboto", Sans-serif;
  color: #000000;
  font-weight: 400;
  padding: 0 10px;
}
#menu-principal li a > i {
  margin-left: 5px;
}
#menu-principal li a:hover {
  color: #0170b9;
  text-decoration: none;
}
#menu-principal > li > ul {
  display: none;
}
#menu-principal > li:hover > ul {
  display: block;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  border-radius: 5px;
  width: 100%;
  z-index: 999;
}
#menu-principal > li:hover > ul > li {
  padding: 10px 10px;
}
#menu-principal > li:hover > ul > li:hover {
  background-color: #55595c;
}
#menu-principal > li:hover > ul > li > a {
  color: #0170b9;
}
#menu-principal > li:hover > ul > li:hover > a {
  color: #ffffff;
  text-decoration: none;
}
.menu-search {
  margin-top: 10px;
  font-family: "Roboto", Sans-serif;
  font-weight: 400;
  font-size: 17px;
}
.menu-search span {
  font-size: 15px;
}
.menu-products {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  #message-top {
    height: auto;
    text-align: center;
    padding: 10px 0;
  }
  #message-top .message {
    padding-bottom: 15px;
  }
  #message-top * {
    line-height: normal;
    font-size: 0.875rem;
  }
  .contact-info {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  .contact-info * {
    text-decoration: none !important;
    color: #ffffff;
    line-height: 150% !important;
  }
  .contact-info a {
    font-size: 0.875rem !important;
    margin: 1px;
    display: flex;
    gap: 4px;
    align-items: center;
  }
  .header-logo {
    max-width: 80%;
  }
  .header-sticky {
    padding: 10px 5px;
  }
  .header-sticky.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    margin-bottom: 0px;
    padding: 10px 5px;
    width: 100%;
    right: 0;
  }
  .header-sticky .container {
    padding: 0;
  }
  .social-icon {
    width: 25px;
    height: 25px;
    margin-right: 5px;
  }
  .social-icon i {
    font-size: 16px;
  }
  .sticky-right {
    width: 40%;
    padding-top: 10px;
  }
  .header-sticky .sticky-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .header-sticky .sticky-right .mobile-menu-container {
    margin-bottom: 6px;
  }
  .menu-search {
    margin-top: 20px;
    margin-left: 20px;
  }
  .menu-mobile {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0 5px;
    text-align: center;
    margin-top: 30px;
  }
  .mobile-menu-container {
    display: flex;
    margin-right: 20px;
  }
  #menu-principal {
    display: none;
  }
  #menu-mobile-button i {
    margin-right: 0;
  }
  #menu-principal-container {
    position: relative;
  }
  @keyframes hide-scroll {
    0%,
    to {
      overflow: hidden;
    }
  }
  #menu-principal {
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #ffffff;
    width: 100vw;
    display: flex !important;
    flex-direction: column;
    padding: 10px;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    transform-origin: top;
    max-height: calc(100vh - 150px);
    justify-content: flex-start;
    gap: 10px;
  }
  #menu-principal.show {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  #menu-principal > li > a {
    display: flex;
    padding: 0 40px;
  }
  #menu-principal li a {
    font-size: 13px;
    color: #000;
  }
  #menu-principal > li > ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f5f5f5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    transform-origin: top;
    width: 100%;
    max-height: auto;
    overflow: visible;
    z-index: 10000;
  }
  #menu-principal > li.active > ul {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
    position: relative;
  }
  #menu-principal > li > ul > li {
    padding: 5px 40px;
    margin-left: 0;
  }
  #menu-principal > li > ul > li > a {
    color: #000;
    padding: 0;
    font-size: 13px;
    display: block;
  }
  #menu-principal > li > ul > li:hover {
    background-color: #e8e8e8;
  }
  #menu-principal > li > ul > li:hover > a {
    color: #000;
    text-decoration: none;
  }
  #menu-principal > li:hover > ul > li {
    padding: 10px 40px;
  }
}

/* Sticky left layout */
.sticky-left {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-search {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.menu-products {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.search-productos-container {
  position: relative;
  display: flex;
  align-items: center;
}

#search-productos-input {
  border-radius: 20px !important;
}

.search-productos-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 20px !important;
  font-size: 14px;
  width: 200px;
  font-family: "Roboto", sans-serif;
}

.search-productos-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.search-productos-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px 10px;
  margin-left: -35px;
  font-size: 14px;
  z-index: 1;
  position: relative;
  border-radius: 50%;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.search-productos-btn:hover {
  color: #0066cc;
  background-color: #f1f6fb;
}

.search-productos-loader {
  padding: 20px;
  text-align: center;
  border-bottom: none !important;
  display: none;
}

.search-productos-loader.show {
  display: block;
}

.search-productos-loader::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.search-results-count {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background-color: #f8fafc;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 2;
}

.search-productos-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 20px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.search-productos-results.hidden {
  display: none;
}

.search-result-item {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

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

.search-results-item-list {
  flex: 1;
  overflow-y: auto;
}

.result-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

.result-link:hover {
  background-color: #f5f5f5;
  color: #0066cc;
}

.result-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 2px;
}

.result-title {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
}

.no-results {
  padding: 10px 12px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.search-results-all {
  border-top: 1px solid #eee;
  background-color: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
}

.search-results-all-link {
  display: block;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
}

.search-results-all-link:hover {
  background-color: #f5f5f5;
  color: #004f9a;
}

/* Desktop: Hide mobile menu */
@media (min-width: 768px) {
  .mobile-menu-container {
    display: none !important;
  }
}

/* Mobile responsive search */
@media (max-width: 768px) {
  .search-productos-container {
    display: none;
  }
}
