@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #F1EFEC;
    color: #333;
    padding-top: 0; 
    font-family: "Alegreya Sans SC", sans-serif;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #D4C9BE;
    background-color: #D4C9BE;
;
    position: fixed;
    width: 100%;
    z-index: 10;
    top: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    width: 40px;  
    height: 40px;
    z-index: 1001;
    overflow: visible; 
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: #333;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease; 
    transform-origin: center;
}

.menu-toggle .bar + .bar {
    margin-top: 4px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.logo {
    font-family: "Alegreya Sans SC", sans-serif;
    font-size: 38px;
    font-weight: normal;
    text-decoration: none;
    color: #333;
    letter-spacing: 1px;
}

.mobile-menu {
    display: block;   
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    background-color: #EAE3D2;
    border-top: 1px solid #e3e1db; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000; 
    padding: 0;

    opacity: 0;
    visibility: hidden;

    transition: top 0.2s, opacity 0.2s, visibility 0.2s;
    font-family: "Alegreya Sans SC", sans-serif;
}

.mobile-menu.open {
    top: 100%;
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu ul li a {
    display: block;
    padding: 15px 25px; 
    text-decoration: none;
    color: #333;
    border-bottom: none;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu ul li a:hover {
    background-color: #D4C9BE;
    color: #000;
}

.mobile-menu ul li:last-child a {
    border-bottom: none;
}

.has-submenu > .submenu {
    background-color: #F1EFEC !important;
}

.has-submenu > .submenu li a {
    background-color: #F1EFEC !important;
    color: #333 !important;
    display: block;
    padding: 12px 25px;
    text-decoration: none;
}

.has-submenu > .submenu li a:hover {
    background-color: #D4C9BE !important;
    color: #000 !important;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.header-search form {
    display: flex;
    border: 1px solid #4B352A;
    border-radius: 25px;
    overflow: hidden;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 15px; 
    border: 1px solid #F1EFEC;
    border-radius: 25px;
    font-size: 14px;
    font-family: "Alegreya Sans SC", sans-serif;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; 
}

.icono-lupa {
    width: 40px; 
    height: 40px;
    object-fit: contain;
}

input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.search-input::placeholder {
    font-family: "Alegreya Sans SC", sans-serif;
    color: #4B352A;
}

.search-button {
    font-family: "Josefin Sans", sans-serif;
    background-color: #4B352A;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ctnResultadosBusqueda{
    position: absolute;
    top: 100%;
    width: 100%;
    background-color: white;
}

.header-right {
    display: flex;
    align-items: center;
}

.icon-link, .cart-info {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    margin-left: 20px;
    cursor: pointer;
    position: relative;
}

.icon-link svg, .cart-info svg {
    width: 22px;
    height: 22px;
    stroke: #333;
}

.wishlist-icon .badge{
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: black;
    color: white;
    border-radius: 50%;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    min-width: 10px;
    text-align: center;
}

.cart-info .badge{
    position: absolute;
    top: -6px;
    left: 12px;
    background-color: black;
    color: white;
    border-radius: 50%;
    padding: 1px 5px;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    min-width: 10px;
    text-align: center;
}

.cart-total {
    font-size: 15px;
    margin-left: 8px;
    color: #333;
    font-family: "Alegreya Sans SC", sans-serif;
}

.overlay-cart {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay-cart.active {
    opacity: 1;
    visibility: visible;
}

.ctnResultadosBusqueda {
    display: none; 
    position: absolute;
    background: white;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
}

.ctnResultadosBusqueda a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.ctnResultadosBusqueda a:hover {
    background-color: #f5f5f5;
}

.ctnResultadosBusqueda img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ctnResultadosBusqueda .producto-info {
    display: flex;
    flex-direction: column;
}

.ctnResultadosBusqueda .producto-nombre {
    font-weight: 500;
    margin-bottom: 4px;
}

.ctnResultadosBusqueda .producto-precio {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) { 
    .header-search {
        display: none;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        padding: 15px;
    }
    .header-search {
        order: 3; 
        width: 100%;
        max-width: none;
        margin: 15px 0 0 0;
    }
    .header-left, .header-right {
        flex-basis: auto;
    }
    .logo {
        font-size: 30px;
        margin-left: auto; 
        margin-right: auto;
    }
    .menu-toggle + .logo {
        margin-left: 15px;
    }

    .header-right {
        margin-left: auto;
    }

    .icon-link, .cart-info {
        margin-left: 15px;
    }
}   

@media (max-width: 480px) {
    .menu-toggle {
        margin-right: 10px;
    }
    .logo {
        font-size: 24px;
    }
    .menu-toggle + .logo {
        margin-left: 10px;
    }
    .search-button {
        padding: 10px 15px;
        font-size: 12px;
    }
    .icon-link, .cart-info {
        margin-left: 10px;
    }
    .icon-link svg, .cart-info svg {
        width: 20px;
        height: 20px;
    }
    .cart-total {
        /* display: none; */
        font-size: 12px;
    }
    .mobile-menu ul li a {
        padding: 12px 20px;
        font-size: 15px;
    }
}
@media (max-width: 768px) {
    .site-header {
        margin-top: 0 !important;
    }
}
