:root {
  --background: hsl(151 12% 92%);
  --panel: hsl(143 10% 97% / 0.88);
  --panel-strong: hsl(143 10% 98%);
  --section-surface: hsl(147 16% 84% / 0.78);
  --panel-border: hsl(151 28% 42% / 0.18);
  --image-fallback: linear-gradient(145deg, hsl(151 42% 39% / 0.28), hsl(139 26% 78% / 0.58));
  --ink: hsl(153 18% 16%);
  --muted: hsl(151 10% 40%);
  --accent: hsl(151 42% 39%);
  --accent-deep: hsl(151 46% 23%);
  --accent-soft: hsl(141 32% 52%);
  --field: hsl(143 10% 88%);
  --line: hsl(151 14% 30% / 0.14);
  --shadow: 0 22px 55px hsl(151 30% 24% / 0.12);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(71, 118, 132, 0.2), transparent 34%),
    radial-gradient(circle at bottom right, rgba(116, 148, 96, 0.18), transparent 26%),
    linear-gradient(180deg, #edf5f2 0%, var(--background) 100%);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.cart-panel,
.product-card {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
  border-radius: 20px;
}

.hero-card {
  padding: 28px;
  border-radius: 30px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: linear-gradient(160deg, rgba(45, 85, 96, 0.94), rgba(72, 115, 96, 0.94));
  color: #eff8f5;
}

.hero-card p,
.hero-card span {
  margin: 0;
}

.hero-card strong {
  font-size: 1.8rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero h1,
.section-heading h2,
.cart-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  max-width: none;
  width: 100%;
}

.hero-text {
  max-width: 42rem;
  margin: 20px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-trust,
.footer-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-pill,
.footer-points span {
  margin: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(76, 122, 116, 0.1);
  color: var(--accent-deep);
  font-size: 0.88rem;
}

.footer-link {
  margin: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(76, 122, 116, 0.1);
  color: var(--accent-deep);
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid rgba(76, 122, 116, 0.24);
}

.footer-link:hover {
  background: rgba(76, 122, 116, 0.18);
}

.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.facebook-link::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #1877f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M13.72 21v-8.2h2.77l.41-3.2h-3.18V7.56c0-.93.26-1.56 1.59-1.56h1.7V3.14c-.29-.04-1.29-.12-2.45-.12-2.43 0-4.1 1.48-4.1 4.21V9.6H8v3.2h2.46V21h3.26z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  flex: 0 0 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note,
.section-note,
.checkout-helper,
.footer-copy,
.product-detail-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.hero-note {
  margin-top: 16px;
  max-width: 40rem;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  margin-top: 28px;
}

.inventory-section {
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--section-surface), rgba(255, 255, 255, 0.24));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, var(--panel-strong), var(--panel)),
    var(--panel);
  border: 1px solid var(--panel-border);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-card:focus-visible,
.button:focus-visible,
.checkout-form input:focus-visible,
.checkout-form textarea:focus-visible,
.detail-modal-close:focus-visible,
.detail-modal-thumb:focus-visible,
.cart-actions button:focus-visible,
.mobile-cart-button:focus-visible {
  outline: 3px solid hsl(151 60% 34% / 0.65);
  outline-offset: 3px;
}

.product-image {
  min-height: 190px;
  border-radius: 14px;
  background: var(--image-fallback);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 180ms ease, opacity 180ms ease;
}

.product-image:not(.is-loaded) {
  opacity: 0.82;
}

.product-meta,
.product-footer,
.summary-row,
.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.product-category,
.product-stock,
.cart-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(76, 122, 116, 0.1);
  color: var(--accent-deep);
  font-size: 0.8rem;
}

.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-name {
  margin: 0;
  font-size: 1.45rem;
}

.product-description,
.product-unit,
.empty-cart,
.status-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.product-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-detail-hint {
  font-size: 0.88rem;
}

.product-price,
.summary-row strong {
  font-size: 1.2rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active,
.mobile-cart-button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cart-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-toggle-count {
  min-width: 1.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(24, 50, 43, 0.12);
  color: inherit;
  text-align: center;
  line-height: 1;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #f3faf7;
}

.button-secondary {
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.button-block {
  width: 100%;
}

.cart-panel {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 18px;
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
}

.cart-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.cart-open {
  overflow: hidden;
}

.process-section,
.site-footer {
  margin-top: 28px;
}

.process-section {
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(227, 238, 233, 0.75));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.compact-heading {
  margin-bottom: 16px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.process-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(76, 122, 116, 0.12);
}

.process-card strong,
.process-card p {
  margin: 0;
}

.process-card p {
  margin-top: 10px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 18px 4px 6px;
}

.mobile-cart-button {
  display: none;
}

.mobile-submit-bar {
  display: none;
}


.detail-modal[hidden] {
  display: none;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 26, 30, 0.58);
  backdrop-filter: blur(8px);
}

.detail-modal-panel {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  margin: 5vh auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 251, 249, 0.97), rgba(234, 244, 239, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 28px 80px rgba(12, 35, 39, 0.24);
  padding: 22px;
}

.detail-modal-close {
  margin-left: auto;
  display: block;
  border: 0;
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 14px;
}

.detail-modal-image {
  min-height: 420px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(45, 85, 96, 0.18), rgba(192, 214, 203, 0.5));
  background-size: cover;
  background-position: center;
}

.detail-modal-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.detail-modal-thumb {
  min-height: 74px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(145deg, rgba(45, 85, 96, 0.18), rgba(192, 214, 203, 0.5));
  background-size: cover;
  background-position: center;
}

.detail-modal-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-modal-copy h2,
.detail-modal-copy p,
.detail-modal-summary strong {
  margin: 0;
}

.detail-modal-description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.detail-modal-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-modal-summary {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(76, 122, 116, 0.08);
}

.detail-modal-summary strong {
  font-size: 1.6rem;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.cart-close {
  display: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.cart-item {
  background: var(--panel-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.cart-item p,
.cart-item strong {
  margin: 0;
}

.cart-actions {
  display: flex;
  gap: 8px;
}

.cart-actions button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--field);
  cursor: pointer;
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.cart-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
  background: var(--panel);
}

.checkout-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.checkout-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.checkout-form label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.human-check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.human-prompt {
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--field);
  color: var(--ink);
}

.refresh-check-button {
  padding: 10px 14px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkout-form input,
.checkout-form textarea {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 13px 14px;
  background: var(--field);
  color: var(--ink);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: rgba(76, 122, 116, 0.5);
}

.status-message {
  min-height: 24px;
  margin-top: 12px;
}

@media (max-width: 960px) {
  .hero,
  .main-layout {
    grid-template-columns: 1fr;
  }

  .inventory-section {
    padding: 18px;
  }

  .hero-copy {
    padding: 28px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 11vw, 3.5rem);
  }

  .site-footer,
  .process-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-modal-panel {
    width: calc(100vw - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    overflow: auto;
  }

  .detail-modal-grid {
    grid-template-columns: 1fr;
  }

  .detail-modal-image {
    min-height: 280px;
  }

  .cart-panel {
    position: static;
    overflow: hidden;
    margin-top: 18px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    max-height: none;
  }

  .cart-close {
    display: none;
  }

  .cart-body {
    overflow-y: auto;
    max-height: min(60vh, 540px);
    padding-bottom: 0;
  }

  .cart-footer {
    position: static;
    padding-top: 14px;
    padding-bottom: 0;
    margin-top: 0;
    background: transparent;
  }

  .checkout-actions {
    margin-top: 12px;
  }

  .mobile-cart-button {
    display: none;
  }

  .mobile-submit-bar {
    position: fixed;
    right: 16px;
    left: 16px;
    bottom: 16px;
    z-index: 12;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(244, 249, 246, 0.96);
    box-shadow: 0 18px 40px rgba(23, 52, 48, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
  }

  .mobile-submit-bar[hidden] {
    display: none;
  }

  .mobile-submit-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .mobile-submit-bar .button {
    width: 100%;
  }

  .page-shell {
    padding-bottom: 132px;
  }

}

@media (max-width: 480px) {
  .page-shell {
    padding: 16px 14px 92px;
  }

  .hero-copy,
  .inventory-section,
  .process-section,
  .cart-panel {
    border-radius: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .button,
  .hero-actions .cart-toggle-button {
    width: 100%;
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-description {
    -webkit-line-clamp: 3;
  }

  .detail-modal-image {
    min-height: 220px;
  }

  .mobile-submit-bar {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }
}