/* pages/index/index.css
 * Estilos específicos del home de Megafeast.
 * El CSS base vive en /css/main.css (inyectado por partials.js).
 */

/* ===========================
   Sección "Tu pedido / Delivery"
   =========================== */
.mf-order {
  padding-top: 0;
  padding-bottom: 3rem;
  scroll-margin-top: 80px;
}

.mf-order__wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* ---------- Banner de delivery ---------- */
.mf-order__banner {
  position: relative;
  background: linear-gradient(160deg, var(--mf-red) 0%, var(--mf-red-2) 100%);
  color: white;
  border-radius: 20px;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow: hidden;
}
.mf-order__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 110%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}

.mf-order__banner-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 1;
}

.mf-order__banner-title {
  font-family: var(--mf-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  z-index: 1;
}
.mf-order__banner-title em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.6);
  text-underline-offset: 4px;
}

.mf-order__banner-lead {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  z-index: 1;
}
.mf-order__banner-lead strong {
  color: white;
  font-weight: 700;
}

.mf-order__banner-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  z-index: 1;
}
.mf-order__banner-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}
.mf-order__banner-list li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Card del carrito ---------- */
.mf-order__cart {
  background: var(--mf-bg);
  border: 1px solid var(--mf-line);
  border-radius: 20px;
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mf-order__cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--mf-line);
  padding-bottom: 0.9rem;
}
.mf-order__cart-title {
  font-family: var(--mf-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--mf-ink);
  margin: 0;
}
.mf-order__cart-count {
  font-family: var(--mf-mono);
  font-size: 0.72rem;
  color: var(--mf-mute);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.mf-order__cart-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 60px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Estado vacío */
.mf-order__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0.5rem;
  gap: 0.5rem;
  color: var(--mf-ink-2);
}
.mf-order__empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mf-bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mf-mute);
  margin-bottom: 0.4rem;
}
.mf-order__empty-title {
  font-family: var(--mf-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--mf-ink);
  margin: 0;
}
.mf-order__empty-hint {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--mf-ink-2);
  margin: 0 0 0.8rem;
  max-width: 32ch;
}

/* Items */
.mf-order__item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.4rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.mf-order__item:hover {
  background: var(--mf-bg-3);
}

.mf-order__item-media {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--mf-bg-3);
  flex-shrink: 0;
}
.mf-order__item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-order__item-info {
  min-width: 0;
}
.mf-order__item-name {
  font-family: var(--mf-sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--mf-ink);
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}
.mf-order__item-meta {
  font-family: var(--mf-mono);
  font-size: 0.72rem;
  color: var(--mf-mute);
  margin: 0;
}

.mf-order__item-subtotal {
  font-family: var(--mf-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--mf-ink);
  white-space: nowrap;
}

.mf-order__item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  color: var(--mf-mute);
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mf-order__item-remove:hover {
  background: var(--mf-red-3, #ffe5e5);
  color: var(--mf-red);
}

/* Footer de la card */
.mf-order__cart-foot {
  border-top: 1px solid var(--mf-line);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mf-order__cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.mf-order__cart-total span {
  font-size: 0.9rem;
  color: var(--mf-ink-2);
}
.mf-order__cart-total strong {
  font-family: var(--mf-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--mf-ink);
  letter-spacing: -0.01em;
}

.mf-order__cart-actions {
  display: flex;
  gap: 0.6rem;
}
.mf-order__cart-actions .mf-order__btn {
  flex: 1;
  justify-content: center;
}

.mf-order__cart-fine {
  font-size: 0.75rem;
  color: var(--mf-mute);
  margin: 0;
  text-align: center;
}

/* Botones */
.mf-order__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mf-sans);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: 0;
}
.mf-order__btn--primary {
  background: var(--mf-red);
  color: white;
  box-shadow: 0 6px 14px rgba(255, 49, 49, 0.22);
}
.mf-order__btn--primary:hover {
  background: var(--mf-red-2);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255, 49, 49, 0.32);
}
.mf-order__btn--ghost {
  background: white;
  color: var(--mf-ink);
  border: 1px solid var(--mf-line);
}
.mf-order__btn--ghost:hover {
  border-color: var(--mf-red);
  color: var(--mf-red);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .mf-order__wrap {
    grid-template-columns: 1fr;
  }
  .mf-order__banner-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .mf-order__cart-item { grid-template-columns: 48px 1fr auto; }
  .mf-order__item-remove { grid-column: 1 / -1; justify-self: end; }
  .mf-order__cart-actions { flex-direction: column; }
}
