/* =============================================
   CUSTOM STYLES — Catering Website (PizzaTwist Red Theme)
   ============================================= */

:root {
  --brand-red: #ff3d00;
  --brand-yellow: #fff200;
  --brand-green: #00a651;
  --brand-red-dark: #e63600;
  --brand-red-light: #fff5f2;
}

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- GRID LAYOUT (desktop: 2 columns) ---- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- VEG / NON-VEG BADGES ---- */
.veg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 4px;
  padding: 2px 6px;
}
.nonveg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 4px;
  padding: 2px 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ---- FOOD IMAGE WRAPPER ---- */
.food-img-wrap {
  flex-shrink: 0;
}

/* ---- NO SCROLLBAR ---- */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar { display: none; }

* { font-family: 'Inter', sans-serif; box-sizing: border-box; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 4px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* ---- CATEGORY BAR ---- */
.cat-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.cat-btn:hover { color: var(--brand-red); border-color: #fee2e2; background: var(--brand-red-light); }
.cat-btn.active {
  color: var(--brand-red);
  background: var(--brand-red-light);
  border-color: var(--brand-red);
}

/* ---- FOOD CARD ---- */
.food-card {
  display: flex;
  align-items: flex-start;
  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.food-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.food-img {
  width: 120px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}
.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ---- BUTTONS ---- */
.add-btn {
  background: white;
  color: #16a34a;
  border: 1.5px solid #16a34a;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
}
.add-btn:hover { background: #16a34a; color: white; }
.add-btn.added-pulse {
  background: #16a34a;
  color: white;
  transform: scale(1.08);
}

.customize-btn {
  background: white;
  color: var(--brand-red);
  border: 1.5px solid var(--brand-red);
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.customize-btn:hover { background: var(--brand-red); color: white; }

/* ---- CART SIDEBAR ---- */
.cart-box {
  background: white;
  border-radius: 16px;
  position: sticky;
  top: 130px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}
.cart-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}
.cart-item-row:last-child { border-bottom: none; }

/* ---- QTY CONTROLS ---- */
.qty-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff7ed;
  border-radius: 8px;
  padding: 4px 8px;
}
.qty-mini-btn {
  color: var(--brand-red);
  font-size: 1.1rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.qty-mini-btn:hover { color: var(--brand-red-dark); background: var(--brand-red-light); border-radius: 4px; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 14px;
  width: fit-content;
}
.qty-btn {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-red);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover { color: var(--brand-red-dark); }

/* ---- COUPON ---- */
.coupon-input {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.coupon-input:focus { border-color: var(--brand-red); }

.btn-apply {
  background: #1f2937;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-apply:hover { background: #111827; }

/* ---- CHECKOUT BUTTON ---- */
.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: white;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.checkout-btn:hover { opacity: 0.93; transform: translateY(-1px); }
.checkout-btn:active { transform: translateY(0); }

/* ---- MODIFIER MODAL / BOTTOM SHEET ---- */
#modifierModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center; /* Center horizontally for desktop */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#modifierModal.open {
  opacity: 1;
  pointer-events: all;
}
#modifierSheet {
  background: white;
  width: 100%;
  max-width: 500px; /* Limit width on desktop */
  border-radius: 24px 24px 0 0;
  padding: 24px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 768px) {
  #modifierSheet {
    border-radius: 24px;
    margin-bottom: 40px; /* Floating look on desktop */
    transform: translateY(20px) scale(0.95);
  }
  #modifierModal.open #modifierSheet {
    transform: translateY(0) scale(1);
  }
}
/* Handled by media queries */
#modifierModal.open[class*="open"] #modifierSheet {
  transform: translateY(0);
}

/* Modifier inner pieces */
.modifier-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}
.modifier-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.modifier-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.modifier-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.modifier-option:hover { border-color: #fed7aa; background: #fffbf7; }
.modifier-option.selected { border-color: #f97316; background: #fff7ed; }

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}
.radio-dot.checked {
  border-color: #f97316;
  background: #f97316;
  box-shadow: inset 0 0 0 4px white;
}

.checkbox-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}
.checkbox-dot.checked {
  background: var(--brand-red);
  border-color: var(--brand-red);
}
.checkbox-dot.checked::after {
  content: '✓';
  color: white;
  font-size: 11px;
  position: absolute;
  top: 0;
  left: 2px;
  font-weight: bold;
}

.spice-chip {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}
.spice-chip:hover { border-color: #fcd34d; color: #92400e; background: #fffbeb; }
.spice-chip.active { background: var(--brand-red); color: white; border-color: var(--brand-red); }

/* ---- CART PAGE QTY ---- */
.qty-control-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 3px 8px;
}
.qty-btn-page {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-red);
  background: none;
  border: none;
  cursor: pointer;
}
.qty-btn-page:hover { color: var(--brand-red-dark); }

/* ---- FORM INPUT ---- */
.form-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  outline: none;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1f2937;
}
.form-input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(237,28,36,0.12);
}
.form-input::placeholder { color: #9ca3af; }

/* ---- HEADER CART ICON ---- */
.cart-icon-btn {
  position: relative;
  background: var(--brand-red-light);
  border: 1.5px solid #fee2e2;
  border-radius: 12px;
  padding: 8px 16px 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--brand-red);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.cart-icon-btn:hover { background: var(--brand-red); color: white; border-color: var(--brand-red); }

/* ---- FLOATING CART (mobile) ---- */
#floatingCart {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: calc(100% - 32px);
  max-width: 400px;
}

/* ---- LOGIN PAGE ---- */
.login-gradient {
  background: linear-gradient(135deg, #fee2e2 0%, #fff7ed 50%, #fffbeb 100%);
}

/* ---- HERO GRADIENT ---- */
.hero-gradient {
  background: linear-gradient(to right, #1f2937, #374151);
}

/* ---- BADGE ---- */
.badge-veg { color: #15803d; background: #f0fdf4; border: 1px solid #86efac; }
.badge-nonveg { color: #b91c1c; background: #fef2f2; border: 1px solid #fca5a5; }

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.food-card { animation: fadeInUp 0.4s ease both; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.toast {
  background: white;
  border-left: 4px solid #10b981;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease both;
  pointer-events: auto;
  max-width: 300px;
}

.toast.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

/* ---- DESCRIPTION TOGGLE ---- */
.desc-text {
  transition: max-height 0.3s ease-out;
  overflow: hidden;
}
.desc-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* Safari/Chrome prefix + standard */
  -webkit-box-orient: vertical;
}
.read-more-btn {
  color: var(--brand-red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  cursor: pointer;
}

/* ---- CARD QTY CONTROL ---- */
.card-qty-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 4px 8px;
}
.card-qty-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red);
  font-weight: 800;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
}
.card-qty-btn:hover { background: #fee2e2; }
.card-qty-val {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cart-item-row { animation: slideIn 0.25s ease both; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .food-img { width: 90px; height: 80px; }
  .cart-box { display: none; }
}
