:root {
  --ivory: #fff9f4;
  --petal: #f7dcd2;
  --petal-strong: #d89c8a;
  --rose: #b87664;
  --olive: #8f946f;
  --sage: #c5bfa0;
  --ink: #4d372f;
  --muted: #816b62;
  --line: rgba(184, 118, 100, 0.22);
  --shadow: 0 18px 48px rgba(126, 83, 66, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(247, 220, 210, 0.62), transparent 28rem),
    linear-gradient(135deg, #fffdf9 0%, var(--ivory) 48%, #fff4ef 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(184, 118, 100, 0.16);
}

.brand strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 0.9;
  font-weight: 700;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a,
.ghost-button,
.danger-button,
.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-links a,
.ghost-button {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-button {
  width: fit-content;
  background: var(--rose);
  color: #fffaf6;
  box-shadow: 0 14px 30px rgba(184, 118, 100, 0.26);
}

.danger-button {
  background: #9f4f4a;
  color: #fff;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(560px, 78vh, 760px);
  margin: 10px auto 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--olive);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
}

h1 {
  max-width: 740px;
  font-size: clamp(4.6rem, 12vw, 9.6rem);
  line-height: 0.8;
  font-weight: 700;
  color: var(--rose);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.hero-logo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

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

.section-heading h2 {
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.catalog-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(126, 83, 66, 0.1);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.catalog-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  background: #f3e2d8;
  overflow: hidden;
}

.catalog-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.catalog-card:hover figure img {
  transform: scale(1.04);
}

.catalog-card figcaption {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 249, 244, 0.9);
  color: var(--rose);
  font-weight: 800;
  font-size: 0.8rem;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
}

.card-body p {
  min-height: 54px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

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

.card-footer strong {
  color: var(--rose);
  font-size: 1.08rem;
}

.card-footer span {
  color: var(--olive);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.site-footer span {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--rose);
  font-size: 1.7rem;
  font-weight: 700;
}

.site-footer a {
  font-weight: 800;
}

.admin-body {
  min-height: 100vh;
}

.admin-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 34px);
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.alert {
  margin: 0 0 18px;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
}

.alert.error {
  color: #7b2f2b;
  background: #ffe4df;
}

.alert.success {
  color: #52642f;
  background: #eef5db;
}

.login-form,
.catalog-form {
  display: grid;
  gap: 14px;
}

.login-form {
  max-width: 460px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(184, 118, 100, 0.58);
  box-shadow: 0 0 0 4px rgba(247, 220, 210, 0.66);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.catalog-form h1,
.admin-list h2 {
  color: var(--rose);
  font-size: 2.4rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

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

.image-preview {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px;
}

.image-preview[hidden] {
  display: none;
}

.image-preview img {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--petal);
}

.image-preview span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
}

.admin-item img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--petal);
}

.admin-item strong,
.admin-item span {
  display: block;
}

.admin-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  color: var(--rose);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 22px 0 18px;
  }

  .hero-logo {
    width: min(420px, 100%);
    justify-self: center;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-item {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .admin-item .ghost-button,
  .admin-item form {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand strong {
    font-size: 1.7rem;
  }

  .brand small {
    font-size: 0.62rem;
  }

  h1 {
    font-size: clamp(3.8rem, 18vw, 5.4rem);
  }

  .nav-links a {
    padding: 0 13px;
  }
}
