@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap");

:root {
  --page: #f7f8f6;
  --surface: #ffffff;
  --surface-soft: #f8f9f7;
  --ink: #172126;
  --muted: #6f7b82;
  --line: #e6e9e3;
  --accent: #ffcc19;
  --accent-hover: #ffda55;
  --green: #516a60;
  --green-dark: #2d4139;
  --red: #ba3b32;
  --shadow-soft: 0 12px 30px rgba(26, 37, 32, 0.08);
  --shadow-card: 0 6px 18px rgba(21, 31, 27, 0.06);
  --radius: 10px;
  --radius-large: 24px;
  --container: 1170px;
  --content: 1110px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Rubik, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body.drawer-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
  padding: 8px max(18px, calc((100vw - var(--container)) / 2));
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(18, 26, 31, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  width: 62px;
}

.brand img {
  width: 100%;
}

.main-nav {
  display: flex;
  gap: 36px;
  align-items: center;
  color: #2c373d;
  font-size: 13px;
  font-weight: 700;
}

.main-nav a {
  transition: color 0.18s ease;
}

.main-nav a:hover {
  color: var(--green);
}

.cart-button {
  justify-self: end;
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.cart-button svg,
.icon-button svg,
.search-field svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-button svg {
  width: 26px;
  height: 26px;
}

.cart-button span {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.section {
  width: min(calc(100% - 36px), var(--container));
  max-width: none;
  margin: 0 auto;
  padding: 58px 0;
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 24px;
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(18, 26, 31, 0.06);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
  height: 456px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  height: 100%;
  padding: 58px 34px;
}

.hero-media {
  min-height: 0;
  height: 100%;
  padding: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 520px;
  margin-bottom: 20px;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.lead {
  margin-bottom: 0;
  color: #75818a;
  font-size: 20px;
  font-weight: 600;
}

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

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

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

.button-primary {
  background: var(--accent);
  color: var(--ink);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-ghost,
.button-light {
  background: #f4f6f3;
  color: #39444a;
  border-color: var(--line);
}

.button-ghost:hover,
.button-light:hover {
  background: #eef2ec;
}

.button-small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.benefits {
  width: min(calc(100% - 36px), var(--content));
  padding-top: 66px;
  padding-bottom: 92px;
}

.benefits > h2 {
  margin-bottom: 54px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.benefit,
.product-card,
.delivery {
  background: var(--surface);
  border: 1px solid rgba(18, 26, 31, 0.05);
  border-radius: var(--radius);
}

.benefit {
  position: relative;
  min-height: 166px;
  padding: 22px 58px 20px 18px;
  box-shadow: var(--shadow-card);
}

.benefit-icon {
  position: absolute;
  top: 20px;
  right: 16px;
  display: block;
  width: 44px;
  height: 44px;
  font-size: 38px;
  line-height: 1;
}

.benefit h3 {
  min-height: 38px;
}

.benefit p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.muted {
  color: var(--muted);
}

.catalog-section {
  max-width: none;
  width: 100%;
  padding: 58px max(18px, calc((100vw - var(--container)) / 2)) 82px;
  background: #f2f3f1;
}

.section-head {
  max-width: var(--content);
  margin: 0 auto 30px;
}

.catalog-meta {
  max-width: var(--content);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.catalog-meta .muted {
  margin: 0;
  font-size: 12px;
}

.catalog-tools {
  margin: 0;
  display: grid;
  grid-template-columns: 210px 210px;
  gap: 14px;
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: #879097;
  transform: translateY(-50%);
}

.search-field input,
.catalog-tools select,
form input,
form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
}

.catalog-tools select {
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, #6f7b82 50%), linear-gradient(135deg, #6f7b82 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.search-field input {
  padding-left: 42px;
}

form textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
}

.search-field input:focus,
.catalog-tools select:focus,
form input:focus,
form textarea:focus {
  border-color: #9db3a9;
  box-shadow: 0 0 0 3px rgba(73, 103, 89, 0.12);
}

.filters {
  max-width: var(--content);
  margin: 0 auto;
  display: none;
  flex-wrap: wrap;
  gap: 9px;
}

.filter {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 14px;
  color: #4c585e;
  font-size: 12px;
  font-weight: 700;
}

.filter.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.products-grid {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.product-image-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-image-button img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.product-card:hover .product-image-button img {
  transform: scale(1.025);
}

.product-body {
  padding: 12px 10px 14px;
}

.product-card .product-category {
  display: none;
}

.product-category {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.product-body h3 {
  min-height: 38px;
  margin-bottom: 12px;
  font-size: 14px;
}

.product-body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.product-bottom {
  display: grid;
  gap: 12px;
}

.product-bottom strong {
  font-size: 16px;
}

.product-bottom > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.delivery {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 58px;
  align-items: center;
  padding: 56px 34px;
  margin-top: 72px;
  margin-bottom: 64px;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}

.delivery-copy > p {
  max-width: 360px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 500;
}

.delivery-copy img {
  width: 100%;
  margin-top: 26px;
  max-height: 260px;
  object-fit: contain;
}

.delivery-rules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-top: 0;
}

.delivery-rules span {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #263238;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.34;
}

.delivery-rules b {
  display: block;
  width: 46px;
  margin-right: 0;
  background: transparent;
  box-shadow: none;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.order-form {
  display: grid;
  gap: 14px;
}

form label span {
  display: block;
  margin-bottom: 7px;
  color: #3e4a50;
  font-size: 12px;
  font-weight: 700;
}

.check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.check input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.check span {
  margin: 0;
  font-weight: 500;
}

.form-status {
  min-height: 22px;
  margin: 0;
  font-weight: 700;
}

.form-status[data-type="success"] {
  color: var(--green);
}

.form-status[data-type="error"] {
  color: var(--red);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 36px max(18px, calc((100vw - var(--container)) / 2));
  background: #161b1d;
  color: #d8ddd9;
}

.site-footer img {
  width: 76px;
  filter: brightness(0) invert(1);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links-legal {
  flex-direction: column;
  gap: 8px;
  color: #929a9a;
  font-size: 12px;
}

.site-footer > div:last-child {
  justify-content: flex-end;
}

.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 18px;
}

.legal-page .button {
  margin-bottom: 32px;
}

.legal-page h1 {
  max-width: none;
}

.legal-page p {
  color: var(--muted);
  font-size: 16px;
}

.legal-page h2 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: 22px;
}

.legal-page h3 {
  margin-top: 22px;
  margin-bottom: 10px;
  font-size: 17px;
}

.legal-page ul,
.legal-page ol {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--muted);
}

.legal-page li {
  padding-left: 2px;
}

.legal-note {
  margin: 0 0 26px;
  border: 1px solid rgba(73, 103, 89, 0.16);
  border-radius: var(--radius);
  background: #f5f8f3;
  padding: 14px 16px;
  color: #3f5149;
  font-weight: 500;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 16, 18, 0.48);
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: min(470px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  box-shadow: -20px 0 48px rgba(0, 0, 0, 0.14);
  overflow: auto;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.drawer-head h2 {
  margin: 0;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.cart-items {
  display: grid;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 78px;
  height: 78px;
  border-radius: var(--radius);
  object-fit: cover;
}

.cart-item h3,
.cart-item p {
  margin-bottom: 6px;
}

.quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quantity button {
  min-width: 31px;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f7f4;
  font-weight: 700;
}

.quantity span {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
}

.cart-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f9f7;
  padding: 16px;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary .total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.cart-summary p,
.empty {
  margin: 0;
  color: var(--muted);
}

.order-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-dialog {
  width: min(820px, calc(100vw - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-soft);
}

.product-dialog::backdrop {
  background: rgba(10, 16, 18, 0.5);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.dialog-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  padding: 28px;
}

.dialog-grid > img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.dialog-grid dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.dialog-grid dl div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.dialog-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dialog-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}

@media (max-width: 1120px) {
  :root {
    --container: 940px;
  }

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    justify-content: center;
    gap: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    max-width: 680px;
    height: auto;
  }

  .hero-copy {
    min-height: 0;
    padding: 42px 30px 34px;
  }

  .hero-media {
    height: auto;
  }

  .hero-media img {
    aspect-ratio: 1.45;
    height: auto;
  }

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

  .delivery,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .delivery {
    gap: 22px;
  }

  .delivery-copy img {
    order: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 60px;
    padding: 7px 14px;
  }

  .brand {
    width: 54px;
  }

  .main-nav {
    display: none;
  }

  .section {
    padding: 42px 14px;
  }

  .hero {
    margin-top: 14px;
    border-radius: 18px;
  }

  .hero-copy {
    padding: 34px 22px 28px;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 25px;
  }

  .lead {
    font-size: 17px;
  }

  .button {
    min-height: 40px;
    padding-inline: 16px;
  }

  .benefits {
    padding-top: 44px;
  }

  .benefits > h2 {
    margin-bottom: 22px;
  }

  .catalog-tools,
  .catalog-meta,
  .products-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    margin-bottom: 16px;
  }

  .product-image-button img {
    aspect-ratio: 1;
  }

  .product-body h3 {
    min-height: auto;
  }

  .delivery {
    padding: 24px;
    border-radius: 18px;
  }

  .product-bottom > div {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .site-footer > div:last-child {
    justify-content: flex-start;
  }
}

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

  .button {
    padding-inline: 12px;
  }

  .product-bottom > div {
    grid-template-columns: 1fr;
  }

  .cart-drawer {
    padding: 18px 14px;
  }
}
