/* Language Selector específico para evitar conflictos */
.wt-topbar-right .language-selector {
    position: relative;
    display: inline-block;    
    vertical-align: middle;
       z-index: 99999; /* Agregar z-index alto */
}

.wt-topbar-right .selected-option {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
        z-index: 99999; /* Agregar z-index alto */
}

.wt-topbar-right .selected-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wt-topbar-right .country-flag {
    width: 18px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
    object-fit: cover;
}

.wt-topbar-right .selected-option .arrow {
    margin-left: 8px;
    font-size: 12px !important;
    transition: transform 0.3s ease;
}

.wt-topbar-right .language-selector.open .arrow {
    transform: rotate(180deg);
}

.wt-topbar-right .options-container {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: white;
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 999999; /* Z-index muy alto para estar por encima de todo */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    margin-top: 2px;
}

.wt-topbar-right .language-selector.open .options-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wt-topbar-right .option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #333;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.wt-topbar-right .option:hover {
    background: #007bff;
    color: white;
}

.wt-topbar-right .option.active {
    color: 0;
    font-weight: bold;
}

.wt-topbar-right .option:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* Hide email on mobile, show phone/WhatsApp instead */
@media (max-width: 480px) {
    .nav-email-icon {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    
    .wt-topbar-right .selected-option {
        padding: 4px 8px;
    }
    
    .wt-topbar-right .country-flag {
        width: 16px;
        height: 10px;
    }
}

.top-bar {
    z-index: 1002 !important;
}

/* Nueva clase .container-header similar a la .container de Bootstrap */
.container-header {
  /* width: 100%; */
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
  text-align: center; /* Center the content */
}

@media (min-width: 576px) {
  .container-header {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container-header {
    max-width: 600px;
  }
 
  .header-style-4 .wt-topbar-left {
       display: none !important;
  }
  .header-style-4 .wt-topbar-right {
       display: block !important;
  }
}

@media (min-width: 992px) {
  .container-header {
    max-width: 800px;
  }
  .header-style-4 .wt-topbar-left {
       display: none !important;
  }
  .header-style-4 .wt-topbar-right {
       display: block !important;
  }
}

@media (min-width: 1200px) {
  .container-header {
    max-width: 1120px;
  }
  .header-style-4 .wt-topbar-left {
       display: none !important;
  }
  .header-style-4 .wt-topbar-right {
       display: block !important;
  }
}

@media (min-width: 1600px) {
  .container-header {
    max-width: 1400px;
  }
  .header-style-4 .wt-topbar-left {
       display: block !important;
  }
  .header-style-4 .wt-topbar-right {
       display: block !important;
  }
}

/* Deshabilitar comportamiento sticky pero mantener estilos */
.sticky-header.main-bar-wraper {
    position: relative !important;
}

.sticky-header.main-bar-wraper.sticky-wrapper,
.sticky-header.main-bar-wraper.stuck {
    position: relative !important;
}

.is-fixed .main-bar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
}
/* Barra de búsqueda flotante */
.floating-search-bar {
    position: fixed;
    top: 235px;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: top 0.3s ease;
}

.floating-search-bar.home-page { top: 135px !important; }
.floating-search-bar.product-detail-page { top: 235px !important; }
.floating-search-bar.scrolled { top: 0 !important; }
.floating-search-bar.home-page.scrolled { top: 0 !important; }

.floating-search-bar .search-container {
    position: relative;
    width: 35%;
    max-width: 800px;
    min-width: 300px;
}

.floating-search-bar .search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(5px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.floating-search-bar .search-input:focus {
    border-color: #00C24F;
    box-shadow: 0 0 0 3px rgba(0, 194, 79, 0.1);
}

.floating-search-bar .search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.floating-search-bar .search-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.05);
}

.floating-search-bar .search-button i { font-size: 13px; }

@media (max-width: 992px) {
    .floating-search-bar { top: 195px; }
    .floating-search-bar.home-page { top: 120px !important; }
    .floating-search-bar.scrolled { top: 0 !important; }
    .floating-search-bar.home-page.scrolled { top: 0 !important; }
    .floating-search-bar .search-container { width: 70%; }
}

@media (max-width: 768px) {
    .floating-search-bar { top: 215px; z-index: 50; }
    .floating-search-bar.home-page { top: 155px !important; }
    .floating-search-bar.product-detail-page { top: 210px !important; }
    .floating-search-bar.scrolled { top: 0 !important; }
    .floating-search-bar.home-page.scrolled { top: 0 !important; }
    .floating-search-bar .search-container { width: 85%; min-width: unset; }
    .floating-search-bar .search-input { padding: 8px 36px 8px 12px; font-size: 13px; }
    .floating-search-bar .search-button { width: 28px; height: 28px; }
    .floating-search-bar .search-button i { font-size: 11px; }
    
    /* Asegurar que el menú móvil esté por encima del search-bar */
    .header-nav.navbar-collapse { z-index: 1000 !important; }
}

@media (max-width: 480px) {
    .floating-search-bar { top: 205px; }
    .floating-search-bar.home-page { top: 145px !important; }
    .floating-search-bar.product-detail-page { top: 210px !important; }
    .floating-search-bar.scrolled { top: 0 !important; }
    .floating-search-bar.home-page.scrolled { top: 0 !important; }
    .floating-search-bar .search-container { width: 90%; }
}
