@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap');
:root {
  color-scheme: light;
  --ink: #49364e;
  --muted: #756177;
  --pink: #a93668;
  --line: #ecd8e8;
  --soft: #fbe8f1;
  --mint: #e0f5f3;
  --lavender: #eee3f5;
  --cream: #fff4d9;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #fffcfe;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}
header,
main,
footer {
  max-width: 1140px;
  margin: auto;
  padding: 28px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 154px;
  height: auto;
  border-radius: 14px;
}
.brand span {
  display: block;
  font: 9px 'DM Sans', sans-serif;
  letter-spacing: 2px;
  color: var(--muted);
}
.badge {
  font-size: 12px;
  background: var(--mint);
  padding: 12px 18px;
  border-radius: 30px;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 43% 72px 48px;
  background: linear-gradient(
    120deg,
    var(--soft),
    var(--lavender) 65%,
    var(--mint)
  );
  border-radius: 28px;
  margin: 16px 0 60px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--pink);
}
h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
}
h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.1;
  margin: 22px 0;
}
h2 {
  font-size: 34px;
  margin: 8px 0 24px;
}
.hero > p:not(.eyebrow) {
  max-width: 380px;
  line-height: 1.7;
  color: var(--muted);
}
.primary {
  display: inline-block;
  text-decoration: none;
  background: var(--pink);
  color: white;
  border-radius: 12px;
  padding: 15px 22px;
  margin-top: 16px;
}
.hero-logo {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 33%;
  height: auto;
  border-radius: 0;
}
.hero > *:not(.hero-logo) {
  position: relative;
  z-index: 1;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  color: var(--ink);
  padding: 11px 17px;
  min-height: 44px;
}
button:hover,
button[aria-pressed='true'] {
  background: var(--soft);
  border-color: var(--pink);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input {
  font: inherit;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: white;
  margin-top: 8px;
}
.search {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.categories {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 18px 0;
}
.categories button {
  white-space: nowrap;
}
.categories button:nth-child(3n + 2) {
  background: var(--mint);
}
.categories button:nth-child(3n + 3) {
  background: var(--lavender);
}
.categories button:nth-child(3n + 4) {
  background: var(--cream);
}
.categories button[aria-pressed='true'] {
  background: var(--pink);
  color: white;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  display: grid;
  grid-template-rows: 260px minmax(0, 1fr);
  height: 480px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    background: white;
    border-color: var(--pink);
  }
}
.card img,
.placeholder {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: contain;
  object-position: center;
  background: var(--soft);
}
.placeholder {
  display: grid;
  place-items: center;
  color: #c99ab0;
  font-size: 80px;
}
.card-body {
  display: grid;
  grid-template-rows: 14px 60px 28px 16px 34px;
  gap: 4px;
  min-width: 0;
  padding: 20px;
}
.card h3 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card .category,
.card .price {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card .category {
  line-height: 14px;
}
.card .discount {
  margin: 0;
  line-height: 16px;
}
.card .stock {
  margin: 0;
  line-height: 17px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.category {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pink);
}
.price {
  font-weight: 700;
  font-size: 20px;
}
.stock {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.discount {
  color: var(--pink);
  font-size: 12px;
  margin-left: 8px;
}
#status {
  font-size: 13px;
  color: var(--muted);
}
footer {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 64px;
  font-size: 12px;
  color: var(--muted);
}
.footer-logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  max-width: 680px;
  width: calc(100% - 28px);
  padding: 28px;
  color: var(--ink);
  max-height: 90vh;
}
dialog::backdrop {
  background: #38252f99;
}
.close {
  float: right;
  font-size: 24px;
}
.gallery {
  display: flex;
  overflow: auto;
  gap: 10px;
  clear: both;
  padding-top: 14px;
}
.gallery img {
  height: 280px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
}
dialog h2 {
  margin-top: 20px;
}
dialog p {
  line-height: 1.7;
  white-space: pre-line;
}
.variant {
  padding: 12px;
  background: var(--mint);
  margin: 8px 0;
  border-radius: 10px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  header,
  main,
  footer {
    padding: 20px;
  }
  .badge {
    display: none;
  }
  .hero {
    padding: 36px 24px 44px;
    margin-bottom: 40px;
  }
  .hero-logo {
    position: static;
    display: block;
    transform: none;
    width: min(100%, 280px);
    margin: 28px auto 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card img,
  .placeholder {
    height: 170px;
  }
  .card-body {
    padding: 14px;
    grid-template-rows: 14px 50px 24px 16px 34px;
  }
  .card {
    height: 370px;
    grid-template-rows: 170px minmax(0, 1fr);
    contain-intrinsic-size: auto 370px;
  }
  .card h3 {
    font-size: 20px;
  }
  .price {
    font-size: 17px;
  }
  h2 {
    font-size: 28px;
  }
  .heading {
    align-items: flex-start;
  }
  .heading button {
    font-size: 12px;
  }
  .gallery img {
    height: 230px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card:hover {
    transform: none;
  }
}
