 {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

body {
  background: #ffffff;
  color: #222;
  padding-bottom: 80px;
}

/* ================= HEADER ================= */
.header {
  display: flex;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 12px;
}

.header-info h1 {
  font-size: 16px;
  font-weight: 600;
}

.rating {
  font-size: 12px;
  color: #666;
}

/* ================= SEARCH ================= */
.search-box {
  padding: 12px;
}

.search-box input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #f3f3f3;
  font-size: 14px;
  outline: none;
}

/* ================= CATEGORIES ================= */
.categories {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  overflow-x: auto;
}

.categories::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 8px 14px;
  background: #f3f3f3;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  background: #000;
  color: #fff;
}

/* ================= SECTIONS ================= */
.section {
  padding: 12px;
}

.section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ================= CAROUSEL ================= */
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  display: none;
}

/* ================= PRODUCT CARD ================= */
.product-card {
  display: flex;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px;
  min-width: 260px;
  scroll-snap-align: start;
}

.product-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 12px;
}

.product-info {
  flex: 1;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0;
}

.product-info p {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

/* ================= PRICE ================= */
.price {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price strong {
  font-size: 14px;
}

.price span {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

/* ================= BADGES ================= */
.badge {
  display: inline-block;
  background: #ffd200;
  color: #000;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

/* ================= CART BAR ================= */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  z-index: 100;
}

.cart-bar span {
  font-size: 14px;
}

.cart-bar button {
  background: #e60050;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.cart-bar button:disabled {
  background: #ccc;
}

/* ================= TABLET ================= */
@media (min-width: 600px) {
  .carousel .product-card {
    min-width: 45%;
  }
}

/* ================= DESKTOP ================= */
@media (min-width: 1024px) {
  body {
    max-width: 1100px;
    margin: auto;
  }

  .carousel .product-card {
    min-width: 30%;
  }
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  width: 92%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 16px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
}

.modal h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.modal-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.modal-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-price span {
  text-decoration: line-through;
  font-size: 13px;
  color: #999;
}

/* OPTIONS */
.option-group {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.option-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.options label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

/* UNITS */
.units {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 12px;
}

.counter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.counter button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f3f3f3;
  font-size: 18px;
}

/* NOTES */
.notes span {
  font-size: 14px;
}

.notes textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 10px;
  resize: none;
  font-size: 13px;
}

/* ADD BUTTON */
.add-btn {
  width: 100%;
  margin-top: 16px;
  background: #e60050;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
}

/* SLIDE UP ANIMATION */
.modal {
  animation: slideUp .25s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* CART ITEMS */
#cartItems {
  margin-top: 12px;
}

.cart-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.cart-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item small {
  font-size: 12px;
  color: #666;
  display: block;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.cart-item-actions button {
  border: none;
  background: none;
  color: #e60050;
  font-size: 12px;
  cursor: pointer;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin: 16px 0;
}

.store-status {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  margin-top: 4px;
}

.store-status.open {
  background: #e6f7f0;
  color: #0a8f5a;
}

.store-status.closed {
  background: #fdecea;
  color: #c62828;
}

.order-type {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.order-option {
  flex: 1;
  background: #f3f3f3;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

.order-option input {
  display: none;
}

.order-option:has(input:checked) {
  background: #ffe1e1;
  border: 2px solid #ff4d4d;
}
.delivery-method {
  margin: 16px 0;
}

.delivery-method h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f7f7;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
/* GRID PARA POSTRES (SIN CARRUSEL) */
.grid-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* mobile: una sola columna */
@media (max-width: 600px) {
  .grid-products {
    grid-template-columns: 1fr;
  }
}

.no-results {
  /*display: none;*/
  text-align: center;
  margin: 20px 0;
  /*font-weight: 600;*/
  color: #666;
}
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.product-card {
  transition: opacity .3s ease, transform .3s ease;
}

.product-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}