/* ===================================================
   FoodDash – Final Clean & Stable CSS
   Compatible with index.html + custom.js
=================================================== */

/* ================= ROOT VARIABLES ================= */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --muted: #7b8794;
  --accent: #ff6b35;
  --accent-2: #ff9b66;
  --shadow: 0 10px 30px rgba(18, 24, 37, 0.08);
  --gap: 18px;

  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
     --accent: #ff5a1f;
  --accent-2: #ff8a4c;
  --glass: rgba(255,255,255,0.7);
}

/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
  color: #111827;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

/* ================= APP LAYOUT ================= */
.app {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ================= HEADER ================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title h1 {
  font-size: 18px;
}

.title p {
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: none;
  border: 0;
  padding: 8px;
  font-size: 18px;
  cursor: pointer;
}

/* ================= BUTTONS ================= */
.primary {
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2)
  );
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.small-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  cursor: pointer;
}

/* ================= HERO ================= */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #fffaf6);
  padding: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero-left {
  flex: 1;
  min-width: 200px;
}

.hero-left h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.hero-left p {
  font-size: 13px;
  color: var(--muted);
}

.hero-cta {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-right {
  width: 180px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
}

.hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= CATEGORIES ================= */
.categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.chip {
  background: var(--card);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  background: linear-gradient(90deg, #fff4ef, #fff2ea);
  border: 0;
}

/* ================= PRODUCTS ================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media {
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  font-weight: 700;
  font-size: 15px;
}

.price {
  font-weight: 800;
}

.desc {
  font-size: 13px;
  color: var(--muted);
}

.card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================= CART ================= */
.cart-drawer {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}

.cart-item {
  display: flex;
  gap: 10px;
  background: #f8f8f8;
  padding: 10px;
  border-radius: 10px;
}

.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

/* ================= MODAL ================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 200;
}

.modal {
  background: var(--card);
  width: 100%;
  max-width: 720px;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mimg {
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
}

.mimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.close-x {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: 0;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

/* ================= UTILITIES ================= */
.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ================= ACCESSIBILITY ================= */
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================= ORDER FORM ================= */
input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ================= RESPONSIVE ================= */
@media (min-width: 820px) {
  .app {
    grid-template-columns: 1fr 360px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .cart-drawer {
    position: sticky;
    top: 24px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  .hero-right {
    width: 140px;
    height: 120px;
  }

  .modal {
    grid-template-columns: 1fr;
  }
}
.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
button {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: scale(1.05);
}

button:active {
  transform: scale(0.96);
}
.badge {
  position: absolute;
  background: var(--accent);
  color: white;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
}
@media (max-width: 600px) {
  #openCartBtn {
    position: fixed;
    bottom: 16px;
    right: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  }
}
