:root {
  --ffm-lime: #2ea84a;
  --ffm-lime-dark: #1f7a34;
  --ffm-sun: #f5d000;
  --ffm-black: #1a1a1a;
  --ffm-muted: #5c5c5c;
  --ffm-bg: #f7faf6;
  --ffm-card: #fff;
  --ffm-radius: 10px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ffm-black);
  background: var(--ffm-bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.demo-banner {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.site-header {
  background: var(--ffm-card);
  border-bottom: 3px solid var(--ffm-lime);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(280px, 62vw);
  object-fit: contain;
}

.shop-hero {
  width: 100vw;
  max-width: 100vw;
  margin: -1.5rem calc(50% - 50vw) 1.5rem;
  line-height: 0;
  background: linear-gradient(90deg, #f5d000 0%, #7bc43a 55%, #2ea84a 100%);
  overflow: hidden;
}

.shop-hero img {
  display: block;
  width: 100%;
  height: clamp(140px, 28vw, 280px);
  object-fit: cover;
  object-position: left center;
}

@media (max-width: 600px) {
  .logo img {
    height: 42px;
  }
  .shop-hero img {
    height: 132px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 600;
}

.nav a:hover {
  color: var(--ffm-lime-dark);
}

.nav a.active {
  border-bottom: 2px solid var(--ffm-lime);
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: var(--ffm-lime);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
}

.cart-link [data-cart-count] {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  background: var(--ffm-black);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-link [data-cart-count][hidden] {
  display: none;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.25rem;
}

.page-lead {
  color: var(--ffm-muted);
  margin: 0 0 1.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--ffm-lime-dark);
  background: var(--ffm-lime);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
  display: flex;
  flex-direction: column;
}

.product-card__img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: #eee;
}

.product-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ffm-muted);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0.25rem 0;
}

.product-card__price {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-card__unit {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ffm-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  transition: transform 0.1s, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ffm-lime);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ffm-lime-dark);
}

.btn-secondary {
  background: #fff;
  border: 2px solid var(--ffm-black);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.cart-table th,
.cart-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.cart-table th {
  background: #f3f3f3;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-control button {
  width: 2rem;
  height: 2rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.cart-summary {
  margin-top: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  background: var(--ffm-card);
  padding: 1.25rem;
  border-radius: var(--ffm-radius);
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-summary__total {
  font-size: 1.25rem;
  font-weight: 700;
  border-top: 2px solid var(--ffm-lime);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.checkout-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.form-card {
  background: var(--ffm-card);
  padding: 1.5rem;
  border-radius: var(--ffm-radius);
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group .optional {
  font-weight: 400;
  color: var(--ffm-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--ffm-lime);
  border-color: transparent;
}

.form-error {
  color: #b00020;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--ffm-black);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--ffm-muted);
  border-top: 1px solid #e5e5e5;
}

.confirm-box {
  background: var(--ffm-card);
  padding: 2rem;
  border-radius: var(--ffm-radius);
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.confirm-box .order-id {
  font-family: monospace;
  background: #f0f0f0;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.store-notice {
  background: var(--ffm-black);
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.store-meta,
.muted,
.result-count {
  color: var(--ffm-muted);
  font-size: 0.92rem;
}

.store-meta {
  margin: -0.75rem 0 1.25rem;
}

.shop-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.search-input,
.sort-select,
.form-group select {
  padding: 0.65rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.search-input {
  flex: 1;
  min-width: 200px;
}

.search-input:focus,
.sort-select:focus,
.form-group select:focus {
  outline: 2px solid var(--ffm-lime);
  border-color: transparent;
}

.product-card__media {
  position: relative;
  display: block;
  color: inherit;
}

.product-art {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: 0.9rem;
  color: #fff;
}

.product-art--lg {
  min-height: 280px;
  border-radius: var(--ffm-radius);
  aspect-ratio: auto;
}

.product-art__mark {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.product-art__cat {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.stock-badge,
.flag {
  position: absolute;
  top: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.stock-badge {
  left: 0.65rem;
  background: #fff;
}

.stock-badge.is-ok {
  color: #1b5e20;
}

.stock-badge.is-low {
  color: #8a5a00;
}

.stock-badge.is-out {
  color: #8a1c1c;
}

.flag {
  right: 0.65rem;
  background: var(--ffm-lime);
  color: var(--ffm-black);
}

.product-card__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ffm-muted);
}

.product-card__name a:hover {
  color: var(--ffm-lime-dark);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-danger {
  background: #fff;
  color: #9b1c1c;
  border: 1px solid #e7b4b4;
}

.detail-layout {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 800px) {
  .detail-layout {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

.price-lg {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
}

.crumb {
  font-size: 0.9rem;
  color: var(--ffm-muted);
  margin: 0 0 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0.5rem 0 1rem;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.qty-control input {
  width: 3rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  font: inherit;
  padding: 0.35rem;
}

.form-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.plain-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.plain-fieldset legend {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.choice-grid {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .choice-grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .choice-grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.delivery-quote-hint {
  font-size: 0.9rem;
  color: var(--muted, #5c5c5c);
  margin-top: 0.35rem;
}

.delivery-quote-hint.is-error {
  color: #b42318;
}

.pay-now-block {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
  background: #fafafa;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65rem;
  align-items: center;
  border: 2px solid #e6e6e6;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  background: #fff;
}

.product-card__body .btn {
  margin-top: 0.75rem;
}

.choice[hidden],
.form-group[hidden],
[hidden].choice {
  display: none !important;
}

.choice span {
  grid-column: 2;
  grid-row: 2;
  color: var(--ffm-muted);
  font-size: 0.88rem;
}

.choice strong {
  grid-column: 2;
  grid-row: 1;
}

.choice:has(input:checked) {
  border-color: var(--ffm-lime-dark);
  background: #f7ffe4;
}

.choice input {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: #6b8f00;
}

.summary-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

#order-summary h2,
.order-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.table-wrap {
  overflow-x: auto;
}

.text-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
}

.order-card {
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.order-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #eee;
}

.status-pill.new { background: #e3f2fd; color: #1565c0; }
.status-pill.preparing { background: #fff3e0; color: #e65100; }
.status-pill.ready { background: #e8f5e9; color: #2e7d32; }
.status-pill.completed { background: #f3f3f3; color: #555; }
.status-pill.cancelled { background: #ffebee; color: #c62828; }

.receipt {
  text-align: left;
  max-width: 640px;
}

.receipt h1,
.lead-center {
  text-align: center;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
}

.receipt-table td {
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
}

.receipt-table td:last-child {
  text-align: right;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

@media print {
  .site-header,
  .site-footer,
  .store-notice,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .confirm-box {
    box-shadow: none;
    max-width: none;
  }
}
