:root {
  --brand: #0b7d32;
  --brand-deep: #005b28;
  --brand-soft: #e8f6ec;
  --ink: #111923;
  --muted: #6f737a;
  --line: #dfe7e3;
  --page: #f2f6f3;
  --card: #ffffff;
  --accent: #111923;
  --green: #0b7d32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}

html {
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.site-header {
  background: linear-gradient(90deg, #ffffff, #eef8f1);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 12px rgba(0, 70, 28, .08);
}

.header-shell,
.category-nav,
main,
.footer {
  max-width: 1280px;
  margin: 0 auto;
}

.header-shell {
  min-height: 72px;
  display: grid;
  grid-template-columns: 220px 150px minmax(220px, 1fr) 310px;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.logo span {
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.logo strong {
  color: var(--brand);
}

.deliver {
  border: 0;
  background: rgba(11, 125, 50, .1);
  border-radius: 6px;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
}

.deliver small {
  display: block;
  color: #4c4f55;
  font-size: 12px;
  line-height: 1.1;
}

.deliver span {
  display: block;
  font-weight: 800;
}

.search {
  display: grid;
  grid-template-columns: 1fr 96px;
  min-width: 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(11, 125, 50, .18);
}

.search input {
  border: 0;
  padding: 15px 16px;
  min-width: 0;
  outline: 0;
}

.search input:focus {
  box-shadow: inset 0 0 0 2px rgba(11, 125, 50, .32);
}

.search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.account-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.category-nav {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow-x: auto;
  padding: 0 18px;
  background: #fff;
  border-top: 1px solid rgba(0, 91, 40, .12);
}

.category-nav a {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  color: #30333a;
}

.category-nav a:first-child,
.category-nav a:hover {
  color: var(--brand);
}

main {
  padding: 18px 18px 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, 220px);
  gap: 14px;
}

.hero-card,
.quick-cats,
.product-card,
.promo-band,
.wide-deal,
.mini-product,
.brand-strip,
.footer {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.main-hero {
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 48%;
  overflow: hidden;
  background: linear-gradient(120deg, #ecf8ef, #ffffff 52%, #eef5f0);
}

.main-hero div {
  padding: 44px;
  align-self: center;
}

.main-hero p {
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
}

.main-hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.05;
  max-width: 540px;
}

.main-hero span {
  display: block;
  margin: 16px 0 26px;
  max-width: 530px;
  color: #52565f;
  line-height: 1.55;
}

.main-hero a,
.wide-deal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.main-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-offer {
  overflow: hidden;
  position: relative;
  padding: 22px;
  background: #edf8ef;
}

.side-offer.blue { background: #eef2f1; }

.side-offer strong {
  display: block;
  color: var(--brand);
  margin-bottom: 8px;
}

.side-offer h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.12;
  max-width: 260px;
}

.side-offer img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  height: 68%;
  object-fit: cover;
  border-top-left-radius: 70px;
}

.quick-cats {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}

.quick-cats a {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}

.quick-cats img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #dff2e5;
  overflow: hidden;
  background: #eef1f6;
}

.section { margin-top: 26px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head a {
  color: var(--brand);
  font-weight: 800;
}

.product-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.product-card {
  position: relative;
  padding: 12px;
  min-width: 0;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / .88;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f1f4;
}

.product-card h3 {
  min-height: 42px;
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.price {
  font-size: 20px;
  font-weight: 900;
}

.product-card p {
  margin: 6px 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.product-card button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.search button:hover,
.product-card button:hover,
.main-hero a:hover,
.wide-deal a:hover {
  background: var(--brand-deep);
}

.badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 900;
  z-index: 1;
}

.promo-band {
  margin-top: 26px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 14px;
  background: linear-gradient(90deg, #07120d, #0b5f2b);
  color: #fff;
}

.promo-band article {
  padding: 18px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
}

.promo-band span {
  display: block;
  color: #9be7ae;
  font-weight: 800;
}

.promo-band h2 {
  margin: 8px 0;
  font-size: 27px;
}

.promo-band p {
  margin: 0;
  color: #d9deea;
  line-height: 1.5;
}

.promo-band strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.deal-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 12px;
}

.wide-deal {
  min-height: 260px;
  padding: 26px;
  background: linear-gradient(135deg, #dff4e4, #ffffff);
}

.wide-deal h3 {
  margin: 0 0 10px;
  font-size: 32px;
}

.wide-deal p {
  max-width: 360px;
  color: #4c4f55;
  line-height: 1.5;
  margin-bottom: 28px;
}

.mini-product {
  padding: 14px;
}

.mini-product img {
  width: 100%;
  aspect-ratio: 1 / .82;
  object-fit: cover;
  border-radius: 6px;
}

.mini-product h3 {
  margin: 12px 0 8px;
  font-size: 16px;
  min-height: 40px;
}

.mini-product strong { font-size: 19px; }

.brand-strip {
  margin-top: 26px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.brand-strip span {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 6px;
  background: #f4faf6;
  font-weight: 900;
  color: #3a3e47;
}

.footer {
  margin-bottom: 34px;
  padding: 28px 18px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
}

.footer h2,
.footer p {
  margin: 0;
}

.footer h2 { font-size: 25px; margin-bottom: 8px; }
.footer p, .footer span { color: var(--muted); }
.footer strong { display: block; margin-bottom: 8px; }
.footer a { display: block; color: var(--brand); font-weight: 800; overflow-wrap: anywhere; }
.footer > p { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }

.footer-logo {
  width: 150px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
  margin-bottom: 10px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(8, 18, 13, .48);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(440px, 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  box-shadow: -18px 0 40px rgba(0, 0, 0, .18);
  transform: translateX(100%);
  transition: transform .24s ease;
}

body.cart-open {
  overflow: hidden;
}

body.cart-open .cart-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.cart-open .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-header strong {
  display: block;
  font-size: 24px;
}

.cart-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.cart-header button,
.cart-item button {
  border: 0;
  border-radius: 5px;
  background: #edf6f0;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.cart-header button {
  align-self: start;
  padding: 9px 12px;
}

.cart-items {
  overflow: auto;
  padding: 16px 20px;
}

.empty-cart {
  margin: 0;
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 70px;
  height: 70px;
  border-radius: 7px;
  object-fit: cover;
}

.cart-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.cart-item strong {
  display: block;
  margin-bottom: 8px;
}

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

.qty-row button {
  width: 30px;
  height: 30px;
}

.qty-row span {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
}

.remove-item {
  margin-left: auto;
  padding: 7px 9px;
}

.checkout-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: #fbfdfb;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: #354036;
  font-size: 13px;
  font-weight: 800;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

.checkout-form textarea {
  min-height: 74px;
  resize: vertical;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
}

.cart-total strong {
  font-size: 24px;
}

.checkout-button,
.email-order {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
}

.email-order {
  background: var(--ink);
}

.admin-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f3faf5, #ffffff);
}

.admin-shell {
  max-width: 1180px;
}

.admin-login {
  width: min(420px, calc(100vw - 32px));
  margin: 70px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 70, 28, .1);
}

.admin-login img {
  width: 120px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 12px;
  mix-blend-mode: multiply;
}

.admin-login h1,
.admin-card h2 {
  margin: 0 0 8px;
}

.admin-login p,
.admin-card-head p,
.admin-top p {
  margin: 0;
  color: var(--muted);
}

.admin-login form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.admin-login label,
.admin-product label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: #354036;
  font-size: 13px;
}

.admin-login input,
.admin-product input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
}

.admin-login button,
.admin-product button,
.admin-top button,
.admin-top a {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

[data-login-error] {
  color: #b42318;
  font-weight: 800;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

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

.admin-top button,
.admin-top a {
  display: inline-grid;
  place-items: center;
  background: var(--ink);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stats article,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-stats article {
  padding: 18px;
}

.admin-stats span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-stats strong {
  font-size: 26px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
}

.admin-card {
  padding: 18px;
}

.admin-card-head {
  margin-bottom: 16px;
}

.product-admin-list {
  display: grid;
  gap: 12px;
}

.admin-product {
  display: grid;
  grid-template-columns: 74px 1fr 110px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.admin-product img {
  width: 74px;
  height: 74px;
  border-radius: 7px;
  object-fit: cover;
}

.admin-product label:nth-of-type(3),
.admin-check,
.admin-product button {
  grid-column: 2 / -1;
}

.admin-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.admin-check input {
  width: auto;
}

.order-admin-list {
  display: grid;
  gap: 12px;
}

.admin-order,
.admin-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.admin-order div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-order span,
.admin-order p {
  color: var(--muted);
}

.admin-order p {
  margin: 8px 0;
}

.admin-order ul {
  margin: 10px 0;
  padding-left: 20px;
}

@media (max-width: 1050px) {
  .header-shell {
    grid-template-columns: 220px 130px 1fr;
  }

  .search {
    grid-column: 1 / -1;
  }

  .account-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-bottom: 12px;
  }

  .hero-grid,
  .main-hero,
  .promo-band,
  .deal-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-grid { grid-template-rows: auto; }
  .main-hero { grid-row: auto; }
  .main-hero img { height: 280px; }
  .quick-cats { grid-template-columns: repeat(4, 1fr); }
  .product-row { grid-template-columns: repeat(3, 1fr); }
  .brand-strip { grid-template-columns: repeat(4, 1fr); }
  .admin-grid,
  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 660px) {
  .header-shell {
    grid-template-columns: 1fr;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo span {
    font-size: 26px;
  }

  .logo img {
    width: 58px;
  }

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

  .search button {
    min-height: 42px;
  }

  .main-hero div {
    padding: 28px;
  }

  .main-hero h1 {
    font-size: 34px;
  }

  .quick-cats,
  .product-row,
  .brand-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .side-offer img {
    width: 44%;
    max-height: 150px;
  }

  .admin-top,
  .admin-product {
    grid-template-columns: 1fr;
  }

  .admin-top {
    align-items: flex-start;
  }

  .admin-product label:nth-of-type(3),
  .admin-check,
  .admin-product button {
    grid-column: auto;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}
