:root {
  --background: #f7f0e7;
  --surface: #fffdf9;
  --media-bg: #f3ebe1;

  --text-primary: #3b1d14;
  --text-secondary: #8b695b;

  --accent: #e87500;
  --accent-soft: #fff0dc;

  --border: rgba(80, 45, 25, 0.08);
  --overlay: rgba(25, 15, 10, 0.62);

  --radius-card: 24px;
  --radius-media: 16px;
  --radius-pill: 999px;
  --shadow: 0 10px 28px rgba(59, 29, 20, 0.08);

  --space: 1rem;
  --page-width: 26.5rem;
  --icon-sm: 1.9rem;
  --icon-md: 3.5rem;

  --font:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  --sheet-duration: 280ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: var(--background);
  background-image: url("../assets/bg/page-bg.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-primary);
  background: transparent;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html.is-sheet-open {
  overflow: hidden;
}

body.is-sheet-open {
  overflow: hidden;
  touch-action: none;
  padding-right: var(--scrollbar-compensation, 0px);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 0.9rem var(--space) 1.6rem;
}

.site-header {
  text-align: center;
  padding: 0.55rem 0 1.15rem;
}

.site-header__heart {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
}

.site-header__logo {
  margin: 0.25rem 0 0;
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

.site-header__subtitle {
  margin: 0.3rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.site-header__slogan {
  margin: 0.6rem 0 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
}

.catalog__list {
  display: grid;
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.product-card__button {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) var(--icon-sm);
  gap: 0.85rem 0.9rem;
  align-items: center;
  width: 100%;
  min-height: 7.75rem;
  padding: 0.9rem;
  text-align: left;
}

.product-card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-media);
  background: var(--media-bg);
  overflow: hidden;
  padding: 0.4rem;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.product-card__name {
  font-size: clamp(0.92rem, 3.6vw, 1.02rem);
  font-weight: 750;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.product-card__weight,
.product-card__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.22rem 0.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
}

.product-card__price {
  background: transparent;
  color: var(--accent);
  padding-inline: 0;
}

.product-card__short {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__chevron {
  width: var(--icon-sm);
  height: var(--icon-sm);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-card__chevron svg {
  width: 0.95rem;
  height: 0.95rem;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    box-shadow: 0 14px 32px rgba(59, 29, 20, 0.12);
  }
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.7rem 0 0.75rem;
}

.divider__line {
  width: 3.5rem;
  height: 1px;
  background: rgba(59, 29, 20, 0.18);
}

.divider__heart {
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
}

.divider-text {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 650;
  line-height: 1.4;
}

.divider-text + .divider-text {
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
}

.site-footer {
  text-align: center;
  padding: 0.5rem 0 0.35rem;
}

.site-footer__heart {
  display: block;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1;
}

.site-footer__logo {
  margin: 0.25rem 0 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

.site-footer__subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  line-height: 1.4;
}

.site-footer__slogan {
  margin: 0.6rem 0 1.25rem;
  color: var(--accent);
  font-style: italic;
  font-weight: 650;
}

.site-footer__contacts {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  text-align: left;
  width: fit-content;
  max-width: 100%;
}

.site-footer__contacts li > a,
.site-footer__contacts li > span {
  display: grid;
  grid-template-columns: var(--icon-md) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: 44px;
}

.contact-icon {
  width: var(--icon-md);
  height: var(--icon-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.contact-copy__label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.contact-copy__hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.site-footer__bottom {
  margin-top: 1.55rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(59, 29, 20, 0.12);
}

.site-footer__copy,
.site-footer__made {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}

.site-footer__made {
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sheet-duration) ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(100%, var(--page-width));
  max-height: min(94dvh, 94vh);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: 0 -12px 40px rgba(25, 15, 10, 0.2);
  transform: translate3d(0, 100%, 0);
  pointer-events: none;
  transition: transform var(--sheet-duration) ease;
  overflow: hidden;
}

.sheet.is-open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.sheet__chrome {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  min-height: 2.75rem;
  padding: 0.15rem 0.35rem 0;
  overflow: visible;
}

.sheet__handle {
  width: 2.4rem;
  height: 0.28rem;
  margin: 0.7rem auto 0;
  border-radius: var(--radius-pill);
  background: rgba(59, 29, 20, 0.18);
}

.sheet__close {
  position: absolute;
  z-index: 6;
  top: 0.55rem;
  right: 0.7rem;
  width: var(--icon-md);
  height: var(--icon-md);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sheet__close svg {
  width: 1.05rem;
  height: 1.05rem;
  pointer-events: none;
}

.sheet__scroll {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 1.2rem calc(1.3rem + env(safe-area-inset-bottom, 0));
}

.sheet__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-media);
  background: var(--media-bg);
  overflow: hidden;
  padding: 0.55rem;
  position: relative;
  display: grid;
  place-items: center;
}

.sheet__media > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.sheet__media--gallery {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  touch-action: pan-y;
  aspect-ratio: auto;
  height: auto;
  overflow: visible;
  place-items: stretch;
}

.sheet__slides {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius-media) - 4px);
  overflow: hidden;
  background: var(--media-bg);
}

.sheet__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--media-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.sheet__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.sheet__slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.sheet__slide img.is-error {
  opacity: 0;
}

.sheet__slide-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 0.75rem;
  text-align: center;
  color: var(--muted, #6b635c);
  font-size: 0.9rem;
  background: var(--media-bg);
}

.sheet__slide-fallback.is-visible {
  display: grid;
}

.sheet__gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem;
  position: relative;
  z-index: 2;
}

.sheet__gallery-btn {
  appearance: none;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  background: #fff;
  color: inherit;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.sheet__gallery-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.sheet__gallery-btn:focus-visible {
  outline: 2px solid var(--accent, #c45c26);
  outline-offset: 2px;
}

.sheet__gallery-counter {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #6b635c);
  font-variant-numeric: tabular-nums;
}

.sheet__gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding-bottom: 0.1rem;
}

.sheet__gallery-dot {
  appearance: none;
  border: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  padding: 0;
  cursor: pointer;
}

.sheet__gallery-dot.is-active {
  background: var(--accent, #c45c26);
}

.sheet__body {
  padding: 1.05rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.sheet__title {
  margin: 0;
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  line-height: 1.3;
  font-weight: 800;
}

.sheet__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
}

.sheet__weight,
.sheet__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.sheet__price {
  background: transparent;
  color: var(--accent);
  padding-inline: 0;
}

.sheet__description {
  margin: 0.9rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.catalog__error {
  margin: 1.25rem 0 0;
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  background: rgba(255, 253, 249, 0.92);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.catalog__error p {
  margin: 0;
}

.catalog__error p + p {
  margin-top: 0.45rem;
}

.catalog__retry {
  margin-top: 0.9rem;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.catalog__empty {
  margin: 1rem 0 0;
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

body.is-load-error .catalog__list {
  min-height: 8rem;
}


.sheet__features {
  list-style: none;
  width: 100%;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 0.9rem;
}

.sheet__feature {
  display: grid;
  grid-template-columns: var(--icon-sm) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.sheet__feature-icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sheet__feature-icon svg,
.sheet__feature-icon img {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  display: block;
}

.sheet__feature-icon-img {
  opacity: 0;
}

.sheet__feature-icon-img.is-ready {
  opacity: 1;
}

.sheet__feature-icon-img.is-error {
  opacity: 0;
}

.sheet__feature-copy {
  min-width: 0;
  padding-top: 0.15rem;
}

.sheet__feature-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.3;
}

.sheet__feature-text {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.4;
}

.sheet__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.35rem;
  min-height: 3.15rem;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  text-align: center;
}

.sheet__action:hover {
  filter: brightness(0.97);
}

@media (max-width: 639px) {
  html {
    background-attachment: scroll;
    background-position: center top;
    background-size: 100% auto;
  }

  /* Compact mobile product sheet */
  .sheet {
    max-height: min(92dvh, 92vh);
  }

  .sheet__chrome {
    min-height: 2.5rem;
    padding-top: 0.05rem;
  }

  .sheet__handle {
    margin-top: 0.45rem;
    height: 0.24rem;
  }

  .sheet__close {
    top: 0.35rem;
    right: 0.5rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .sheet__close svg {
    width: 0.95rem;
    height: 0.95rem;
  }

  .sheet__scroll {
    padding: 0.1rem 1rem calc(0.95rem + env(safe-area-inset-bottom, 0));
  }

  .sheet__media {
    padding: 0.2rem;
  }

  .sheet__media--gallery {
    gap: 0.28rem;
    padding: 0.15rem;
  }

  .sheet__slides {
    border-radius: 12px;
  }

  .sheet__gallery-controls {
    gap: 0.35rem;
    padding: 0;
    min-height: 2.75rem;
  }

  .sheet__gallery-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.15rem;
    position: relative;
  }

  .sheet__gallery-btn::before {
    content: "";
    position: absolute;
    inset: -0.15rem;
  }

  .sheet__gallery-counter {
    font-size: 0.8rem;
  }

  .sheet__gallery-dots {
    gap: 0.3rem;
    padding-bottom: 0;
  }

  .sheet__body {
    padding-top: 0.6rem;
  }

  .sheet__meta {
    margin-top: 0.4rem;
    gap: 0.4rem;
  }

  .sheet__weight,
  .sheet__price {
    padding: 0.22rem 0.6rem;
    font-size: 0.84rem;
  }

  .sheet__price {
    padding-inline: 0;
  }

  .sheet__description {
    margin-top: 0.55rem;
    line-height: 1.5;
  }

  .sheet__features {
    margin-top: 0.75rem;
    gap: 0.7rem 0.7rem;
  }

  .sheet__action {
    margin-top: 0.85rem;
    min-height: 3rem;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    font-size: 0.98rem;
  }
}

@media (max-width: 359px) {
  :root {
    --space: 0.85rem;
  }

  .product-card__button {
    gap: 0.7rem 0.75rem;
    padding: 0.75rem;
    min-height: 7rem;
  }

  .product-card__name {
    font-size: 0.88rem;
  }

  .product-card__short {
    font-size: 0.74rem;
  }

  .sheet__scroll {
    padding-inline: 1rem;
  }
}

@media (min-width: 640px) {
  :root {
    --page-width: 40rem;
    --space: 1.25rem;
  }

  .catalog__list {
    gap: 1.1rem;
  }

  .product-card__button {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) var(--icon-sm);
    gap: 1rem 1.15rem;
    padding: 1.05rem;
    min-height: 8.75rem;
  }

  .product-card__media {
    aspect-ratio: 16 / 10;
    padding: 0.5rem;
  }

  .sheet__scroll {
    padding: 0.45rem 1.35rem calc(1.4rem + env(safe-area-inset-bottom, 0));
  }

  .sheet__media {
    padding: 0.65rem;
  }
}

@media (min-width: 900px) {
  :root {
    --page-width: min(92vw, 72rem);
    --space: 1.5rem;
  }

  .catalog__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.25rem;
  }

  .product-card__button {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) var(--icon-sm);
    gap: 0.85rem 0.9rem;
    padding: 1rem;
    min-height: 8.25rem;
  }

  .product-card__media {
    aspect-ratio: 4 / 3;
  }

  .sheet {
    width: min(100% - 2rem, 28rem);
  }

  .site-footer__contacts {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 2.5rem;
    row-gap: 1rem;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  :root {
    --page-width: min(90vw, 78rem);
  }

  .catalog__list {
    gap: 1.25rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
