body {
    background: #f7f7f7;
}

body.no-scroll {
    overflow: hidden;
}

.header {
  background-color: #8000ee;
  color: white;
}
.header a {
  color: white;
  text-decoration: none;
}
.header img {
    transition: transform 0.3s ease;
}
.header img:hover {
    transform: scale(1.05);
}

/* BARRA INFERIOR */
.nav-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
    z-index: 999;
}

.nav-bottom a {
    text-align: center;
    font-size: 10px;
    color: #888;
    text-decoration: none;
}

.nav-bottom a.active {
    color: #8000ee;
}

.center-absolute {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

/* OVERLAY */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: transparent; /* <-- clave */
    pointer-events: none; /* prevenimos clics mientras no haya vista */
    overflow: hidden;
}

.overlay-container {
    position: fixed; /* cambia de relative a fixed */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 1000; /* asegúrate de que esté sobre todo */
    overflow: hidden;
    pointer-events: none; /* previene clics hasta que una vista esté activa */
}

.view-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;          /* permite crecer si hay más contenido */
    max-height: 100%;           /* evita que se pase de cierto límite */
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease-in-out, opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    overflow-y: auto;           /* 👈 habilita scroll interno */
    -webkit-overflow-scrolling: touch; /* para scroll suave en iOS */
}

.view-slide.active {
    opacity: 1;
}
.view-slide.enter-from-right {
    transform: translateX(50%);
}
.view-slide.enter-from-left {
    transform: translateX(-50%);
}
.view-slide.enter-to-center {
    transform: translateX(0);
}
.view-slide.exit-to-right {
    transform: translateX(50%);
}
.view-slide.exit-to-left {
    transform: translateX(-50%);
}

/* CARRITO */
.cart-button {
    position: absolute;
    bottom: 30px; /* la mitad de la altura de .nav-bottom (60px) */
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #8000ee;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 15px;
}
.cart-counter-badge {
    position: absolute;
    top: -5px;
    left: 80%;
    transform: translateX(-50%);
    background-color: #ff3e68;
    color: white;
    border-radius: 9999px; /* Forma de cápsula */
    padding: 0.25em 0.5em; /* Más espacio horizontal */
    font-size: 0.75rem;
    min-width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* Centrado vertical perfecto */
    box-sizing: border-box;
    transition: all 0.2s ease; /* Animación suave para cambios de tamaño */
}

.cart-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 1);
    z-index: 2000;
    transition: transform 0.4s ease;
    transform: translateX(100%);
}

.cart-overlay.show {
    transform: translateX(0);
}

.cart-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.cart-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.1);
  }
}

.bounce-cart {
  animation: bounce 0.4s ease;
}

/* ZONAS DE ENTREGA */
#zone-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .zone-card {
    position: relative;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
  }

  .zone-card.selected {
    border-color: red;
    background-color: #fff4f4;
  }

  .zone-card .letter i.fa-check {
  color: red;
  font-weight: bold;
}

  .check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: red;
    display: none;
  }

  .zone-card.selected .check-icon {
    display: block;
  }

  #checkout-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    transition: background-color 0.3s;
  }

  #checkout-btn.enabled {
    cursor: pointer;
  }
  
/* CUENTA */
.account-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 1);
    z-index: 2000;
    transition: transform 0.4s ease;
    transform: translateX(100%);
}

.account-overlay.show {
    transform: translateX(0);
}

.account-overlay-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.account-overlay-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Control general de imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* BANNER PROMO */
.carousel-inner {
    aspect-ratio: 3 / 1; /* 1500px x 500px */
    max-width: 1500px;
    margin: auto;
}

.carousel-item img {
    width: 100%;
    max-width: 1500px;
    aspect-ratio: 3 / 1; /* 1500px / 500px */
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* CATEGORIAS */
.category-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 8px; /* espacio inferior para evitar corte */
}

.category-item {
  flex: 0 0 auto; /* evita que se expandan y ayuda al scroll horizontal */
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
  margin-right: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.category-item img {
  width: 64x;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.category-item .very-small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.category-item.active {
  border: 3px solid #8000ee;
}

.category-item.very-small {
    font-size: 10px;
}

/* Imágenes de productos destacados */
.card-img-top {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 15px 15px 0px 0px;
}

/* CARGAR ITEMS */
#loader {
    display: none;
    transition: opacity 0.3s ease;
}

.item-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.item-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* LOGIN */
.login-container {
  max-width: 350px;
  min-width: 350px;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-control {
  border-radius: 10px;
}

.btn-login {
  border-radius: 10px;
  font-weight: bold;
}

.text-links {
  text-align: center;
  margin-top: 15px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-img {
    width: 200px;
}

.footer-credits {
  text-align: center;
  color: #ffffff;
  margin-top: 30px;
  font-size: 14px;
}

.code-input {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.code-input input {
  width: 40px;
  height: 50px;
  text-align: center;
  font-size: 24px;
  border: 2px solid #ccc;
  border-radius: 8px;
  outline: none;
}

.code-input input:focus {
  border-color: #8000ee;
  box-shadow: none;
}

.btn-spinner {
    height: 24px;
    width: 24px;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* REGISTRO */
.register-container {
      max-width: 400px;
      margin: auto;
      background: #fff;
      padding: 30px;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .register-logo {
      font-size: 28px;
      font-weight: bold;
      text-align: center;
      margin-bottom: 20px;
      color: #007bff;
    }

/* ACCOUNT */
.cuenta-container {
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 20px;
    }
    .avatar {
      width: 120px;
      height: 120px;
      object-fit: cover;
      border-radius: 50%;
      border: 3px solid #ccc;
      margin-bottom: 15px;
    }

/* TOAST - MENSAJES */
#toastContainer {
    pointer-events: none;
}

/* Toast individual */
.custom-toast {
    max-width: 600px;
    width: calc(100% - 20px);
    margin: 10px auto;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0.5px solid rgba(255,255,255,0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: auto;
}

/* Animación de entrada */
.custom-toast.show {
    transform: translateY(1px);
    opacity: 1;
}

/* Temas */
.custom-toast.message { background-color: rgba(255, 255, 255, 0.9); color: #1c1c1e; }
.custom-toast.success { background-color: rgba(5, 229, 127, 0.9); color: #1c1c1e; }
.custom-toast.danger  { background-color: rgba(255, 62, 104, 0.9); color: white; }
.custom-toast.warning { background-color: rgba(255, 204, 0, 0.9); color: #1c1c1e; }
.custom-toast.info    { background-color: rgba(10, 132, 255, 0.9); color: white; }

/* Botón cerrar */
.custom-toast .btn-close {
    opacity: 0.8;
    margin-left: 15px;
    padding: 4px;
    background-size: 12px;
    color: black;
}

.custom-toast.warning .btn-close {
    filter: none;
    opacity: 0.6;
}

/* Texto */
.toast-message {
    flex-grow: 1;
    padding-right: 10px;
    line-height: 1.4;
}
