* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
}

/* --- Header Top Layout --- */
.header-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  background: #fff;
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, 0.15);
}

/* --- Logo --- */
.logo {
  max-height: 250px;
  padding-left: 10px;
}

.logo img {
  max-width: 180px;
}

/* --- Info Section --- */
.header-top .info {
  display: flex;
  align-items: center;
  gap: 35px;
  justify-content: space-around;
}

.header-top .one {
  display: flex;
  align-items: center;
}
/* --- Icon Links --- */
.icons {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
}

.icons a {
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  color: #475567;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  position: relative;
  display: inline-flex;
}

.icons a:hover {
  color: #80afd2;
}

.icons a svg {
  position: relative;
  width: 25px;
  height: 25px;
  margin-bottom: 4px;
  stroke: currentColor;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #475567;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
  line-height: 1;
  display: inline-block;
  min-width: 16px;
  text-align: center;
}

/* --- Header Bottom --- */
.header-bottom {
  background: #5f90b5;
  margin-top: 70px;
  display: flex;
  align-items: center;
  padding: 0 30px;
}

.logoIn {
  margin: 0;
  font-size: 0;
}

.logoIn img {
  max-width: 100px;
}

/* Departments Button */
.departments {
  background: #5f90b5;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* --- Phone Header --- */
.phoneHeader {
  display: flex;
  align-items: center;
  border: 1px solid #ffff;
  border-radius: 10px;
  padding: 8px 14px;
  gap: 10px;
  color: white;
}

.phoneHeader svg {
  stroke: #475567;
  width: 25px;
  height: 25px;
}

.phoneHeader .pheadOne span:first-child {
  font-size: 12px;
  color: white;
  display: block;
  line-height: 1;
}

.phoneHeader .pheadOne span:last-child {
  font-size: 14px;
  font-weight: bold;
  color: white;
  line-height: 1;
}

.deal {
  color: white;
  font-weight: 600;
  background: #5f90b5;
  border: none;
  border: 1px solid #ffff;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
}

.deal:hover,
.phoneHeader:hover {
  background: #80afd2;
}

/* --- Search Box --- */
.search {
  flex: 3.5;
  position: relative;
  width: 100%;
}

.search input {
  width: 100%;
  padding: 10px 12px 10px 12px;
  border: 1px solid #ccc;
  border-radius: 30px;
  font-size: 14px;
  box-sizing: border-box;
}

.search button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.search button svg {
  color: #475567;
}

/*lista de productos agregados*/
/* OVERLAY */
#carrito-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: flex-end;
    z-index: 9999;
}

/* PANEL */
#carrito-detalle {
    width: 380px;
    max-width: 100%;
    height: 100%;
    background: #ffffff;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.25);
    animation: slideIn 0.3s ease;
}

/* TITLE */
#carrito-detalle h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}

/* ITEMS LIST */
#carrito-items {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

/* ITEM */
#carrito-items li {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

/* IMAGE */
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

/* NAME */
.cart-item-name {
    line-height: 1.2;
}

/* QTY */
.cart-item-qty {
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

/* PRICE */
.cart-item-price {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 500;
}

/* REMOVE */
.remove-from-cart {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

/* TOTALS */
#carrito-total {
    margin-top: 12px;
    font-size: 14px;
}

#carrito-total div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

#carrito-total div:last-child {
    font-weight: bold;
    font-size: 16px;
}

/* BUTTONS */
.genBot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.genBot a {
  color: #fff;
}

.genBot a:hover {
  color: #f6f6f6;
}

.cartBot {
  background: #475567;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

/* ANIMATION */
@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* MOBILE */
@media (max-width: 600px) {
    #carrito-detalle {
        width: 100%;
    }

    #carrito-items li {
        grid-template-columns: 50px 1fr;
        grid-template-areas:
            "img name"
            "img qty"
            "img price";
        align-items: start;
    }

    .cart-item-img {
        grid-area: img;
        width: 50px;
        height: 50px;
    }

    .cart-item-name {
        grid-area: name;
    }

    .cart-item-qty {
        grid-area: qty;
        text-align: left;
    }

    .cart-item-price {
        grid-area: price;
        justify-content: space-between;
    }

    .genBot {
        grid-template-columns: 1fr;
    }
}






/* ===== Estilos móviles ===== */
@media (max-width: 768px) {
  .logo {
    order: 2;
    margin: 0 auto;
  }

  .logo img {
    max-width: 150px;
  }
  
  .info {
    order: 3;
  }

  .info .icons a span:not(.cart-count) {
    display: none;
  }

  .info .icons a {
    padding: 8px;
  }

  .header-top {
    justify-content: space-between;
    padding: 10px;
  }
}


/************************************
    MENÚ MÓVIL
************************************/
.menu-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    overflow-y: auto;
    transition: left 0.28s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    padding: 15px;
}

/* Mostrar menú lateral */
.menu-mobile.active {
    left: 0;
}

/* Estructura base */
.menu-mobile ul,
.menu-mobile li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-mobile > .menu-categorias {
    padding: 0;
    margin: 0;
}

/* Subniveles ocultos */
.menu-mobile .menu-categorias ul {
    display: none;
    padding-left: 15px;
    margin: 4px 0;
    border-left: 2px solid #f2f2f2;
}

/* Submenú visible */
.menu-mobile .menu-item.open > ul {
    display: block;
    animation: slideDown 0.25s ease;
}

/* Animación suave */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementos del menú */
.menu-mobile .menu-item {
    border-bottom: 1px solid #eee;
}

.menu-mobile .menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    color: #222;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}

.menu-mobile .menu-link a {
    flex: 1;
    color: inherit;
    text-decoration: none;
}

/* Botón de flecha (expandir/colapsar) */
.menu-mobile .submenu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #444;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==== Responsividad ==== */
@media (min-width: 992px) {
    .menu-toggle {
        display: none !important;
    }
    .menu-mobile {
        display: none !important;
    }
    .menu-desktop {
        display: flex !important;
    }
}

@media (max-width: 991px) {
    .menu-desktop {
        display: none !important;
    }
    .menu-mobile {
        display: block;
    }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        border: none;
        background: none;
        cursor: pointer;
        color: #222;
    }
}