:root {
  color-scheme: light;
  --cream: #fff8ef;
  --brown: #24170f;
  --orange: #b84b00;
  --green: #168447;
  --yellow: #a87500;
  --red: #c62828;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--brown);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px;
}

header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  font-size: 42px;
  flex-shrink: 0;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.2;
}

header p {
  margin: 6px 0 0;
  color: var(--orange);
  font-weight: 750;
  font-size: 17px;
}

.hero {
  background: var(--brown);
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero h2 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 21px;
}

.hero p {
  margin: 0;
  font-size: 16px;
}

.live-label {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.intro {
  color: #625349;
  margin: 16px 2px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  min-width: 0;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 3px 14px #0000000d;
  border-left: 6px solid #999;
  overflow-wrap: anywhere;
}

.card.just_made {
  border-left-color: #ef6c00;
}

.card.available {
  border-left-color: var(--green);
}

.card.coming {
  border-left-color: #d39b00;
}

.card.sold {
  border-left-color: var(--red);
}

.food {
  font-size: 36px;
  flex-shrink: 0;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.card b {
  display: inline-block;
  font-size: 15px;
}

.card p {
  margin: 7px 0;
  font-size: 15px;
}

.card small {
  display: block;
  margin-top: 7px;
  color: #777;
  font-size: 13px;
}

.contact-section {
  margin-top: 22px;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 14px #0000000d;
}

.contact-section h2 {
  margin: 0 0 8px;
}

.contact-section p {
  color: #625349;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.actions a,
.all,
button {
  border: 0;
  border-radius: 12px;
  padding: 12px 15px;
  background: var(--brown);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.actions a {
  flex: 1 1 140px;
}

.actions a:focus-visible,
button:focus-visible {
  outline: 3px solid #e49a42;
  outline-offset: 3px;
}

footer {
  padding: 20px 4px;
  color: #75675d;
  font-size: 13px;
  text-align: center;
}

/* Staff dashboard */
.admin input {
  display: block;
  width: 100%;
  max-width: 420px;
  padding: 13px;
  margin: 9px 0;
  border-radius: 10px;
  border: 1px solid #bbb;
  background: #fff;
  color: var(--brown);
  font-size: 16px;
}

.error {
  color: var(--red);
}

.staffbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
  padding: 14px;
  border-radius: 14px;
}

.adminRow {
  background: #fff;
  color: var(--brown);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 2px 10px #0000000d;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.buttons button {
  font-size: 13px;
}

.all {
  margin-top: 12px;
  width: 100%;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .wrap {
    padding: 14px;
  }

  header {
    gap: 10px;
  }

  .logo {
    font-size: 36px;
  }

  header p {
    font-size: 15px;
  }

  .hero {
    padding: 17px;
  }

  .hero h2 {
    font-size: 19px;
  }

  .card {
    padding: 15px;
    gap: 11px;
  }

  .food {
    font-size: 32px;
  }

  .card h2 {
    font-size: 20px;
  }

  .contact-section {
    padding: 16px;
  }

  .actions {
    flex-direction: column;
  }

  .actions a {
    width: 100%;
    flex: auto;
  }

  .buttons button {
    flex: 1 1 140px;
    min-height: 46px;
  }
}

/* Product management and realistic food photos */
.product-manager {
  margin-top: 18px;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 3px 14px #0000000d;
}
.manager-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.manager-heading h2,
.status-heading {
  margin: 0 0 6px;
}
.manager-heading p,
.helper {
  color: #75675d;
  font-size: 14px;
  margin: 4px 0 12px;
}
.product-form {
  background: #fff8ef;
  border: 1px solid #ead8c6;
  border-radius: 14px;
  padding: 15px;
  margin: 14px 0;
}
.product-form h3 {
  margin: 0 0 12px;
}
.product-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 10px 0 4px;
}
.product-form input,
.product-form select {
  display: block;
  width: 100%;
  padding: 11px;
  border: 1px solid #cbb8a6;
  border-radius: 9px;
  background: #fff;
  color: #24170f;
  font: inherit;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-preview-wrap {
  margin-top: 10px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px dashed #cbb8a6;
  border-radius: 12px;
  padding: 8px;
  color: #75675d;
  font-size: 13px;
}
.photo-preview-wrap img {
  max-width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.secondary {
  background: #eee3d8 !important;
  color: #38261b !important;
}
.danger {
  background: #b42323 !important;
}
.managed-products {
  display: grid;
  gap: 9px;
}
.managed-product {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #eee1d4;
  border-radius: 12px;
  padding: 9px;
  min-width: 0;
}
.managed-product > img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 9px;
  background: #f3e8dd;
}
.managed-info {
  flex: 1;
  min-width: 0;
}
.managed-info b,
.managed-info small {
  display: block;
  overflow-wrap: anywhere;
}
.managed-info small {
  color: #75675d;
  margin-top: 3px;
}
.managed-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.managed-actions button {
  padding: 8px 10px;
  font-size: 13px;
}
.status-heading {
  margin-top: 24px;
}
.status-product-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mini-food {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3e8dd;
}
.mini-food.emoji {
  font-size: 34px;
  display: grid;
  place-items: center;
}
.status-product-title {
  flex: 1;
  min-width: 90px;
}
.status-product-title b,
.status-product-title small {
  display: block;
}
.status-product-title small {
  color: #75675d;
  margin-top: 3px;
}
.status-pill {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}
.coming-text {
  margin-top: 8px;
  color: #855d00;
  font-weight: 600;
}
.last-updated {
  color: #777;
  font-size: 13px;
  margin: 10px 0;
}
.food-photo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
  background: #f3e8dd;
}
.card-content {
  min-width: 0;
  flex: 1;
}
.product-price {
  font-weight: 800;
  color: #9a3e00;
  margin: -3px 0 6px;
  font-size: 17px;
}
.emoji-fallback {
  font-size: 36px;
}
@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .managed-product {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .managed-actions {
    width: 100%;
    padding-left: 68px;
  }
  .food-photo {
    width: 76px;
    height: 76px;
  }
  .manager-heading button {
    width: 100%;
  }
}

/* FINAL FIX: Gabbar Tea Stall header logo */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.site-logo {
  display: block;
  width: 76px;
  height: 76px;
  max-width: 76px;
  object-fit: contain;
  flex: 0 0 76px;
  border-radius: 50%;
}

.site-brand {
  min-width: 0;
  flex: 1;
}

.site-brand h1 {
  margin: 0;
  font-size: clamp(18px, 5vw, 26px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.site-brand p {
  margin: 6px 0 0;
  font-size: 12px;
}

@media (max-width: 480px) {
  .wrap {
    width: 100%;
    max-width: 760px;
    padding: 14px;
  }

  .site-logo {
    width: 64px;
    height: 64px;
    max-width: 64px;
    flex-basis: 64px;
  }
}


/* Offers UI - added without changing existing product/status styles */
.offer-manager {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #ead8c8;
}
.offer-manager h3 { margin: 0 0 6px; }
.offer-product-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 8px 0 16px;
}
.offer-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ead8c8;
  border-radius: 10px;
  background: #fffaf5;
  cursor: pointer;
}
.offer-choice input { width: auto; margin: 0; }
.offer-row { align-items: center; }
.offer-row .managed-info { gap: 6px; }
.offer-row .status-pill { width: fit-content; }
.active-offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.offer-card {
  padding: 18px;
  border: 1px solid #f1c27d;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8e9, #fff);
  box-shadow: 0 5px 16px rgba(100, 55, 20, .08);
}
.offer-ribbon {
  color: #9a3e00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
}
.offer-card h3 { margin: 8px 0; color: #482516; }
.offer-items { margin: 0 0 8px; font-weight: 600; }
.offer-prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.offer-prices strong { font-size: 25px; color: #9a3e00; }
.offer-prices del { color: #777; }
.offer-prices span { color: #176b35; font-weight: 800; font-size: 13px; }
.offer-card small { color: #176b35; font-weight: 700; }

/* v2.3: show the same saved product photos in combo and special-offer cards */
.offer-product-photos {
  display: flex;
  gap: 10px;
  margin: 12px 0 14px;
  flex-wrap: wrap;
}
.offer-product-photo {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3e8dd;
  flex: 0 0 84px;
}
.offer-product-emoji {
  display: grid;
  place-items: center;
  font-size: 34px;
}
@media (max-width: 480px) {
  .offer-product-photo { width: 76px; height: 76px; flex-basis: 76px; }
}
