@import url("https://fonts.googleapis.com/css2?family=Sofia&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #f5a623;
  --gold-dim: #f5a62320;
  --gold-soft: #f5a62340;
  --bg-base: #0a0a0a;
  --bg-surface: #111111;
  --bg-raised: #171717;
  --bg-hover: #1f1f1f;
  --border: #222222;
  --border-soft: #1a1a1a;
  --text-primary: #f0ede6;
  --text-secondary: #888;
  --text-muted: #444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --main-font: "DM Sans", sans-serif;
  --logo-font: "Sofia", cursive;
}

body {
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--main-font);
}

/* ── HEADER ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.harm-logo {
  display: flex;
  gap: 8px;
}

.hamburger {
  display: none;
}

.logo {
  font-size: 2em;
  font-family: var(--main-font);
}

.logo span {
  color: var(--gold);
  font-family: var(--logo-font);
}

.searchwrap {
  display: flex;
  align-items: center;
  max-width: 420px;
  width: 90%;
  gap: 8px;
  background: var(--bg-raised);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 9px 16px;
  transition: border-color 0.2s;
}

.searchwrap:focus-within {
  border-color: var(--gold-soft);
}

.searchwrap input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--main-font);
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}

.searchwrap input::placeholder {
  color: var(--text-muted);
}

.searchwrap i {
  color: var(--text-muted);
  font-size: 16px;
}

header button {
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: var(--bg-base);
  cursor: pointer;
  transition: opacity 0.15s;
}

header button:hover {
  opacity: 0.88;
}

header button i {
  font-size: 16px;
}

header button span {
  background: var(--bg-base);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

/* ── MAIN GRID ── */
main {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 0;
  height: calc(100vh - 57px);
  overflow: hidden;
}

/* ── SIDEBAR NAV ── */
.nav {
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding: 0 10px 20px;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

#ii {
  margin-top: 20px;
  margin-bottom: 16px;
}

.hide {
  display: none;
}

.nav-cat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.h {
  margin: 10px 0 6px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-size: 10px;
}

.cat-item,
.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  font-size: 12px;
  border-left: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  width: 100%;
  text-align: left;
  font-family: var(--main-font);
}

.cat-item:hover,
.status-item:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.cat-item.active,
.status-item.active {
  font-family: var(--logo-font);
  background: var(--bg-hover);
  border-left-color: var(--gold);
  color: rgb(199, 194, 194);
  font-weight: bold;
  letter-spacing: 1px;
}

.cat-item i,
.status-item i {
  color: var(--text-muted);
  font-size: 17px;
  flex-shrink: 0;
}

.cat-item.active i,
.status-item.active i {
  color: var(--gold);
}

/* push count to the right */
.cat-item span:last-child,
.status-item span:last-child {
  margin-left: auto;
}

.cart-count {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  height: 18px;
  width: 18px;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-hover);
}

.cat-item.active .cart-count {
  color: var(--gold);
  background: var(--gold-dim);
}

.divider {
  height: 0.5px;
  background: var(--border-soft);
  margin: 4px 0 12px;
}

/* status section */
.nav-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
}

.nav-status > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── FOOD CARDS SECTION ── */
.food-cards {
  padding: 20px;
  overflow-y: auto;
  scrollbar-width: none;
}

.food-cards::-webkit-scrollbar {
  display: none;
}

.dish-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  margin-bottom: 16px;
}

.dish-active h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.status-btn {
  padding: 7px 14px;
  font-size: 11px;
  font-family: var(--main-font);
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.status-btn:hover {
  color: var(--text-secondary);
  border-color: var(--gold-soft);
}

.status-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold-soft);
  color: var(--gold);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.card {
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
}

.card:hover {
  border-color: #2e2e2e;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #1c1c1c;
  border-radius: 10px;
  margin-bottom: 8px;
}

.food-tag {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 8px;
  padding: 2px 7px;
}

.food-tag.hot {
  background: #3d0f06;
  color: #ff6b4a;
  border: 0.5px solid #ff4d2c;
}

.food-tag.new {
  background: #3d2a00;
  color: #f5a623;
  border: 0.5px solid #f5a623;
}

.food-tag.popular {
  background: var(--gold);
  color: black;
  border: 0.5px solid var(--gold-soft);
}

.footer {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.footer p {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 3px;
  font-family: cursive;
}

.food-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 9px;
  line-height: 1.5;
  font-family: var(--main-font);
}

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

.price-button p {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--main-font);
}

.price-button button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.1s;
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
}

.price-button button:hover {
  opacity: 0.85;
  transform: scale(1.08);
}

/* ── CART PANEL ── */
.cart-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  overflow: hidden;
}

/* cart header */
.cart-table {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 16px 14px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.y-t {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.y-t h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.y-t p {
  font-size: 11px;
  color: var(--text-muted);
}

.y-t p span {
  color: var(--gold);
  font-weight: 600;
}

.cart-table > p {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 4px 10px;
  border-radius: var(--radius-lg);
  margin-top: 2px;
  align-self: flex-start;
}

.cart-table > p span {
  color: var(--gold);
  font-weight: 700;
}

/* cart cards list */
.cart-cards {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.cart-cards::-webkit-scrollbar {
  display: none;
}

/* individual cart card */
.cart-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}

.cart-card:hover {
  border-color: #2a2a2a;
}

.cart-card img {
  width: 40px;
  border-radius: 10px;
}

.img-f {
  display: flex;
  gap: 8px;
}

#f p {
  font-size: 11px;
  color: var(--text-muted);
}

.f-p {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.f-p h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.f-p p {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.cart-card > p {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-card > p span {
  color: var(--text-secondary);
}

/* quantity controls + trash */
.cartbtns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.i-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: 4px 10px;
}

.i-btn button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    border-color 0.15s;
  line-height: 1;
}

.i-btn button:hover {
  background: var(--gold-dim);
  border-color: var(--gold-soft);
  color: var(--gold);
}

.i-btn p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 16px;
  text-align: center;
}

/* trash button */
.cartbtns > button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #ff4d2c14;
  border: 1px solid #ff4d2c28;
  color: #dd2f08;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.1s;
}

.cartbtns > button:hover {
  background: #ff4d2c28;
  border-color: #ff4d2c55;
  transform: scale(1.05);
}

/* empty space between cards and footer */
.spacer {
  flex: 0 0 0;
}

/* ── CART FOOTER ── */
.cart-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.cart-footer .t,
.cart-footer .s-t,
.cart-footer .o-t {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-footer .t p,
.cart-footer .s-t p {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-footer .s-t {
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--border-soft);
}

.cart-footer .o-t {
  margin-top: 2px;
  margin-bottom: 4px;
}

.cart-footer .o-t p:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cart-footer .o-t p:last-child {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
}

/* place order button */
.cart-footer > button {
  width: 100%;
  padding: 13px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--main-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    opacity 0.15s,
    transform 0.1s;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.cart-footer > button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cart-footer > button:active {
  transform: translateY(0);
  opacity: 1;
}

.cart-footer > button i {
  font-size: 15px;
}

/* ── SCROLLBAR GLOBAL ── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 0.5px solid var(--border);
  background: var(--bg-surface);
}

footer span {
  color: var(--gold);
}

@media (max-width: 768px) {
  main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    height: calc(100vh - 57px);
    overflow: hidden;
  }

  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;

    height: 100vh;
    width: 250px;
    background: var(--bg-surface);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }

  .nav.open {
    transform: translateX(0);
  }

  .show {
    display: none;
  }

  .hide {
    display: flex;
  }

  .cart-page {
    display: none;
  }

  .cart-page {
    display: none;
  }

  .cart-page.open {
    display: flex;
  }

  .food-cards.open {
    display: none;
  }
}
