:root {
  --ink: #2d2b26;
  --muted: #6d665a;
  --paper: #fffaf0;
  --paper-2: #f6eddc;
  --green: #2f4937;
  --green-2: #d8e4c2;
  --amber: #d99524;
  --amber-2: #f3c14d;
  --walnut: #7a4d25;
  --clay: #b45f38;
  --line: #e4d6bd;
  --white: #ffffff;
  --danger: #9f2d20;
  --success: #23653b;
  --shadow: 0 18px 40px rgba(45, 43, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 240, 0.94);
  border-bottom: 1px solid rgba(122, 77, 37, 0.16);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 212px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
}

.main-nav a:hover {
  background: var(--paper-2);
}

.nav-cta,
.btn-primary {
  color: var(--white) !important;
  background: var(--green);
}

.nav-cta:hover,
.btn-primary:hover {
  background: #243a2b !important;
}

.cart-pill {
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.cart-pill strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  color: var(--green);
  background: var(--green-2);
  border-radius: 50%;
  font-size: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--green);
}

.flash {
  width: min(1120px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid;
  font-weight: 700;
}

.flash-success {
  color: var(--success);
  background: #eef8ef;
  border-color: #bcd8c1;
}

.flash-error {
  color: var(--danger);
  background: #fff0ed;
  border-color: #e9b9b1;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 1.04fr);
  background: linear-gradient(90deg, rgba(255, 250, 240, 0.98), rgba(255, 250, 240, 0.7));
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 6vw, 92px) clamp(22px, 5vw, 72px);
}

.eyebrow {
  color: var(--walnut);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-heading h1 {
  margin: 14px 0 18px;
  color: var(--green);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 72px;
  line-height: 0.98;
}

.hero p,
.page-heading p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.form-actions,
.cart-actions,
.admin-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn,
.btn-primary,
.btn-outline,
.btn-danger,
.btn-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.btn-outline {
  color: var(--green);
  background: var(--white);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green-2);
}

.btn-danger {
  color: var(--white);
  background: var(--danger);
}

.sold-out-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.btn-muted {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--line);
}

.hero-media {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0));
}

.hero-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin-top: 34px;
}

.hero-badges span {
  min-height: 78px;
  padding: 14px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.section,
.page-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-header h2,
.page-heading h1,
.auth-panel h1,
.admin-title h1 {
  font-family: Georgia, 'Times New Roman', serif;
}

.section-header h2 {
  margin: 0;
  color: var(--green);
  font-size: 38px;
  line-height: 1.08;
}

.section-header p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(45, 43, 38, 0.06);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}

.product-image-wrap > img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  object-fit: cover;
}

.product-label {
  position: absolute;
  left: 50%;
  top: 54%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 58%;
  min-width: 172px;
  max-width: 238px;
  aspect-ratio: 1 / 1;
  padding: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 250, 233, 0.98), rgba(244, 214, 145, 0.95)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(217, 149, 36, 0.16));
  border: 2px solid rgba(122, 77, 37, 0.46);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px rgba(255, 250, 240, 0.55),
    inset 0 0 0 10px rgba(47, 73, 55, 0.16),
    0 14px 28px rgba(45, 43, 38, 0.2);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-2deg);
  backdrop-filter: blur(2px);
}

.product-label::before,
.product-label::after {
  content: "";
  position: absolute;
  background: rgba(122, 77, 37, 0.22);
  border-radius: 50%;
}

.product-label::before {
  inset: 12px;
  border: 1px solid rgba(122, 77, 37, 0.32);
  background: transparent;
}

.product-label::after {
  bottom: 16px;
  left: 50%;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.product-label img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 2px 2px rgba(45, 43, 38, 0.16));
}

.product-label span {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  line-height: 1.08;
}

.product-label strong {
  color: var(--green);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
}

.product-label em {
  color: var(--walnut);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  white-space: normal;
}

.product-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.product-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 21px;
}

.product-card p {
  flex: 1;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.price {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.quantity-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
}

.quantity-row input,
.form-control,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.feature-band {
  background: var(--green);
  color: var(--white);
}

.feature-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-item {
  border-left: 3px solid var(--amber-2);
  padding-left: 18px;
}

.feature-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.feature-item span {
  color: #e9eadf;
}

.page-heading {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 20px;
}

.auth-wrap,
.legal-wrap,
.contact-wrap,
.cart-wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.auth-panel,
.content-panel,
.cart-panel,
.contact-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel,
.content-panel,
.contact-panel {
  padding: clamp(22px, 4vw, 38px);
}

.auth-panel h1,
.content-panel h1,
.contact-panel h1 {
  margin-top: 0;
  color: var(--green);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.form-grid textarea {
  min-height: 116px;
  resize: vertical;
}

.hint,
.small-note {
  color: var(--muted);
  font-size: 13px;
}

.cart-panel {
  overflow: hidden;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.cart-product {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 14px;
}

.cart-product img {
  width: 86px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: var(--paper-2);
}

.cart-total {
  color: var(--green);
  font-size: 26px;
  font-weight: 900;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-list strong {
  display: block;
  color: var(--green);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 32px;
  padding: 46px clamp(18px, 4vw, 56px);
  color: #f7f2e7;
  background: #243a2b;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.site-footer p {
  max-width: 460px;
  margin: 0 0 8px;
  color: #e3decf;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  color: #fff7de;
  font-weight: 700;
}

.footer-logo {
  width: 190px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.copyright {
  padding: 12px 18px;
  color: #f7f2e7;
  background: #1d2f24;
  text-align: center;
  font-size: 13px;
}

.admin-shell {
  min-height: 100vh;
  background: #f4f0e7;
}

.admin-layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  padding: 24px;
  color: var(--white);
  background: var(--green);
}

.admin-sidebar img {
  width: 188px;
  margin-bottom: 26px;
  filter: brightness(0) invert(1);
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar a {
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 800;
}

.admin-sidebar a:hover,
.admin-sidebar .is-active {
  color: var(--ink);
  background: var(--amber-2);
}

.admin-main {
  padding: 34px;
}

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

.admin-title h1 {
  margin: 0;
  color: var(--green);
  font-size: 34px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-box strong {
  display: block;
  color: var(--green);
  font-size: 32px;
}

.admin-panel {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--green);
  background: var(--paper-2);
}

.admin-thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-form {
  max-width: 860px;
  padding: 22px;
}

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

.inline-form {
  display: inline;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 74px;
  }

  .brand img {
    width: 180px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 73px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    min-height: 340px;
  }

  .hero-copy {
    padding-top: 34px;
  }

  .hero h1,
  .page-heading h1 {
    font-size: 56px;
  }

  .product-grid,
  .feature-inner,
  .site-footer,
  .contact-grid,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .hero h1,
  .page-heading h1 {
    font-size: 40px;
  }

  .hero-badges,
  .product-grid,
  .feature-inner,
  .site-footer,
  .contact-grid,
  .admin-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td,
  .cart-table th {
    display: block;
  }

  .cart-table thead {
    display: none;
  }

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

  .cart-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-main {
    padding: 20px 16px;
  }

  .admin-title {
    align-items: start;
    flex-direction: column;
  }
}
