/* ═══════════════════════════════════════════
   FLAG'S BANQUET — Main Stylesheet
   Brand colours from logo:
     Orange #e8601c · Yellow #f5c800
     Cyan   #00aadd · Red    #e51c23
     Dark   #1a1a1a
   ═══════════════════════════════════════════ */

:root {
  /* Brand colours */
  --orange:      #e8601c;
  --orange-dark: #c44e14;
  --yellow:      #f5c800;
  --cyan:        #00aadd;
  --cyan-dark:   #0088bb;
  --red:         #e51c23;
  --dark:        #1a1a1a;

  /* UI tokens */
  --bg:          #eef1eb;
  --card:        #f7f4ef;
  --card-deep:   #ede8df;
  --text:        #1e2419;
  --muted:       #6b7060;
  --border:      rgba(30, 36, 25, 0.10);
  --shadow:      0 8px 32px rgba(30, 36, 25, 0.08);
  --shadow-lg:   0 20px 50px rgba(30, 36, 25, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", Times, serif;
  background: var(--bg);
  color: var(--text);
}

body {
  padding: 24px;
  background-image:
    radial-gradient(ellipse at 5%   0%,   rgba(232, 96, 28, 0.05)  0%, transparent 50%),
    radial-gradient(ellipse at 95% 100%,  rgba(0, 170, 221, 0.05)  0%, transparent 50%);
  background-attachment: fixed;
}

.page-shell {
  max-width: 1400px;
  margin: 0 auto;
}

/* ══════════════════════════
   HEADER
══════════════════════════ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border-radius: 22px;
  padding: 18px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* 4-colour top border on header */
.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg,
    var(--orange) 0%,
    var(--yellow) 33%,
    var(--cyan)   66%,
    var(--red)   100%
  );
  border-radius: 22px 22px 0 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(30,36,25,0.10);
  flex-shrink: 0;
}

.brand-info h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-info p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1.25rem;
  font-style: italic;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo-row img {
  width: 64px;
  height: auto;
  border-radius: 14px;
  background: var(--card-deep);
  padding: 8px;
  border: 1px solid var(--border);
}

/* Cart button — dark on light header */
.cart-toggle {
  border: none;
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  padding: 13px 24px;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.cart-toggle:hover {
  background: #2e2e2e;
  transform: translateY(-1px);
}

/* Cart bounce animation triggered by JS */
@keyframes cartBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12); }
  60%  { transform: scale(0.96); }
  80%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.cart-toggle.bounce {
  animation: cartBounce 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ══════════════════════════
   NAV BUTTONS
══════════════════════════ */
.top-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.nav-button {
  flex: 1;
  min-width: 160px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 15px 22px;
  font-size: 0.95rem;
  font-family: Georgia, serif;
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Bottom line sweep on active */
.nav-button::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--orange), var(--yellow), var(--cyan), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  border-radius: 0 0 14px 14px;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  border-color: rgba(232,96,28,0.28);
}

.nav-button.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
  box-shadow: 0 8px 24px rgba(26,26,26,0.22);
  transform: translateY(-2px);
}

.nav-button.active::after {
  transform: scaleX(1);
}

/* ══════════════════════════
   MAIN LAYOUT
══════════════════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 18px;
}

/* ── Panels ── */
.category-panel,
.selection-panel {
  background: var(--card);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(30,36,25,0.08);
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.item-count {
  color: var(--muted);
  font-size: 1.15rem;
  font-style: italic;
}

/* ══════════════════════════
   CATEGORY CARDS GRID
══════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.card {
  background: var(--card-deep);
  border: 1.5px solid transparent;
  border-radius: 18px;
  padding: 20px 16px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  padding: 22px 18px;
}

/* Stagger cascade */
.card:nth-child(1)  { animation-delay: 0.05s; }
.card:nth-child(2)  { animation-delay: 0.10s; }
.card:nth-child(3)  { animation-delay: 0.15s; }
.card:nth-child(4)  { animation-delay: 0.20s; }
.card:nth-child(5)  { animation-delay: 0.25s; }
.card:nth-child(6)  { animation-delay: 0.30s; }
.card:nth-child(7)  { animation-delay: 0.35s; }
.card:nth-child(8)  { animation-delay: 0.40s; }
.card:nth-child(9)  { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.50s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.60s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* 4-colour top bar sweeps in on hover */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg,
    var(--orange) 0%,
    var(--yellow) 33%,
    var(--cyan)   66%,
    var(--red)   100%
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
  border-radius: 18px 18px 0 0;
}

.card:hover {
  border-color: rgba(232, 96, 28, 0.22);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: #fff;
}

.card:hover::before {
  transform: scaleX(1);
}

.card h4 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: 0.01em;
}

.card span {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 10px;
  font-style: italic;
}

/* ══════════════════════════
   CATEGORY VIEW (item list)
══════════════════════════ */
.category-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.back-button {
  align-self: flex-start;
  background: var(--card-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 1.15rem;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: var(--dark);
  color: #fff;
  transform: translateX(-2px);
}

.category-title {
  font-size: 2.1rem;
  margin: 0;
  color: var(--text);
}

.items-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#itemsContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

/* Subheader inside item list — e.g. "NEW-AGE FUSION STARTERS" */
#itemsContainer [style*="grid-column"] {
  color: var(--orange) !important;
  border-bottom-color: rgba(232,96,28,0.2) !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.08em !important;
}

/* ── Item cards ── */
.item-card {
  background: var(--card-deep);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(30,36,25,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border);
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,36,25,0.12);
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.item-card:hover .item-image {
  transform: scale(1.05);
}

.item-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--card-deep);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  gap: 8px;
  background: var(--card-deep);
}

.item-name {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
  word-break: break-word;
}

/* Add button — orange */
.add-btn {
  flex-shrink: 0;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 1.05rem;
  cursor: pointer;
  font-family: Georgia, serif;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 3px 10px rgba(232,96,28,0.22);
}

.add-btn:hover  { background: var(--orange-dark); }
.add-btn:active { transform: scale(0.96); }

/* ══════════════════════════
   CART
══════════════════════════ */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all 0.2s ease;
  animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-item:hover {
  background: #fdf9f5;
  border-color: rgba(232,96,28,0.22);
}

.item-info {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.item-info strong {
  color: var(--text);
  font-size: 1.15rem;
}

.quantity {
  color: var(--muted);
  font-size: 1.05rem;
  background: var(--card-deep);
  padding: 3px 8px;
  border-radius: 7px;
}

.remove-btn {
  background: var(--card-deep);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 1.05rem;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: #fde8e8;
  border-color: rgba(229,28,35,0.3);
  color: var(--red);
}

.selection-body {
  min-height: 400px;
  border: 1.5px dashed rgba(30,36,25,0.13);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f2f4f0;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  margin: auto;
  font-size: 1.2rem;
  font-style: italic;
}

/* Proceed button — cyan */
.proceed-button {
  width: 100%;
  border: none;
  background: var(--cyan);
  color: #fff;
  border-radius: 14px;
  padding: 15px;
  margin-top: 16px;
  font-size: 1.2rem;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 20px rgba(0,170,221,0.28);
  letter-spacing: 0.02em;
}

.proceed-button:hover {
  background: var(--cyan-dark);
  transform: translateY(-1px);
}

/* ── Form inputs ── */
.user-inputs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
}

.user-inputs input {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 1.15rem;
  font-family: Georgia, serif;
  background: var(--card-deep);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.user-inputs input:focus {
  border-color: var(--cyan);
  background: #fff;
}

.user-inputs input::placeholder {
  color: rgba(107,112,96,0.5);
  font-style: italic;
}

/* Make select look exactly like your inputs */
.user-inputs select {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 1.15rem;
  font-family: Georgia, serif;
  background: var(--card-deep);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

/* Focus state same as input */
.user-inputs select:focus {
  border-color: var(--cyan);
  background: #fff;
}

/* Custom dropdown arrow (matches your theme) */
.user-inputs select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7060' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* ══════════════════════════
   RESPONSIVE — TABLET
══════════════════════════ */
@media (max-width: 1180px) {
  .main-layout { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-right { flex-direction: column; align-items: flex-end; }
  .items-container { grid-template-columns: 1fr; }
  #itemsContainer { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════
   RESPONSIVE — SMALL TABLET
══════════════════════════ */
@media (max-width: 820px) {
  body { padding: 16px; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .header-left { width: 100%; gap: 10px; }

  .header-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }

  .logo-row { gap: 8px; }
  .logo-row img { width: 52px; }
  .brand-info h1 { font-size: 1.55rem; }
  .brand-info p  { font-size: 0.92rem; }

  .cards-grid { grid-template-columns: 1fr; }
  .top-nav { flex-direction: column; gap: 10px; }
  .nav-button { min-width: 100%; padding: 13px 18px; }

  .panel-title h2,
  .panel-title h3 { font-size: 1.25rem; }

  .items-container { grid-template-columns: 1fr; gap: 12px; }

  .item-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0; gap: 0;
  }
  .item-image { width: 100%; aspect-ratio: 4/3; height: auto; }
  .item-details { flex-direction: row; align-items: center; padding: 10px 12px; }
  .selection-body { min-height: 280px; padding: 14px; }
  #itemsContainer { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════ */
@media (max-width: 600px) {
  body { padding: 10px; }
  .page-shell { max-width: 100%; }

  .page-header {
    flex-direction: column;
    align-items: center;
    padding: 12px 14px;
    gap: 14px;
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .header-left { width: 100%; justify-content: center; gap: 10px; }

  .brand-logo { width: 44px; height: 44px; border-radius: 10px; }
  .brand-info h1 { font-size: 1.25rem; }
  .brand-info p  { font-size: 0.85rem; }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .logo-row { display: none; }

  .cart-toggle {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.95rem;
  }

  .top-nav { flex-direction: column; gap: 8px; margin-bottom: 14px; }
  .nav-button { min-width: 100%; padding: 12px 14px; font-size: 0.88rem; border-radius: 12px; }

  .main-layout { grid-template-columns: 1fr; gap: 12px; }

  .category-panel,
  .selection-panel { padding: 14px; border-radius: 18px; }

  .panel-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .panel-title h2,
  .panel-title h3 { font-size: 1.15rem; }

  .cards-grid { grid-template-columns: 1fr; gap: 10px; }

  .card { min-height: 100px; padding: 14px; border-radius: 14px; }
  .card h4   { font-size: 1rem; }
  .card span { font-size: 0.88rem; }

  .back-button { padding: 9px 13px; font-size: 0.92rem; margin-bottom: 10px; }
  .category-title { font-size: 1.3rem; }

  .items-container { grid-template-columns: 1fr; gap: 10px; }

  .item-card { flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .item-image { width: 100%; aspect-ratio: 4/3; height: auto; }
  .item-details { flex-direction: row; align-items: center; width: 100%; padding: 9px 11px; }
  .item-name { font-size: 0.96rem; }
  .add-btn { padding: 7px 13px; font-size: 0.88rem; }

  .selection-body { min-height: 220px; padding: 10px; gap: 8px; }
  .empty-state { font-size: 0.95rem; }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px; gap: 8px;
  }

  .item-info { flex-direction: column; width: 100%; }
  .item-info strong { font-size: 0.95rem; }
  .remove-btn { width: 100%; padding: 6px 10px; font-size: 0.88rem; }
  .proceed-button { padding: 12px; font-size: 1rem; margin-top: 10px; }

  #itemsContainer { grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 7px; }
}

/* ══════════════════════════
   LARGE SCREENS
══════════════════════════ */
@media (min-width: 1920px) {
  body { padding: 40px; }
  .page-shell { max-width: 1650px; }
  .cards-grid { gap: 20px; }
  .card { padding: 28px 22px; }
  #itemsContainer { grid-template-columns: repeat(4, 1fr); }
}