:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --panel: #ffffff;
  --ink: #17211b;
  --muted: #607066;
  --line: #dce4dc;
  --green: #1f7a4d;
  --green-dark: #105735;
  --tomato: #d94b35;
  --gold: #f0b84a;
  --shadow: 0 20px 60px rgba(22, 38, 28, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.topbar nav a {
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  padding: 54px clamp(18px, 4vw, 58px) 72px;
  overflow: hidden;
  color: #fff;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
}

.hero__shade {
  background: linear-gradient(90deg, rgba(10, 24, 16, 0.88), rgba(10, 24, 16, 0.35) 58%, rgba(10, 24, 16, 0.08));
}

.hero__content {
  position: relative;
  max-width: 760px;
  z-index: 1;
}

.hero-logo {
  width: 88px;
  height: 88px;
  display: block;
  margin-bottom: 18px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  object-fit: cover;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 44px;
  position: relative;
  z-index: 2;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(18px, 3vw, 30px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--tomato);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.menu-item {
  display: grid;
  gap: 12px;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfa;
}

.menu-item__image,
.image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.menu-item__image {
  object-fit: cover;
}

.image-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e8f0e9, #ffe3b0);
  color: var(--green-dark);
  font-size: 2.4rem;
  font-weight: 800;
}

.menu-item__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.menu-item p,
.muted,
.admin-copy,
.order-card span {
  color: var(--muted);
  line-height: 1.45;
}

.price {
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.qty-row,
.cart-line,
.totals div,
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.qty-row {
  align-items: center;
  margin-top: auto;
}

.stepper {
  display: grid;
  grid-template-columns: 38px 42px 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.stepper button {
  border: 0;
  background: #eef4ef;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 800;
}

.stepper span {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.summary {
  position: sticky;
  top: 82px;
  padding: 22px;
}

.cart-items,
.totals,
.form,
.orders-list,
.product-editor {
  display: grid;
  gap: 12px;
}

.cart-items {
  min-height: 54px;
  margin: 18px 0;
}

.cart-line {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.cart-line span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.totals {
  margin: 0 0 20px;
}

.totals dd {
  margin: 0;
  font-weight: 800;
}

.grand-total {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 1.14rem;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  resize: vertical;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.button--primary {
  background: var(--gold);
  color: var(--ink);
}

.button--secondary {
  background: #e8f0e9;
  color: var(--green-dark);
}

.button--light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-dark);
}

.button--whatsapp {
  width: 100%;
  background: #20b15a;
  color: #fff;
}

.button--danger {
  background: #ffe7e1;
  color: #a33221;
}

.home-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(100svh - 210px);
  padding: clamp(48px, 8vw, 86px) clamp(18px, 5vw, 72px);
  overflow: hidden;
  color: #fff;
  background: #193325;
}

.home-hero__image,
.home-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero__image {
  object-fit: cover;
}

.home-hero__shade {
  background: rgba(13, 28, 20, 0.66);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  width: 100%;
}

.home-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.home-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.home-page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 54px;
}

.home-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-strip article,
.home-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.home-strip article {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.home-strip strong {
  font-size: 1.05rem;
}

.home-strip span {
  color: var(--muted);
  line-height: 1.45;
}

.home-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.home-section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.info-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #f8faf7;
}

.map {
  display: none;
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map.is-visible {
  display: block;
}

.login-shell,
.admin-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 34px auto 54px;
}

.login-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 24px;
}

.admin-shell {
  display: grid;
  gap: 20px;
}

.admin-hero,
.admin-card {
  padding: clamp(18px, 3vw, 28px);
}

.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.media-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
}

.upload-box {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px dashed var(--green);
  border-radius: 8px;
  padding: 14px;
  background: #f8faf7;
  cursor: pointer;
  overflow: hidden;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.upload-box--wide img {
  aspect-ratio: 16 / 7;
}

.product-edit-card {
  display: grid;
  grid-template-columns: 140px 1fr 42px;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.product-edit-card img,
.product-edit-card .image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-fields {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr) minmax(110px, 0.6fr);
  gap: 12px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.admin-business-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-business-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfa;
}

.admin-business-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-business-card h3 {
  font-size: 1.2rem;
}

.admin-business-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill--active {
  background: #daf2e4;
  color: #0b6438;
}

.status-pill--pending {
  background: #fff1cc;
  color: #765000;
}

.status-pill--danger {
  background: #ffe0da;
  color: #a33221;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.empty-state {
  width: min(760px, calc(100% - 32px));
  margin: 40px auto;
  padding: 24px;
  text-align: center;
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar nav {
    margin-left: auto;
  }

  .topbar nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
  }

  .hero {
    min-height: 360px;
    padding: 42px 18px 58px;
  }

  .hero__shade {
    background: linear-gradient(180deg, rgba(10, 24, 16, 0.72), rgba(10, 24, 16, 0.54));
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 13vw, 4rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .hero p {
    margin-top: 12px;
  }

  .page {
    grid-template-columns: 1fr;
    gap: 14px;
    width: min(100% - 20px, 620px);
    margin: -28px auto 28px;
  }

  .summary {
    position: static;
    padding: 18px;
  }

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

  .menu-item {
    min-height: auto;
  }

  .admin-hero,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .media-grid,
  .product-edit-card,
  .product-fields,
  .home-strip,
  .admin-business-meta,
  .admin-actions {
    grid-template-columns: 1fr;
  }

  .admin-business-card__top {
    display: grid;
  }

  .home-section {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .topbar nav {
    gap: 8px;
    flex-shrink: 0;
  }

  .topbar nav a {
    font-size: 0.86rem;
  }

  .info-box {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    gap: 8px;
  }

  .brand__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
  }

  .brand strong {
    max-width: 118px;
    font-size: 0.88rem;
  }

  .button {
    width: 100%;
  }

  .home-hero {
    min-height: auto;
    padding: 36px 16px 38px;
  }

  .home-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.15rem, 12vw, 3.05rem);
    line-height: 1;
  }

  .home-hero p:not(.eyebrow) {
    margin-top: 14px;
    max-width: 30ch;
    font-size: 1rem;
  }

  .home-actions {
    display: grid;
    gap: 10px;
    margin-top: 22px;
  }

  .home-page {
    width: calc(100% - 20px);
    margin: 14px auto 32px;
  }

  .home-strip {
    gap: 10px;
  }

  .home-strip article,
  .home-section {
    padding: 16px;
  }

  .section {
    padding: 18px;
  }

  .menu-item {
    padding: 14px;
  }

  .menu-item__top {
    display: grid;
    gap: 8px;
  }

  .qty-row {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .stepper {
    grid-template-columns: 1fr 52px 1fr;
    height: 44px;
  }

  .login-shell,
  .admin-shell {
    width: calc(100% - 20px);
    margin: 18px auto 32px;
  }

  .login-card {
    padding: 20px;
  }
}
