:root {
  --ink: #15231d;
  --muted: #66736d;
  --line: #dfe6e1;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --leaf: #12372a;
  --leaf-2: #2c6e49;
  --gold: #c99739;
  --red: #b33535;
  --shadow: 0 18px 50px rgba(21, 35, 29, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.top-strip {
  background: var(--leaf);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 58px);
  background: rgba(251, 250, 245, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--leaf);
  color: #fff;
  font-weight: 800;
}
.brand small, table small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #31423a;
  font-size: 15px;
}
.site-nav a:hover { color: var(--leaf-2); }
.nav-toggle { display: none; }
.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.cart-pill span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 99px;
  background: var(--gold);
  color: #1d1609;
  font-weight: 800;
  font-size: 12px;
}

main { min-height: 60vh; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(34px, 6vw, 82px) clamp(18px, 5vw, 72px);
  background: linear-gradient(110deg, #f7f3e8 0%, #fbfaf5 58%, #eaf2ed 100%);
}
.hero h1, .page-hero h1, .detail-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.03;
  max-width: 900px;
}
.hero p, .page-hero p, .detail-copy p {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
}
.eyebrow, .section-head span {
  color: var(--leaf-2);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}
.btn.primary { background: var(--leaf); color: #fff; border-color: var(--leaf); }
.btn.ghost { background: transparent; border-color: #b7c8bc; }
.btn.small { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.btn.danger { color: #fff; background: var(--red); border-color: var(--red); }
.btn.full { width: 100%; }

.category-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.category-band a {
  min-height: 132px;
  padding: 22px;
  background: #fff;
}
.category-band strong { display: block; margin-bottom: 10px; }
.category-band span { color: var(--muted); font-size: 14px; line-height: 1.5; }

.section-head, .dashboard-head, .admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 56px clamp(18px, 5vw, 72px) 18px;
}
.section-head h2, .split-feature h2, .panel h2 {
  margin: 6px 0 0;
  font-size: clamp(25px, 3vw, 38px);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding: 18px clamp(18px, 5vw, 72px) 52px;
}
.product-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(21, 35, 29, .05);
}
.product-image {
  position: relative;
  display: block;
  background: #eef2ed;
}
.product-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.product-image span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.product-info { padding: 16px; }
.product-info h3 { margin: 0 0 8px; font-size: 18px; }
.product-info p { min-height: 48px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.price-row strong { font-size: 20px; }
.price-row del { color: #89938d; }
.price-row.big strong { font-size: 34px; }
.inline-form { margin: 0; }

.split-feature, .product-detail, .cart-layout, .checkout-layout, .admin-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(300px, 1fr);
  gap: 28px;
  padding: 48px clamp(18px, 5vw, 72px);
}
.split-feature {
  background: var(--leaf);
  color: #fff;
  align-items: start;
}
.split-feature p { color: #d8e6dd; line-height: 1.7; }
.feature-list { list-style: none; display: grid; gap: 14px; padding: 0; margin: 0; }
.feature-list li {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
}
.feature-list span { display: block; color: #d8e6dd; margin-top: 6px; }

.page-hero {
  padding: 56px clamp(18px, 5vw, 72px);
  background: #eef4ef;
}
.page-hero.small { padding-block: 34px; }
.shop-tools {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr auto;
  gap: 12px;
  padding: 24px clamp(18px, 5vw, 72px) 0;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
}
label { display: grid; gap: 7px; color: #35463e; font-weight: 700; }
.detail-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.buy-box {
  display: grid;
  grid-template-columns: 140px auto;
  gap: 12px;
  align-items: end;
  margin: 22px 0;
}
.detail-panel, .panel, .summary-card, .auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 34px rgba(21, 35, 29, .06);
}
.cart-table { display: grid; gap: 12px; }
.cart-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 92px 120px;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.cart-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
}
.summary-card p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}
.summary-card .total { border-top: 1px solid var(--line); padding-top: 14px; color: var(--ink); }

.auth-wrap {
  display: grid;
  place-items: center;
  padding: 54px 18px;
}
.auth-card { width: min(100%, 480px); display: grid; gap: 16px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid h2, .form-grid .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.flash {
  margin: 16px clamp(18px, 5vw, 72px);
  padding: 12px 14px;
  border-radius: 8px;
  background: #edf8ef;
  border: 1px solid #bedfc5;
  color: #185626;
}
.flash-danger { background: #fff0f0; border-color: #e7b7b7; color: #8b1f1f; }
.flash-warning { background: #fff8e6; border-color: #edd594; color: #765717; }
.empty { padding: 28px; color: var(--muted); }

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 30px;
  padding: 38px clamp(18px, 5vw, 72px);
  background: #101b16;
  color: #fff;
}
.site-footer p, .site-footer a { color: #c8d4ce; line-height: 1.7; }
.site-footer a { display: block; margin: 6px 0; }

.dashboard-head { align-items: center; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf4ef;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
}

.admin-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #f3f6f1;
}
.admin-sidebar {
  min-height: 100vh;
  padding: 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.admin-sidebar nav { display: grid; gap: 6px; margin-top: 28px; }
.admin-sidebar nav a {
  padding: 12px;
  border-radius: 8px;
  color: #33463c;
}
.admin-sidebar nav a:hover { background: #edf4ef; }
.admin-main { padding: 22px; }
.admin-head { padding: 8px 0 18px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stats-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.stats-grid span { color: var(--muted); }
.stats-grid strong { display: block; font-size: 30px; margin-top: 8px; }
.actions, .status-form { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.table-product {
  display: flex;
  gap: 10px;
  align-items: center;
}
.table-product img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .site-nav {
    display: none;
    position: absolute;
    inset: 78px 14px auto 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .hero, .product-detail, .cart-layout, .checkout-layout, .split-feature, .admin-grid {
    grid-template-columns: 1fr;
  }
  .product-grid, .product-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-tools { grid-template-columns: 1fr 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { padding: 12px 14px; }
  .brand small { display: none; }
  .hero h1, .page-hero h1, .detail-copy h1 { font-size: 34px; }
  .hero, .page-hero, .product-detail, .cart-layout, .checkout-layout, .split-feature {
    padding-left: 14px;
    padding-right: 14px;
  }
  .category-band, .product-grid, .product-grid.compact, .form-grid, .shop-tools, .stats-grid {
    grid-template-columns: 1fr;
  }
  .section-head, .dashboard-head, .admin-head {
    display: grid;
    padding-left: 14px;
    padding-right: 14px;
  }
  .cart-row {
    grid-template-columns: 70px 1fr;
  }
  .cart-row img { width: 70px; height: 70px; }
  .cart-row input, .cart-row strong { grid-column: 2; }
  .buy-box { grid-template-columns: 1fr; }
  .admin-sidebar nav { grid-template-columns: 1fr 1fr; }
}
