body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: url("/assets/images/banner3.jpg") center/cover no-repeat fixed;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}

/* MENU CONTAINER */
.menu-container {
  max-width: 1200px;
  margin: 80px auto;
  padding: 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-bar {
  padding: 20px;
  text-align: center;
}

/* CATEGORÍAS */
.categories {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 20px;
}

.category-name {
  font-weight: bold;
  font-size: 24px;
  text-align: center;
}

.category-item {
  flex: 0 0 auto;
  text-align: center;
  color: #b91c1c;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  padding: 10px;
  border-radius: 10px;
}

.category-item:hover {
  background: rgba(185, 28, 28, 0.1);
  transform: scale(1.1);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: #fbeaea; /* un rojo muy clarito */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 5px auto;
  font-size: 24px;
  color: #b91c1c;
}

/* PRODUCTOS */
.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-info {
  flex: 1;
}

.product-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 5px;
  color: #222;
}

.product-price {
  color: #e63946;
  font-weight: bold;
  font-size: 16px;
}

.product-tax {
  font-size: 12px;
  color: #777;
}

.product-desc {
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
}

.product-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  user-select: none;
  margin: 3px;
}

/* Ocultar input */
.option-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Cuando está checked, cambia todo el label */
.option-chip input:checked + span {
  background-color: #b91c1c;
  color: white;
  border-color: #b91c1c;
}

/* Para que el texto esté dentro de un span */
.option-chip span {
  display: inline-block;
  pointer-events: none;
  min-width: 50px; /* para que todos tengan el mismo tamaño mínimo */
  text-align: center;
  padding: 6px 12px;
  border-radius: 10px;
}

/* Hover */
.option-chip:hover span {
  background-color: #e2e6ea;
}

.cart-container {
  margin-left: 15px;
}
#cartBtn {
  font-size: 1.2rem;
}

/* Overlay del carrito */
.cart-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: flex-end;
  z-index: 1050;
}

.cart-overlay.active {
  display: flex;
}

/* Sidebar del carrito */
.cart-sidebar {
  background: #fff;
  width: 350px;
  max-width: 90%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 10px;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 10px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: bold;
  margin: 0;
}

.cart-item-sub {
  font-size: 13px;
  color: #555;
}

.cart-footer {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* Switch */

.switch-wrapper {
  position: relative;
  width: 100%;
  margin-top: 5px; /* separa del label */
}

.switch-wrapper input {
  display: none;
}

.switch-label {
  display: flex;
  position: relative;
  background-color: #ddd;
  border-radius: 30px;
  cursor: pointer;
  user-select: none;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
}

.switch-option {
  flex: 1;
  text-align: center;
  z-index: 2;
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.switch-toggle {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 50%; /* mitad del switch */
  height: 30px;
  background-color: #b91c1c;
  border-radius: 30px;
  transition: 0.3s;
  z-index: 1;
}

/* cambiar posición del toggle al activar */
.switch-wrapper input:checked + .switch-label .switch-toggle {
  transform: translateX(95%); /* ancho del toggle */
}

/* cambiar color del texto activo */
.switch-wrapper input:checked + .switch-label .switch-right {
  color: white;
}
.switch-wrapper input:not(:checked) + .switch-label .switch-left {
  color: white;
}
