/* Order Page — Sheesh Food Truck */

:root {
  --turquoise: #03989e;
  --turquoise-dark: #027278;
  --orange: #E8833A;
  --gold: #c8a518;
  --black: #0A0A0A;
  --charcoal: #1A1A1A;
  --cream: #2D2D2D;
  --white: #FFF;
  --red: #E74C3C;
  --font-display: 'Josefin Sans', sans-serif;
  --font-body: 'Josefin Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}

.nav { display: flex; gap: 1.5rem; }

.nav-link {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: color .3s;
}

.nav-link:hover { color: var(--turquoise); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  font-size: .95rem;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all .3s;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--turquoise);
  color: var(--white);
  box-shadow: 0 0 15px rgba(3,152,158,.4);
}

.btn-primary:hover {
  background: var(--turquoise-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(3,152,158,.5);
}

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--black);
}

.btn-full { width: 100%; }

/* ===== Loading ===== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--turquoise);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  text-align: center;
  padding: 4rem 2rem;
}

.error-state h2 { margin-bottom: .5rem; }
.error-state p { color: rgba(255,255,255,.5); margin-bottom: 1.5rem; }

/* ===== Order Page Layout ===== */
.order-page {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.order-header {
  padding: 2rem 0 1rem;
}

.order-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: .25rem;
}

.order-subtitle {
  color: rgba(255,255,255,.5);
  font-size: .95rem;
}

.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}

/* ===== Menu Grid ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.menu-category-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  padding: .75rem 0 .25rem;
  border-bottom: 1px solid rgba(200,165,24,.2);
  margin-top: .5rem;
}

.menu-category-title:first-child { margin-top: 0; }

.menu-card {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}

.menu-card:hover {
  border-color: rgba(3,152,158,.4);
  transform: translateY(-2px);
}

.menu-card.sold-out {
  opacity: .4;
  pointer-events: none;
}

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .35rem;
}

.menu-card-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.menu-card-price {
  color: var(--turquoise);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  margin-left: .75rem;
}

.menu-card-desc {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  line-height: 1.4;
}

.menu-card-sold-out {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.menu-card-qty {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.qty-btn:hover {
  border-color: var(--turquoise);
  color: var(--turquoise);
}

.qty-value {
  font-weight: 700;
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
}

.add-btn {
  margin-left: auto;
  background: var(--turquoise);
  color: var(--white);
  border: none;
  padding: .4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all .2s;
}

.add-btn:hover { background: var(--turquoise-dark); }

/* Modifier selectors within menu card */
.modifier-group {
  margin-top: .75rem;
}

.modifier-label {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  margin-bottom: .35rem;
  display: block;
}

.modifier-select {
  width: 100%;
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .85rem;
  appearance: none;
  cursor: pointer;
  margin-bottom: .5rem;
}

.modifier-select:focus {
  border-color: var(--turquoise);
  outline: none;
}

/* ===== Cart ===== */
.cart-section {
  position: sticky;
  top: 80px;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1.25rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.cart-count {
  background: var(--turquoise);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.3);
}

.cart-empty-hint { font-size: .85rem; margin-top: .25rem; }

.cart-items { display: flex; flex-direction: column; gap: .75rem; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-weight: 600;
  font-size: .9rem;
}

.cart-item-modifiers {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  margin-top: .15rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .35rem;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: var(--white);
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover { border-color: var(--turquoise); color: var(--turquoise); }

.cart-item-price {
  font-weight: 700;
  color: var(--turquoise);
  white-space: nowrap;
  margin-left: .75rem;
}

.cart-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .25rem;
}

.cart-tax-note {
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 1rem;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-content {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover { color: var(--white); }

.modal-content h2 {
  font-family: var(--font-display);
  margin-bottom: 1.25rem;
}

/* Checkout Summary */
.checkout-summary {
  background: var(--black);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  padding: .35rem 0;
}

.checkout-item-mods {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  padding-left: 1rem;
}

/* Checkout Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: .4rem;
  color: rgba(255,255,255,.7);
}

.form-group input {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .2s;
}

.form-group input:focus {
  border-color: var(--turquoise);
  outline: none;
}

.form-group input::placeholder {
  color: rgba(255,255,255,.3);
}

.card-container {
  min-height: 44px;
  padding: .75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--black);
}

.form-error {
  color: var(--red);
  font-size: .85rem;
  margin-top: .5rem;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}

/* ===== Confirmation ===== */
.confirmation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 2rem;
}

.confirmation-card {
  text-align: center;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 3rem 2rem;
  max-width: 440px;
  width: 100%;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--turquoise);
  color: var(--white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.confirmation-card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: .5rem;
}

.confirmation-order-id {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.confirmation-details {
  background: var(--black);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

.confirmation-total {
  font-weight: 700;
  color: var(--turquoise);
  margin-top: .5rem;
}

.confirmation-pickup {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

.confirmation-sms {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

/* ===== Mobile Cart Bar ===== */
.mobile-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .75rem 1.5rem;
  display: none;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.5);
}

.mobile-cart-info {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
}

.mobile-cart-total {
  font-weight: 700;
  font-size: 1.1rem;
  flex: 1;
}

.mobile-cart-bar .btn {
  padding: .6rem 1.25rem;
  font-size: .85rem;
}

/* ===== Footer ===== */
.footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand p {
  color: rgba(255,255,255,.4);
  font-size: .85rem;
  margin-top: .25rem;
}

.footer-bottom p {
  color: rgba(255,255,255,.3);
  font-size: .8rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .order-layout {
    grid-template-columns: 1fr;
  }

  .cart-section {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    border-radius: 0;
    max-height: 100vh;
    overflow-y: auto;
  }

  .cart-section.open {
    display: block;
  }

  .mobile-cart-bar {
    display: flex !important;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .order-header h1 { font-size: 1.5rem; }

  body { padding-bottom: 70px; }
}

@media (max-width: 480px) {
  .header-inner { padding: .75rem 1rem; }
  .order-page { padding: 0 1rem; }
  .nav { gap: 1rem; }
  .nav-link { font-size: .8rem; }
  .modal-content { padding: 1.5rem; }
}
