:root {
  --bg: #fff8f2;
  --surface: #ffffff;
  --surface-warm: #f8eadf;
  --surface-red: #8f1d2c;
  --surface-red-dark: #671420;
  --accent: #c89a54;
  --text: #241716;
  --muted: #766665;
  --line: #ead7cc;
  --shadow: 0 18px 50px rgba(67, 28, 23, 0.14);
  --radius: 8px;
  --header-offset: 92px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.cart-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 86vh;
  background:
    linear-gradient(90deg, rgba(39, 19, 18, 0.86), rgba(90, 31, 31, 0.62), rgba(255, 248, 242, 0.24)),
    url("images/Медовик.jpg") center / cover no-repeat,
    linear-gradient(135deg, #7d1b29, #f7dfc8);
  color: #fff;
}

.hero__inner,
.menu,
.info-band,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand,
.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 700;
}

.brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.topbar__phone {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.14);
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  padding: 88px 0 56px;
}

.hero__copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.cart-drawer h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(42px, 8vw, 84px);
}

.hero__lead {
  max-width: 600px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 24px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button--primary {
  background: var(--surface-red);
  color: #fff;
  box-shadow: 0 12px 28px rgba(103, 20, 32, 0.26);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--surface-red-dark);
}

.button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button--full {
  width: 100%;
}

.hero__panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero__panel div {
  display: grid;
  gap: 4px;
}

.hero__panel-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.menu {
  padding: 56px 0 28px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.category-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px 24px;
  padding: 10px 16px;
  background: rgba(255, 248, 242, 0.92);
  backdrop-filter: blur(14px);
  border-block: 1px solid rgba(234, 215, 204, 0.72);
}

.category-nav__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.category-button.is-active {
  border-color: var(--surface-red);
  background: var(--surface-red);
  color: #fff;
}

.catalog {
  display: grid;
  gap: 38px;
}

.category-section {
  scroll-margin-top: var(--header-offset);
}

.category-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.category-section h3 {
  margin: 0;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.15;
}

.category-section__count {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

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

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(234, 215, 204, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(67, 28, 23, 0.08);
}

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-warm);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(143, 29, 44, 0.12), rgba(200, 154, 84, 0.2)),
    var(--surface-warm);
  color: var(--surface-red-dark);
  font-weight: 900;
  text-align: center;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.product-card h4 {
  margin: 0;
  font-size: 19px;
  line-height: 1.18;
}

.product-card__description {
  min-height: 48px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.product-card__bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.product-card__price {
  color: var(--surface-red-dark);
  font-size: 22px;
  font-weight: 900;
}

.quantity-control {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.quantity-control button,
.cart-item__controls button,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--surface-red-dark);
  font-weight: 900;
}

.quantity-control span {
  text-align: center;
  font-weight: 900;
}

.cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-red);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.cart-fab__icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

.cart-fab__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cart-fab strong {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--surface-red);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  background: rgba(34, 20, 18, 0.42);
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cart-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  display: flex;
  width: min(460px, 100%);
  max-height: 100vh;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -18px 0 50px rgba(34, 20, 18, 0.18);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer__header .eyebrow {
  margin-bottom: 4px;
}

.cart-drawer h2 {
  font-size: 28px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-warm);
  font-size: 28px;
  line-height: 1;
}

.cart-drawer__body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfb;
}

.cart-item__name {
  margin: 0 0 4px;
  font-weight: 900;
}

.cart-item__meta,
.cart-item__sum {
  color: var(--muted);
  font-size: 14px;
}

.cart-item__sum {
  font-weight: 800;
}

.cart-item__controls {
  display: grid;
  grid-template-columns: 32px 34px 32px;
  align-items: center;
  overflow: hidden;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cart-item__controls span {
  text-align: center;
  font-weight: 900;
}

.cart-item__remove {
  grid-column: 1 / -1;
  min-height: 34px;
  margin-top: 6px;
  border-top: 1px solid var(--line) !important;
  color: var(--muted) !important;
}

.cart-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  font-size: 20px;
}

.cart-total strong {
  color: var(--surface-red-dark);
  font-size: 24px;
}

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

.order-form label,
.order-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.order-form span,
.order-form legend {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.order-form input[type="text"],
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfb;
  color: var(--text);
  outline: 0;
}

.order-form input[type="text"] {
  min-height: 46px;
  padding: 0 12px;
}

.order-form textarea {
  resize: vertical;
  padding: 12px;
}

.order-form input:focus,
.order-form textarea:focus {
  border-color: var(--surface-red);
  box-shadow: 0 0 0 3px rgba(143, 29, 44, 0.12);
}

.radio-card {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  background: #fffdfb;
}

.radio-card input {
  accent-color: var(--surface-red);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--surface-red-dark);
  font-weight: 800;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 34px 0 90px;
}

.info-band__item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-band__item span {
  color: var(--accent);
  font-weight: 900;
}

.info-band__item strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.info-band__item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 96px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong,
.footer a {
  color: var(--text);
}

.footer p {
  margin: 4px 0 0;
}

@media (max-width: 980px) {
  .hero__content {
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .hero__panel {
    max-width: 520px;
  }

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

  .info-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --header-offset: 82px;
  }

  .hero {
    min-height: 84vh;
  }

  .hero__inner,
  .menu,
  .info-band,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
  }

  .brand {
    font-size: 15px;
  }

  .topbar__phone {
    min-height: 38px;
    padding: 8px 11px;
  }

  .hero__content {
    padding: 42px 0 34px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero__actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .menu {
    padding-top: 36px;
  }

  .section-heading p:not(.eyebrow) {
    font-size: 16px;
  }

  .category-nav {
    margin-bottom: 20px;
  }

  .category-section__header {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

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

  .product-card {
    flex-direction: row;
  }

  .product-card__media {
    width: 38%;
    min-width: 124px;
    aspect-ratio: auto;
  }

  .product-card__body {
    padding: 13px;
  }

  .product-card__description {
    min-height: 0;
    margin-bottom: 12px;
  }

  .product-card h4 {
    font-size: 17px;
  }

  .product-card__price {
    font-size: 19px;
  }

  .cart-fab {
    right: 14px;
    bottom: 14px;
  }

  .cart-drawer {
    top: auto;
    width: 100%;
    height: min(92vh, 760px);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(100%);
  }

  .cart-drawer.is-open {
    transform: translateY(0);
  }

  .cart-drawer__header,
  .cart-drawer__body {
    padding-inline: 16px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .product-card {
    min-height: 188px;
  }

  .product-card__media {
    min-width: 112px;
  }

  .product-card__description {
    font-size: 13px;
  }

  .quantity-control {
    grid-template-columns: 38px 1fr 38px;
  }
}
