:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-soft: #f0e9de;
  --ink: #22312a;
  --muted: #6e756f;
  --line: #e2d8c9;
  --green: #2f5d46;
  --green-dark: #234735;
  --green-soft: #e5efe7;
  --accent: #c96b4b;
  --accent-soft: #f7e7df;
  --shadow: 0 14px 34px rgba(52, 45, 34, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(201, 107, 75, 0.09), transparent 30rem),
    radial-gradient(circle at 95% 8%, rgba(47, 93, 70, 0.1), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(226, 216, 201, 0.8);
  background: rgba(247, 243, 236, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 25px;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(47, 93, 70, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.local-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.local-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4c9a68;
  box-shadow: 0 0 0 4px rgba(76, 154, 104, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: 48px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.lead {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.summary-card {
  display: flex;
  flex-direction: column;
  min-width: 188px;
  padding: 20px 24px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), transparent 55%),
    var(--green);
  box-shadow: 0 16px 28px rgba(47, 93, 70, 0.18);
}

.summary-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.summary-label {
  max-width: 150px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.35;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  align-items: end;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.search-field label {
  padding-left: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field input::placeholder {
  color: #9a9d97;
}

.search-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 93, 70, 0.1);
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.check-field input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  background: var(--green);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--green-dark);
}

.button:active {
  transform: translateY(1px);
}

.button-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 600;
}

.button-ghost:hover {
  background: var(--surface-soft);
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 2px 14px;
}

.results-count,
.page-info {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-count {
  color: var(--ink);
  font-weight: 600;
}

.filter-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

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

.product-card {
  --card-bg: #fffdf9;
  --card-border: var(--line);
  --card-border-strong: #d3c5b0;
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), transparent 58%),
    var(--card-bg);
  box-shadow: 0 7px 20px rgba(52, 45, 34, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-card:hover {
  border-color: var(--card-border-strong);
  box-shadow: 0 15px 30px rgba(52, 45, 34, 0.09);
  transform: translateY(-3px);
}

.paper-default {
  --card-bg: #fffdf9;
  --card-border: #e2d8c9;
  --card-border-strong: #d3c5b0;
}

.paper-white {
  --card-bg: #fbf8f0;
  --card-border: #e3d9c9;
  --card-border-strong: #d0c2ad;
}

.paper-kraft {
  --card-bg: #f1e1c8;
  --card-border: #dfcaaa;
  --card-border-strong: #c9ad83;
}

.paper-pink {
  --card-bg: #f8e7e2;
  --card-border: #e7cbc5;
  --card-border-strong: #d6aea5;
}

.paper-lilac {
  --card-bg: #f0e8f4;
  --card-border: #dbcce2;
  --card-border-strong: #c4b0cf;
}

.paper-clear {
  --card-bg: #eaf3f1;
  --card-border: #cfe1dc;
  --card-border-strong: #b4cfc7;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article {
  overflow: hidden;
  max-width: 55%;
  padding: 4px 8px;
  border-radius: 7px;
  color: #6d5b4b;
  background: var(--surface-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stock-in {
  color: var(--green-dark);
  background: var(--green-soft);
}

.stock-out {
  color: #8b5543;
  background: var(--accent-soft);
}

.product-name {
  margin: 16px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.flower-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: -1px 0 10px;
}

.flower-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4e6255;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.flower-icon {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.9;
}

.composition {
  margin: 0 0 20px;
  color: #5f665f;
  font-size: 0.88rem;
  line-height: 1.5;
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

.price {
  color: var(--green-dark);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stock-count {
  color: #5f665f;
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.empty {
  padding: 64px 24px;
  border: 1px dashed #d5c8b5;
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.62);
  text-align: center;
}

.empty h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
}

.empty p {
  margin: 0 auto 20px;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 0 18px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-link {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.page-link:hover {
  border-color: #c9bba6;
  background: var(--surface-soft);
}

.page-link.current {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.page-link.disabled {
  opacity: 0.42;
  pointer-events: none;
}

.page-arrow {
  padding-inline: 15px;
}

.page-ellipsis {
  display: inline-flex;
  width: 28px;
  justify-content: center;
  color: var(--muted);
}

.site-footer {
  margin-top: 28px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(201, 107, 75, 0.45);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .summary-card {
    min-width: 0;
    width: min(100%, 320px);
  }

  .filters {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .local-note {
    font-size: 0;
  }

  .local-dot {
    width: 9px;
    height: 9px;
  }

  .hero {
    padding-top: 32px;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .lead {
    font-size: 0.95rem;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 14px;
  }

  .search-field,
  .check-field,
  .button {
    width: 100%;
  }

  .check-field {
    justify-content: flex-start;
    min-height: 44px;
  }

  .button {
    min-height: 46px;
  }

  .results-head {
    flex-direction: column;
    gap: 5px;
    padding-top: 22px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .product-card {
    min-height: 0;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 26px;
  }

  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .page-link {
    min-width: 38px;
    height: 38px;
    padding-inline: 10px;
  }

  .page-arrow {
    flex: 1;
  }

  .brand-text strong {
    font-size: 0.94rem;
  }

  .brand-text small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
