:root {
  --ink: #14273a;
  --ink-soft: #294156;
  --muted: #667783;
  --line: #ddd8cf;
  --cream: #f4efe5;
  --paper: #fffdf8;
  --white: #fff;
  --rose: #c66b78;
  --rose-dark: #8d4652;
  --blush: #f5e2df;
  --sage: #71806a;
  --green: #287653;
  --shadow: 0 20px 60px rgba(20, 39, 58, .1);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1180px;
  min-height: 76px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand span { color: var(--rose-dark); }
.navlinks { display: flex; align-items: center; gap: 10px; }

.button, button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.button:hover, button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(20, 39, 58, .15); }
.button.secondary, button.secondary { background: transparent; color: var(--ink); border: 1px solid #aeb5b8; box-shadow: none; }
button.danger { background: #fff0f2; color: #a52b40; box-shadow: none; }

.hero {
  max-width: 1180px;
  min-height: 610px;
  margin: auto;
  padding: 76px 24px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 6.7vw, 91px);
  line-height: .96;
  letter-spacing: -.042em;
  font-weight: 500;
}
.hero h1 span { display: block; }

.hero p { max-width: 650px; color: var(--ink-soft); font-size: 19px; line-height: 1.65; }
.hero p, .trust-grid p { text-align: left; hyphens: none; overflow-wrap: normal; word-break: normal; }
.hero > div:first-child > .button { margin-top: 12px; }

.hero-card {
  min-height: 360px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(145deg, #fff8f5, #f4e8e3);
  box-shadow: var(--shadow);
}

.hero-card::before { content: ""; position: absolute; z-index: -1; width: 310px; aspect-ratio: 1; right: -75px; top: -62px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(235, 180, 176, .8), rgba(218, 147, 159, .42) 42%, rgba(218, 147, 159, 0) 72%); filter: blur(5px); }

.hero-card small { color: var(--rose-dark); font-weight: 850; letter-spacing: .12em; }
.hero-card strong { margin-top: 15px; font-family: Georgia, serif; font-size: clamp(31px, 3vw, 43px); line-height: 1.08; font-weight: 500; }

.wrap { max-width: 1180px; margin: auto; padding: 90px 24px; }
.trust { max-width: none; padding-left: max(24px, calc((100% - 1132px) / 2)); padding-right: max(24px, calc((100% - 1132px) / 2)); background: var(--cream); }
.trust h2, .toolbar h2 { margin: 12px 0 0; font-family: Georgia, serif; font-size: clamp(38px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; }
.trust-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.trust-grid article { padding-top: 20px; border-top: 1px solid #bcb6aa; }
.trust-grid strong { font-family: Georgia, serif; font-size: 22px; font-weight: 600; }
.trust-grid p { color: var(--ink-soft); line-height: 1.7; }

.toolbar { margin-bottom: 34px; display: flex; align-items: end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.toolbar h2 { font-size: clamp(38px, 4vw, 54px); }
.catalog-summary { margin: 9px 0 0; color: var(--muted); }
.search { width: min(380px, 100%); border: 1px solid var(--line); border-radius: 999px; padding: 14px 19px; background: #fff; color: var(--ink); font: inherit; outline: none; }
.search:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(198, 107, 120, .12); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 23px; box-shadow: 0 8px 28px rgba(20, 39, 58, .055); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.photo { aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center; padding: 8px; background: #f8f5ef; color: var(--rose-dark); font-family: Georgia, serif; font-size: 48px; font-weight: 700; text-decoration: none; }
.card .photo img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain !important; object-position: center; transition: opacity .58s ease; }
.card:hover .photo img { transform: none; }
.content { padding: 21px; display: flex; flex: 1; flex-direction: column; gap: 11px; }
.code { color: var(--rose-dark); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.card h2 { margin: 0; font-family: Georgia, serif; font-size: 21px; line-height: 1.3; font-weight: 600; }
.meta { color: var(--muted); font-size: 13px; }
.price { font-family: Georgia, serif; font-size: 27px; font-weight: 700; }
.actions { margin-top: auto; padding-top: 9px; display: flex; gap: 8px; flex-wrap: wrap; }
.empty { grid-column: 1/-1; padding: 64px; text-align: center; color: var(--muted); }

.footer { padding: 58px 24px; background: #0e2133; color: #b8c5d0; text-align: center; }
.footer-content { width: min(820px, 100%); margin: 0 auto; }
.footer p { margin: 0 0 14px; font-size: 13px; line-height: 1.6; text-align: center; text-justify: auto; hyphens: none; }
.footer .copyright { margin: 0; color: #91a4b5; }

.detail { max-width: 1050px; margin: 52px auto; padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.detail .photo { border-radius: 26px; }
.detail h1 { margin: 12px 0 16px; font-family: Georgia, serif; font-size: clamp(36px, 4vw, 50px); line-height: 1.05; letter-spacing: -.04em; font-weight: 500; }
.description { color: var(--muted); line-height: 1.75; white-space: pre-line; text-align: left; text-justify: auto; hyphens: none; }

.admin-shell { max-width: 1250px; margin: auto; padding: 32px 24px; }
.admin-head { margin-bottom: 24px; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-grid { display: grid; grid-template-columns: 390px 1fr; gap: 24px; }
.panel { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 36px rgba(20, 39, 58, .06); }
.form { display: grid; gap: 13px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; }
.form input, .form textarea, .form select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; }
.form textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.notice { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #edf9f2; color: #12643e; }
.notice.error { background: #fff0f2; color: #a51f3a; }
.admin-list { display: grid; gap: 10px; }
.admin-item { padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 16px; }
.status { padding: 5px 9px; display: inline-flex; border-radius: 99px; background: #fff0d8; color: #8a5b00; font-size: 11px; font-weight: 900; }
.status.published { background: #e7f7ed; color: #146b3b; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 66px; height: 66px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
.login { max-width: 440px; margin: 10vh auto; }
.hidden { display: none !important; }

@media (max-width: 850px) {
  .hero, .detail, .admin-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-card { min-height: 280px; border-radius: 120px 120px 24px 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: 1fr; gap: 18px; }
  .admin-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 580px) {
  .nav { min-height: 68px; }
  .navlinks .optional:first-child { display: none; }
  .brand { font-size: 24px; }
  .hero { min-height: auto; padding: 54px 22px 66px; }
  .hero h1 { font-size: 52px; }
  .hero-card { min-height: 240px; }
  .wrap { padding: 68px 22px; }
  .grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .detail h1 { font-size: 36px; }
}
