/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================= BODY ================= */
body {
  font-family: 'Poppins', sans-serif;
  background: #0f0f0f;
  color: #fff;
  padding-top: 120px; /* Ajuste para evitar que el header tape el contenido */
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

header nav a:hover {
  color: #ffb703;
}

/* ===== HEADER MOBILE FIX ===== */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }

  header nav {
    justify-content: center;
    gap: 14px;
  }

  header nav a {
    font-size: .9rem;
  }

  body {
    padding-top: 120px; /* Ajuste para evitar que el header tape el contenido */
  }
}

/* ================= HERO ================= */
.hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1625943553852-781c6dd46faa') center/cover;
  filter: brightness(.45);
}

.hero-content {
  position: relative;
  text-align: center;
}

.hero h2 {
  font-size: 3.5rem;
}

/* ================= PRODUCTS ================= */
.products {
  padding: 100px 60px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  gap: 30px;
  justify-content: center;
  padding-bottom: 140px;
}

.card {
  background: #111;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .6);
}

.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .5s ease;
}

.card:hover img {
  transform: scale(1.08);
}

.card-body {
  padding: 20px;
}

.price {
  font-weight: 600;
  margin: 10px 0;
}

/* ================= BUTTONS ================= */
.btn {
  padding: 12px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  background: #ffb703;
  color: #000;
  font-weight: 500;
  margin-bottom: 8px;
  width: 100%;
  transition: transform .25s ease;
}

.btn.secondary {
  background: #222;
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
}

/* ================= MODAL ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #111;
  border-radius: 20px;
  width: 90%;
  max-width: 820px;
  display: flex;
  gap: 20px;
  padding: 25px;
  position: relative;
}

.modal-content img {
  width: 45%;
  border-radius: 15px;
  object-fit: cover;
}

.modal-info {
  flex: 1;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content img {
    width: 100%;
    height: 220px;
    object-fit: cover;
  }
}

/* ================= CART ================= */
.cart-drawer {
  display: flex;
  flex-direction: column;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #222;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-actions button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #222;
  color: #fff;
}

.cart-subtotal {
  grid-column: span 2;
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-top: 6px;
}

/* ===== MOBILE CART ===== */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-actions {
    justify-content: space-between;
  }

  .cart-actions button {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
}

/* ================= MOBILE PRODUCTS ================= */
@media (max-width: 600px) {
  .products {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 20px 16px 220px;
  }

  .card img {
    height: 170px;
  }

  .card-body {
    padding: 16px;
    gap: 10px;
  }

  .card h3 {
    font-size: 1rem;
  }
}

/* ================= FOOTER ================= */
footer {
  padding: 40px;
  text-align: center;
  background: #000;
  font-size: .9rem;
  opacity: .6;
}

/* ===== CART NOTES ================= */
.cart-notes {
  margin-top: 20px;
}

.cart-notes textarea {
  width: 100%;
  background: #161616;
  border: 1.5px dashed #ffb703;
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  resize: none;
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}

.cart-notes textarea::placeholder {
  color: #bbb;
  font-style: italic;
}

/* ===== NOTA COCINA – FIX DEFINITIVO ===== */
.cart-drawer textarea {
  margin-top: 22px !important;
  margin-bottom: 26px !important;
  background: #161616 !important;
  border: 2px dashed #ffb703 !important;
  border-radius: 14px !important;
  padding: 14px !important;
  color: #fff !important;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
}

.cart-drawer textarea::placeholder {
  color: #bbb;
  font-style: italic;
}

/* ===== EXTRAS & BEBIDAS – ESTADO SELECCIONADO ===== */

/* BASE */
.extra,
.selector,
.drink-card {
  border: 1.5px solid #333;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  cursor: pointer;
  transition: all .25s ease;
  background: #111;
}

/* HOVER */
.extra:hover,
.drink-card:hover {
  border-color: #666;
}

/* ACTIVO (SELECCIONADO) */
.extra.active,
.drink-card.active,
.selector.active {
  border-color: #ffb703;
  background: rgba(255, 183, 3, .12);
  box-shadow: 0 0 0 2px rgba(255, 183, 3, .15);
}

/* CHECK VISUAL EXTRAS */
.extra.active::after {
  content: "✔";
  float: right;
  color: #ffb703;
  font-size: .9rem;
}

/* BEBIDAS */
.drink-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.drink-card p {
  text-align: center;
  margin-top: 6px;
  font-size: .9rem;
}

/* BEBIDA SELECCIONADA – MÁS CLARA */
.drink-card.active {
  transform: scale(1.03);
}

/* SELECTOR BEBIDA */
.selector {
  opacity: .9;
}

.selector.active {
  font-weight: 600;
}

/* ===== AJUSTE TAMAÑO EXTRAS & BEBIDAS ===== */

/* EXTRAS Y SELECTOR MÁS PEQUEÑOS */
.extra,
.selector {
  padding: 8px 10px !important;
  font-size: 0.85rem;
  border-radius: 10px;
}

/* DRINK CARD COMPACTA */
.drink-card {
  padding: 8px !important;
  border-radius: 12px;
}

/* IMAGEN BEBIDA MÁS CUADRADA / VERTICAL */
.drink-card img {
  height: 120px !important;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}

/* TEXTO BEBIDA */
.drink-card p {
  font-size: 0.8rem;
  margin-top: 6px;
  line-height: 1.2;
}

/* CHECK MÁS DISCRETO */
.extra.active::after {
  font-size: 0.75rem;
}

/* ===== DRINK CARD ADAPTATIVO ===== */
.drink-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px;
  background: #111;
  border-radius: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
}

/* Imagen que se ve completa */
.drink-card img {
  width: 100%;
  height: auto;          /* altura automática según la imagen */
  object-fit: contain;    /* ajusta la imagen completa */
  border-radius: 10px;
  background: #111;       /* relleno para espacios vacíos */
}

/* Texto debajo de la imagen */
.drink-card p {
  margin-top: 6px;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.2;
  word-break: break-word;
}

/* Efecto al seleccionar la bebida */
.drink-card.active {
  border: 2px solid #ffb703;
  box-shadow: 0 8px 18px rgba(255, 183, 3, 0.35);
  transform: scale(1.03);
}

.selector {
  position: relative;
  padding-right: 24px; /* espacio para la X */
  cursor: pointer;
  user-select: none;
}

.selector .remove-drink {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #ff4d4d;
  cursor: pointer;
}
