:root {
  --ink: #2f3328;
  --muted: #747964;
  --line: #ded8c9;
  --paper: #f8f4ea;
  --paper-warm: #fffaf0;
  --panel: #fffdf7;
  --green: #7f8f68;
  --green-dark: #4f5f3f;
  --mint: #e7eadb;
  --clay: #bd7a50;
  --clay-dark: #8d593d;
  --cream: #efe5d1;
  --shell: #fbf8ef;
  --shadow: 0 18px 45px rgba(74, 82, 58, 0.14);
  color-scheme: light;
  --display-font: "Baskerville", "Libre Baskerville", "Cormorant Garamond", Georgia, serif;
  --body-font: "Avenir Next", "Optima", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-family:
    var(--body-font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(127, 143, 104, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(127, 143, 104, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(127, 143, 104, 0.24);
  background: rgba(248, 244, 234, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--display-font);
  font-size: 1.2rem;
  font-weight: 500;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--shell);
  border: 1px solid rgba(127, 143, 104, 0.4);
}

.brand-mark img {
  width: 145%;
  height: 145%;
  object-fit: cover;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-button,
.cart-trigger,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.primary-link,
.secondary-link {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.nav-button,
.secondary-button,
.secondary-link,
.ghost-button,
.icon-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.nav-button.is-active,
.primary-button,
.primary-link,
.cart-trigger {
  background: var(--green);
  color: #fff;
}

.primary-button:disabled,
.cart-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-button:hover,
.cart-trigger:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.cart-trigger span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  min-height: min(780px, calc(100vh - 72px));
  align-items: stretch;
  border-bottom: 1px solid rgba(127, 143, 104, 0.18);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: clamp(34px, 7vw, 86px) clamp(18px, 5vw, 62px);
  background:
    linear-gradient(120deg, rgba(239, 229, 209, 0.62), rgba(255, 253, 247, 0.34)),
    var(--paper);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--clay-dark);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 0;
  font-family: var(--display-font);
  font-size: clamp(3.4rem, 8vw, 7.8rem);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: 0;
  color: #3f4936;
}

.admin-header h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-family: var(--display-font);
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0;
  color: #3f4936;
}

h3 {
  margin-bottom: 8px;
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(20px, 5vw, 70px);
  background:
    radial-gradient(circle at 74% 16%, rgba(189, 122, 80, 0.18), transparent 22%),
    linear-gradient(140deg, #f9f5ea, #fffdf7 58%, #ecebdc);
}

.hero-logo {
  width: min(88%, 640px);
  max-height: min(72vh, 660px);
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 28px 34px rgba(74, 82, 58, 0.13));
}

.plant-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.plant-scene::before {
  position: absolute;
  right: -9%;
  bottom: -5%;
  width: 84%;
  height: 34%;
  border-radius: 50% 50% 0 0;
  background: rgba(39, 104, 68, 0.12);
  content: "";
}

.leaf {
  position: absolute;
  display: block;
  border-radius: 85% 15% 85% 15%;
  background: linear-gradient(135deg, #2f7d4f, #8fc77e);
  box-shadow: inset -18px -18px 30px rgba(23, 69, 45, 0.22);
  transform-origin: bottom center;
}

.leaf::after {
  position: absolute;
  inset: 18% 48% 8% auto;
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  content: "";
  transform: rotate(28deg);
}

.leaf-one {
  right: 22%;
  bottom: 29%;
  width: clamp(180px, 24vw, 310px);
  height: clamp(240px, 33vw, 420px);
  transform: rotate(-24deg);
}

.leaf-two {
  right: 42%;
  bottom: 25%;
  width: clamp(130px, 18vw, 250px);
  height: clamp(190px, 25vw, 340px);
  background: linear-gradient(135deg, #1f5f3f, #6fb061);
  transform: rotate(24deg);
}

.leaf-three {
  right: 6%;
  bottom: 20%;
  width: clamp(120px, 16vw, 230px);
  height: clamp(160px, 23vw, 310px);
  background: linear-gradient(135deg, #4f8c57, #b5d67e);
  transform: rotate(44deg);
}

.pot,
.delivery-box {
  position: absolute;
  bottom: 13%;
  display: block;
  box-shadow: var(--shadow);
}

.pot {
  width: 118px;
  height: 132px;
  border-radius: 7px 7px 28px 28px;
  background: linear-gradient(180deg, #d9895c, var(--clay));
}

.pot::before {
  position: absolute;
  top: -12px;
  left: -10px;
  width: calc(100% + 20px);
  height: 24px;
  border-radius: 999px;
  background: #e7a06f;
  content: "";
}

.pot-one {
  right: 28%;
}

.pot-two {
  right: 50%;
  bottom: 11%;
  width: 92px;
  height: 104px;
  background: linear-gradient(180deg, #f8faf7, #dfe8dc);
}

.pot-two::before {
  background: #fff;
}

.pot-three {
  right: 10%;
  width: 86px;
  height: 96px;
  background: linear-gradient(180deg, #293c32, #17241d);
}

.pot-three::before {
  background: #3f564b;
}

.delivery-box {
  left: 9%;
  width: clamp(180px, 22vw, 290px);
  height: clamp(120px, 16vw, 190px);
  border-radius: 8px 8px 24px 24px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(94, 57, 29, 0.15) 49% 51%, transparent 51%),
    linear-gradient(180deg, #d6b481, #b9864f);
}

.delivery-box::before {
  position: absolute;
  inset: 18px auto auto 22px;
  width: 42%;
  height: 28%;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 7px;
  content: "";
}

.shop-layout,
.admin-shell,
.portal-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
}

.filters,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 35px rgba(74, 82, 58, 0.08);
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  align-self: start;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(244, 238, 224, 0.9)),
    var(--panel);
}

label {
  display: grid;
  gap: 7px;
  color: #4f5a43;
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf8;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(127, 143, 104, 0.24);
  border-color: var(--green);
}

.delivery-message,
.form-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.delivery-message.is-good,
.form-message.is-good {
  color: var(--green-dark);
  font-weight: 750;
}

.delivery-message.is-bad,
.form-message.is-bad {
  color: #9b2f26;
  font-weight: 750;
}

.section-heading,
.panel-heading,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading span,
[data-admin-count] {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(74, 82, 58, 0.08);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1.08;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--mint);
}

.product-image img,
.inventory-thumb img,
.cart-thumb img,
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-plant {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 68% 24%, rgba(189, 122, 80, 0.18), transparent 22%),
    linear-gradient(135deg, #e7eadb, #fbf4e5);
}

.placeholder-plant::before {
  width: 42%;
  height: 54%;
  border-radius: 78% 22% 76% 24%;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  content: "";
  transform: rotate(-17deg);
}

.placeholder-plant::after {
  position: absolute;
  bottom: 16%;
  width: 34%;
  height: 26%;
  border-radius: 5px 5px 20px 20px;
  background: var(--clay);
  content: "";
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-category {
  margin-bottom: 5px;
  color: var(--clay-dark);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.product-details {
  min-height: 45px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.product-meta div {
  min-width: 0;
  border-radius: 8px;
  background: #f3eee0;
  padding: 10px;
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  font-weight: 780;
}

.product-footer,
.cart-summary div,
.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-family: var(--display-font);
  font-size: 1.25rem;
  font-weight: 600;
}

.delivery-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.7fr);
  gap: 24px;
  padding: 52px clamp(18px, 5vw, 62px);
  background:
    linear-gradient(135deg, rgba(79, 95, 63, 0.97), rgba(61, 70, 51, 0.98)),
    var(--green-dark);
  color: #fffdf7;
}

.delivery-band .eyebrow,
.delivery-band p,
.delivery-band dt {
  color: rgba(255, 255, 255, 0.78);
}

.delivery-band dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
}

.delivery-band dl div {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.06);
  padding: 16px;
}

.admin-header,
.portal-hero {
  margin-bottom: 22px;
}

.admin-header p,
.portal-hero p {
  margin-bottom: 0;
  color: var(--muted);
}

.portal-hero h1 {
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.magic-link-preview {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3eee0;
  padding: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.magic-link-preview a {
  color: var(--green);
  font-weight: 800;
}

.customer-orders {
  display: grid;
  gap: 12px;
}

.receipt-block {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #e7eadb;
  color: #4f5f3f;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.admin-tab {
  display: none;
}

.admin-tab.is-active {
  display: block;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(250, 246, 236, 0.94)),
    var(--panel);
}

.orders-panel,
.customer-orders-panel,
.analytics-panel {
  grid-column: 1 / -1;
}

.plant-form,
.settings-form,
.checkout-form {
  display: grid;
  gap: 14px;
}

.fulfillment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
}

.fulfillment-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #4f5a43;
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

.radio-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px;
}

.radio-card input {
  width: auto;
  min-height: auto;
  margin-top: 3px;
}

.radio-card strong,
.radio-card small {
  display: block;
}

.radio-card small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

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

.image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  min-height: 180px;
  overflow: hidden;
  border: 1px dashed #adc0b1;
  border-radius: 8px;
  background: #f5f0e4;
  color: var(--muted);
  padding: 10px;
}

.image-preview > span {
  place-self: center;
}

.admin-image-tile {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 8px;
}

.admin-image-tile.is-thumb {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(127, 143, 104, 0.18);
}

.admin-image-tile img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.admin-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventory-list,
.orders-list,
.cart-items {
  display: grid;
  gap: 12px;
}

.inventory-item,
.order-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.inventory-thumb,
.cart-thumb {
  overflow: hidden;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background: var(--mint);
}

.inventory-actions,
.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-tools {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.analytics-form {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.content-form,
.content-editor {
  display: grid;
  gap: 14px;
}

.content-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-editor label:has(textarea) {
  grid-column: 1 / -1;
}

.payment-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.analytics-answer {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3eee0;
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.small-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.04em;
}

.small-button.is-danger {
  border-color: #f0c5bf;
  color: #9b2f26;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: flex-end;
  background: rgba(47, 51, 40, 0.42);
}

.product-viewer {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  place-items: center;
  overflow: hidden;
  background: rgba(47, 51, 40, 0.48);
  padding: clamp(12px, 3vw, 34px);
}

.product-viewer.is-open {
  display: grid;
}

.product-viewer-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(16px, 3vw, 34px);
  width: min(1180px, 100%);
  height: min(820px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: clamp(14px, 3vw, 28px);
  box-shadow: 0 28px 70px rgba(47, 51, 40, 0.28);
}

.viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.viewer-gallery {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.viewer-image-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.viewer-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 72px));
  gap: 8px;
  max-height: 78px;
  overflow: hidden;
}

.viewer-thumbs button {
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 0;
}

.viewer-thumbs button.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(127, 143, 104, 0.2);
}

.viewer-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-details {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: clamp(9px, 1.7vh, 16px);
  padding: clamp(10px, 2vw, 24px);
  overflow: hidden;
}

.viewer-details h2 {
  font-size: clamp(2rem, 4.8vw, 4.2rem);
  line-height: 0.92;
}

.viewer-details .product-details {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.viewer-details .product-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viewer-details .product-footer {
  margin-top: auto;
}

.viewer-nav,
.gallery-arrow {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--green-dark);
  font-size: 1.8rem;
}

.viewer-nav {
  top: 50%;
  border-color: rgba(255, 253, 248, 0.72);
  background: rgba(79, 95, 63, 0.94);
  color: #fffdf7;
  box-shadow: 0 12px 28px rgba(47, 51, 40, 0.28);
}

.viewer-nav::after {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  width: max-content;
  border-radius: 999px;
  background: rgba(47, 51, 40, 0.82);
  color: #fffdf7;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.viewer-prev::after,
.viewer-next::after {
  content: "Plant";
}

.gallery-arrow {
  width: 34px;
  height: 34px;
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.9);
  color: var(--clay-dark);
  font-size: 1.25rem;
}

.gallery-arrow::after {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  width: max-content;
  color: var(--clay-dark);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  content: "Image";
}

.viewer-prev {
  left: 14px;
}

.viewer-next {
  right: 14px;
}

.gallery-prev {
  left: 18px;
  top: 50%;
}

.gallery-next {
  right: 18px;
  top: 50%;
}

.cart-drawer.is-open {
  display: flex;
}

.cart-panel {
  width: min(100%, 480px);
  height: 100%;
  overflow: auto;
  padding: 20px;
  background: var(--paper);
  box-shadow: -16px 0 40px rgba(47, 51, 40, 0.2);
}

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

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.cart-thumb {
  width: 64px;
  height: 64px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.cart-summary {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.total-row {
  font-size: 1.2rem;
}

.empty-state {
  border: 1px dashed #adc0b1;
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(248, 244, 234, 0.85);
  padding: 18px clamp(16px, 4vw, 48px);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-admin-link {
  border: 0;
  background: transparent;
  color: #8b968d;
  font-size: 0.78rem;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero,
  .shop-layout,
  .delivery-band,
  .admin-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-image {
    min-height: 430px;
  }

  .filters {
    position: static;
  }

  .delivery-band dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .nav-actions > * {
    flex: 1 1 auto;
  }

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

  h1 {
    font-size: clamp(3rem, 16vw, 5.5rem);
  }

  .two-column,
  .product-meta,
  .content-editor {
    grid-template-columns: 1fr;
  }

  .inventory-item,
  .order-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .inventory-actions,
  .order-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Responsive hardening: keeps cards, forms, media, and long text inside the viewport. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body,
main,
section,
article,
aside,
header,
footer,
div,
form,
fieldset,
label,
nav,
dl {
  min-width: 0;
}

p,
h1,
h2,
h3,
span,
strong,
small,
dt,
dd,
label,
button,
a,
input,
select,
textarea {
  overflow-wrap: anywhere;
  word-break: normal;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.topbar,
.nav-actions,
.hero-actions,
.admin-tabs,
.payment-links,
.site-footer {
  min-width: 0;
}

.shop-layout,
.admin-grid,
.portal-grid,
.product-grid,
.delivery-band,
.delivery-band dl,
.two-column,
.content-editor,
.fulfillment-options {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(min(100%, 360px), 1.08fr);
}

.filters,
.panel,
.product-card,
.receipt-block,
.inventory-item,
.order-item,
.cart-item,
.radio-card,
.empty-state,
.analytics-answer,
.magic-link-preview {
  max-width: 100%;
  min-width: 0;
}

.product-body,
.cart-summary,
.inventory-list,
.orders-list,
.customer-orders,
.cart-items {
  min-width: 0;
}

.inventory-item,
.order-item {
  grid-template-columns: minmax(56px, 74px) minmax(0, 1fr) minmax(min(100%, 210px), auto);
}

.cart-item {
  grid-template-columns: 64px minmax(0, 1fr) max-content;
}

.product-image,
.hero-image,
.image-preview,
.inventory-thumb,
.cart-thumb {
  flex-shrink: 0;
}

.hero-logo {
  width: min(88%, 640px);
  max-width: 100%;
}

.cart-panel {
  width: min(100vw, 480px);
}

.content-editor label,
.plant-form label,
.settings-form label,
.checkout-form label,
.login-form label,
.analytics-form label {
  min-width: 0;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .shop-layout,
  .admin-shell,
  .portal-shell {
    width: min(100%, calc(100vw - 24px));
  }

  .shop-layout,
  .admin-shell,
  .portal-shell {
    padding-block: 34px;
  }

  .section-heading,
  .panel-heading,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-tabs,
  .payment-links,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-tabs > *,
  .payment-links > *,
  .hero-actions > * {
    width: 100%;
    text-align: center;
  }

  .inventory-item,
  .order-item,
  .cart-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .product-viewer-panel {
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100vh - 18px);
    overflow: auto;
  }

  .viewer-details {
    justify-content: flex-start;
  }

  .viewer-image-frame {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .order-tools,
  .inventory-actions,
  .order-actions,
  .qty-control {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .product-viewer {
    padding: 10px;
  }

  .product-viewer-panel {
    height: calc(100vh - 20px);
    gap: 16px;
    padding: 14px;
  }

  .viewer-details {
    gap: 8px;
    padding: 8px 16px;
  }

  .viewer-details h2 {
    font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  }

  .viewer-details .product-details {
    -webkit-line-clamp: 2;
  }

  .viewer-details .product-meta div {
    padding: 8px;
  }

  .viewer-thumbs {
    max-height: 58px;
    grid-template-columns: repeat(auto-fit, minmax(44px, 54px));
  }

  .viewer-nav::after,
  .gallery-arrow::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .topbar,
  .site-footer {
    padding-inline: 12px;
  }

  .hero-copy {
    padding-inline: 14px;
  }

  .panel,
  .filters,
  .cart-panel {
    padding: 14px;
  }

  h1,
  .portal-hero h1 {
    font-size: clamp(2.35rem, 14vw, 4.4rem);
    line-height: 0.95;
  }

  h2 {
    font-size: clamp(1.35rem, 8vw, 2rem);
  }

  .brand {
    width: 100%;
  }

  .brand > span:last-child {
    min-width: 0;
  }

  .cart-trigger span {
    margin-left: 2px;
  }
}
