:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --text: #171717;
  --muted: #6a665d;
  --line: #ddd6c8;
  --accent: #b83a24;
  --accent-dark: #8f291a;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  align-items: center;
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-size: 20px;
  font-weight: 800;
}

.nav {
  align-items: center;
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.74), rgba(23, 23, 23, 0.16)),
    url("https://images.unsplash.com/photo-1636819488524-1f019c4e1c44?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #fff;
  display: flex;
  min-height: 66vh;
  padding: 80px clamp(20px, 5vw, 72px);
}

.hero__content {
  max-width: 680px;
}

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

.hero .eyebrow {
  color: #ffb199;
}

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

h1 {
  font-size: clamp(52px, 8vw, 112px);
  line-height: 0.9;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  margin-bottom: 0;
}

h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.hero__text {
  font-size: 21px;
  line-height: 1.45;
  max-width: 560px;
}

.button {
  background: var(--accent);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  margin-top: 14px;
  padding: 14px 20px;
}

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

.button--secondary {
  background: #252525;
}

.section {
  padding: 72px clamp(20px, 5vw, 72px);
}

.section__header {
  margin-bottom: 28px;
}

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

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-card__image {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 24% 20%, rgba(184, 58, 36, 0.18), transparent 28%),
    linear-gradient(135deg, #d5d0c4, #f4efe5);
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-card__body {
  padding: 20px;
}

.product-card p,
.section--split p {
  color: var(--muted);
  line-height: 1.6;
}

.product-description {
  color: var(--muted);
  line-height: 1.6;
}

.product-description summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  margin-bottom: 8px;
}

.product-description summary::-webkit-details-marker {
  display: none;
}

.product-description summary::after {
  content: " раскрыть";
  color: var(--muted);
  font-weight: 500;
}

.product-description[open] summary::after {
  content: " свернуть";
}

.product-description:not([open]) p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin-bottom: 0;
  overflow: hidden;
}

.product-description[open] p {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.product-card span {
  display: inline-block;
  font-weight: 800;
  margin-top: 12px;
}

.section--split {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
}

.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 28px;
}

.flash-list {
  left: 50%;
  max-width: 680px;
  position: fixed;
  top: 74px;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  z-index: 10;
}

.flash {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  box-shadow: 0 12px 30px rgba(23, 23, 23, 0.14);
  margin-bottom: 10px;
  padding: 14px 16px;
}

.admin-layout {
  padding: 44px clamp(20px, 5vw, 72px) 72px;
}

.admin-layout h1 {
  font-size: clamp(36px, 5vw, 68px);
  margin-bottom: 0;
}

.admin-header {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.admin-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.admin-table span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.admin-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  max-width: 960px;
  padding: 24px;
}

.compact-form {
  max-width: 680px;
}

.spaced-block {
  margin-top: 24px;
}

.admin-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 24px;
  max-width: 960px;
  padding: 24px;
}

.admin-note--inside {
  margin-top: 0;
  max-width: none;
}

.admin-note h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.admin-note p,
.admin-note dd {
  color: var(--muted);
}

.admin-note dl {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
}

.admin-note dt {
  font-weight: 800;
}

.admin-note dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.admin-form label {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 12px;
  width: 100%;
}

.auth-layout {
  display: grid;
  min-height: calc(100vh - 72px);
  padding: 56px clamp(20px, 5vw, 72px);
  place-items: start center;
}

.auth-form {
  width: min(100%, 520px);
}

.auth-form h1 {
  font-size: clamp(38px, 5vw, 64px);
  margin-bottom: 6px;
}

.order-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding-top: 22px;
}

.order-form label {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.order-form input,
.order-form textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 12px;
  width: 100%;
}

.checkbox-label {
  align-items: center;
  display: flex !important;
  gap: 10px !important;
}

.checkbox-label input {
  width: auto;
}

.admin-form textarea {
  resize: vertical;
}

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

.product-detail {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(280px, 1.2fr) minmax(280px, 0.8fr);
  padding: 56px clamp(20px, 5vw, 72px) 72px;
}

.product-gallery {
  display: grid;
  gap: 16px;
}

.product-gallery img,
.product-gallery .product-card__image {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.product-info {
  align-self: start;
  position: sticky;
  top: 110px;
}

.product-info h1 {
  font-size: clamp(40px, 5vw, 72px);
}

.product-info p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  margin: 8px 0 18px;
  padding: 8px 12px;
}

.price {
  display: block;
  font-size: 30px;
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 70vh;
  }

  .product-grid,
  .section--split,
  .form-grid,
  .product-detail {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-info {
    position: static;
  }
}
