:root {
  --bg: #f7f4ef;
  --paper: #fbfaf7;
  --text: #1e2822;
  --muted: #5a665f;
  --accent: #264733;
  --border: #d6d5cf;
  --sage: #dbe4da;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.site-brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid #c6cfc9;
  box-shadow: 0 2px 8px rgba(27, 39, 31, 0.12);
}

.brand-wordmark {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  line-height: 1.05;
  min-width: 0;
}

.brand-one-line {
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-color: var(--text);
}

.site-header-tools {
  margin-left: auto;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

.page-intro {
  margin-bottom: 2rem;
}

.kicker {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.5rem, 2.9vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 980px;
}

/* Home: primary line bold/large; secondary subtitle smaller and regular weight */
.home-archive-title {
  margin: 0.4rem 0 0;
  max-width: 980px;
  line-height: 1.24;
  font-size: clamp(1.32rem, 2.95vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-archive-title__primary {
  font-weight: 650;
}

.home-archive-title__secondary {
  display: inline;
  margin-top: 0;
  margin-left: 0.15em;
  font-size: 0.9em;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.005em;
}

.meta-table--empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.collection-subtitle {
  margin-top: -0.5rem;
  color: var(--muted);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}

.home-utility-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 1rem;
}

.home-search {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 0.85rem;
}

.home-search--header {
  width: min(460px, 42vw);
}

.home-search label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.home-search input {
  width: 100%;
  border: 1px solid var(--border);
  padding: 0.52rem 0.6rem;
  font: inherit;
  background: #fff;
}

.home-search button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.52rem 0.85rem;
  font: inherit;
  cursor: pointer;
}

.home-search button:hover {
  background: #1d3526;
}

.home-search-results {
  margin-top: 0.6rem;
}

.home-search-empty {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.home-search-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.2rem;
}

.home-search-list a {
  display: block;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  color: var(--accent);
}

.home-search-list a:hover {
  border-color: currentColor;
}

.az-catalog {
  margin: 1.4rem 0;
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 1rem;
}

.az-catalog-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.az-catalog-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.az-letter-nav {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.az-letter-nav a {
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  background: #fff;
  font-size: 0.82rem;
  color: var(--accent);
}

.az-letter-nav a:hover {
  border-color: var(--accent);
}

.az-groups {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.az-group {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.7rem;
}

.az-group h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.az-group ul {
  margin: 0;
  padding-left: 1rem;
}

.az-group li {
  margin: 0.1rem 0;
}

.az-group a {
  text-decoration: none;
}

.az-group a:hover {
  text-decoration: underline;
}

.collection-card,
.product-card {
  border: 1px solid var(--border);
  background: var(--paper);
}

.collection-card a,
.product-card a {
  text-decoration: none;
}

.image-wrap {
  aspect-ratio: 4 / 3;
  background: var(--sage);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.collection-card:hover img,
.product-card:hover img {
  transform: scale(1.02);
}

.content {
  padding: 0.95rem;
}

.content h3 {
  margin: 0;
  font-size: 1.2rem;
}

.content p {
  margin: 0.45rem 0;
  color: var(--muted);
}

.meta {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr;
  gap: 0.8rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--paper);
}

.toolbar label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--border);
  padding: 0.5rem 0.55rem;
  font: inherit;
  background: #fff;
}

.filters-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.result-count {
  color: var(--muted);
  margin: 0 0 0.6rem;
}

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

.botanical {
  font-style: italic;
  min-height: 1.2rem;
}

.product-card-sku {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.product-card-sku-label {
  font-family: var(--font-body, inherit);
  font-weight: 600;
  color: var(--ink, inherit);
  margin-right: 0.25rem;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  font-size: 0.72rem;
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  background: #fff;
}

.breadcrumbs {
  margin-bottom: 1rem;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1.25rem;
}

.detail-main,
.detail-side {
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 1rem;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.detail-gallery figure {
  margin: 0;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--border);
}

.detail-copy {
  margin-top: 1rem;
}

.detail-copy h2 {
  margin: 0;
}

.botanical-line {
  margin: 0.4rem 0 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.detail-sku {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.detail-sku-label {
  font-family: var(--font-body, inherit);
  font-weight: 600;
  color: var(--ink, inherit);
  margin-right: 0.35rem;
}

.cta-row {
  margin-bottom: 0.9rem;
}

.buy-btn {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent);
}

.buy-btn:hover {
  background: #1d3526;
}

.availability-note {
  margin: 0;
  color: #8a4b00;
}

.description-html {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.meta-table {
  margin: 0;
}

.meta-row {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0;
}

.meta-row dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-icon {
  display: inline-grid;
  place-items: center;
  width: 0.92rem;
  height: 0.92rem;
  color: #5f7266;
  flex: 0 0 0.92rem;
}

.meta-icon svg {
  width: 100%;
  height: 100%;
}

.meta-row dd {
  margin: 0.1rem 0 0;
}

.ad-slot {
  margin: 1.1rem 0;
  border-top: 1px solid #c5cec8;
  border-bottom: 1px solid #c5cec8;
  color: #394840;
  background: linear-gradient(180deg, #f2f5f1 0%, #eef3ec 100%);
  padding: 0.75rem 0.95rem;
}

.ad-slot-kicker {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #68766f;
}

.ad-slot span {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.ad-slot--band {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
}

.ad-slot--inline {
  max-width: 760px;
}

.ad-slot--sidebar {
  margin-top: 1rem;
  border-left: 2px solid #bcc8c0;
  border-right: 0;
  border-top: 1px solid #d8dfd8;
  border-bottom: 1px solid #d8dfd8;
  padding: 0.8rem;
}

.site-footer {
  margin-top: 2.4rem;
  padding: 1.25rem 2rem 2.2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--paper);
  font-size: 0.88rem;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.4rem;
}

.site-footer-section h4 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-footer-section p {
  margin: 0;
}

.site-footer-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.site-footer-section a {
  text-decoration: none;
}

.site-footer-section a:hover {
  text-decoration: underline;
}

.contact-panel {
  max-width: 720px;
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 1rem;
}

.contact-panel p {
  margin: 0 0 0.8rem;
}

.contact-form {
  display: grid;
  gap: 0.55rem;
}

.contact-form label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.55rem 0.6rem;
  font: inherit;
}

.contact-form button {
  justify-self: start;
  margin-top: 0.35rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.52rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.contact-form button:hover {
  background: #1d3526;
}

.contact-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.contact-note--info {
  color: var(--muted);
}

.contact-note--success {
  color: #1f6a36;
}

.contact-note--warning {
  color: #8a4b00;
}

.contact-note--error {
  color: #9b1c1c;
}

.empty-state,
.error-state {
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 1rem;
}

.image-fallback,
.detail-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    padding: 0.95rem;
  }
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .site-header {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .site-brand {
    flex: 1 1 auto;
    order: 1;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }
  .brand-one-line {
    font-size: 1.2rem;
    white-space: normal;
  }
  .site-nav {
    margin-left: auto;
    order: 2;
  }
  .site-header-tools {
    width: 100%;
    margin-left: 0;
    order: 3;
  }
  .site-header .home-search {
    width: 100%;
    margin-top: 0.35rem;
  }
  .site-nav {
    border-top: 1px solid var(--border);
    padding-top: 0.35rem;
  }
  .site-nav a {
    display: inline-block;
    padding: 0.2rem 0;
  }
  .home-utility-row {
    justify-content: stretch;
  }
  .home-search {
    width: 100%;
  }
  .home-search-controls {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 1rem 1rem 1.6rem;
  }
  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 0.85rem;
  }
  .brand-one-line {
    font-size: 1.08rem;
  }
  h1 {
    font-size: 1.28rem;
  }
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 0.8rem;
  }
  .detail-main,
  .detail-side {
    padding: 0.8rem;
  }
  .toolbar {
    padding: 0.75rem;
    margin: 1rem 0;
  }
  .site-footer-grid {
    grid-template-columns: 1fr;
  }
}
