:root {
  color-scheme: light;
  --ink: #2f2331;
  --muted: #665b68;
  --purple: #512a5a;
  --paper: #faf7f0;
  --line: #e2d9df;
  --lavender: #eee5f1;
  --serif: Georgia, 'Times New Roman', serif;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #90634f; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 2; top: .75rem; left: .75rem; background: white; padding: .5rem 1rem; }
.site-header { background: #fffdf9; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: bold 1.22rem/1.12 var(--serif); }
.brand small { display: block; margin-top: 3px; color: var(--purple); font: 650 .69rem/1.2 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .15em; }
.brand-mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 50%; background: var(--purple); color: white; font: 400 1.9rem/1 system-ui, sans-serif; }
.main-nav { display: flex; gap: clamp(1rem, 3.2vw, 3rem); font-size: .94rem; }
.main-nav a { text-decoration: none; }
.main-nav a:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.saved-button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: .63rem 1rem; border: 1px solid var(--line);
  border-radius: 999px; background: #fffdf9; font-size: .94rem; font-weight: 650; text-decoration: none;
}
.saved-button > span:first-child { font-size: 1.25rem; line-height: 1; }
.saved-count { display: grid; place-items: center; min-width: 1.48rem; min-height: 1.48rem; padding-inline: .28rem; border-radius: 999px; background: var(--lavender); color: var(--purple); font-size: .76rem; }
.saved-button:hover, .button:hover { border-color: var(--purple); }
.hero {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; margin-block: 32px 58px;
  background: #eee4f0; border: 1px solid #e6d8e8; border-radius: 25px;
}
.hero-copy { container-type: inline-size; padding: clamp(32px, 5vw, 64px); align-self: center; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.04em; margin: 0; }
h1 { color: #34203a; font-size: clamp(1.9rem, 14cqi, 4rem); line-height: 1.02; }
h1 em { font-weight: inherit; color: #693974; }
.hero-copy p { max-width: 36ch; margin: 1.35rem 0 1.65rem; color: #514458; font-size: 1.04rem; }
.hero-photo { min-height: 100%; border-radius: 0 24px 24px 0; background: #d8c5b7 url('assets/hero.webp') center/cover no-repeat; }
.primary { background: var(--purple); color: white; border-color: var(--purple); padding-inline: 1.25rem; }
.primary:hover { background: #38203e; }
.catalog { scroll-margin-top: 1rem; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-intro h2, .about h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.06; }
.section-intro p { margin: .55rem 0 0; color: var(--muted); }
.search { position: relative; display: flex; align-items: center; width: min(21rem, 100%); flex-shrink: 0; }
.search input { width: 100%; padding: .75rem 1rem .75rem 2.7rem; border: 1px solid var(--line); border-radius: 999px; background: #fffdf9; }
.search input::placeholder { color: var(--muted); }
.search-icon { position: absolute; left: 1.05rem; width: .85rem; height: .85rem; border: 1.5px solid currentColor; border-radius: 50%; pointer-events: none; }
.search-icon::after { position: absolute; content: ''; width: .38rem; height: 1.5px; background: currentColor; transform: rotate(45deg); top: .66rem; left: .57rem; }
.catalog-layout { display: grid; grid-template-columns: minmax(155px, 205px) 1fr; gap: 24px 34px; margin-top: 20px; }
.category-panel h3 { margin: .4rem 0 .9rem; font-size: .92rem; }
.categories { display: grid; gap: 5px; }
.category {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left;
  min-height: 42px; padding: .43rem .75rem; border: 1px solid transparent; border-radius: 10px;
  background: transparent; font-size: .92rem;
}
.category span { color: var(--muted); font-size: .8rem; }
.category:hover, .category[aria-pressed="true"] { background: var(--lavender); color: var(--purple); }
.category[aria-pressed="true"] { font-weight: 700; }
.results { min-width: 0; }
.results-bar { display: flex; align-items: center; justify-content: space-between; min-height: 41px; gap: .75rem; margin-bottom: 14px; }
.results-bar p { margin: 0; color: var(--muted); font-size: .91rem; }
.sort { display: flex; align-items: center; gap: .5rem; font-size: .89rem; white-space: nowrap; }
.sort select { min-height: 36px; max-width: 11rem; padding: .32rem .4rem; border: 1px solid var(--line); border-radius: 7px; background: #fffdf9; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.product-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fffdf9; padding: 9px; }
.product-art { display: grid; place-items: center; min-width: 0; aspect-ratio: 1.34; border-radius: 10px; background: #f2ecf4; overflow: hidden; text-align: center; color: var(--muted); font-size: .9rem; }
.product-art[data-category="Pain relief"], .product-art[data-category="Eye & skin"] { background: #f5ece1; }
.product-art[data-category="Digestive health"], .product-art[data-category="Vitamins"] { background: #ebeee5; }
.product-art img { width: 78%; height: 78%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; }
.product-copy { padding: 13px 6px 7px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.product-copy p, .product-copy h3 { margin: 0; }
.product-copy .category-name { color: var(--purple); font-size: .75rem; font-weight: 700; }
.product-copy h3 { margin-block: .27rem .3rem; line-height: 1.3; font-size: .99rem; }
.product-copy h3 button { text-align: left; padding: 0; border: 0; background: none; font-weight: inherit; }
.product-copy h3 button:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-copy .size { color: var(--muted); font-size: .82rem; margin-bottom: .65rem; }
.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .4rem; margin-top: auto !important; color: var(--muted); font-size: .77rem; }
.product-price strong { font-size: 1.05rem; color: var(--ink); }
.save {
  display: grid; place-items: center; position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; padding: 0; border: 1px solid #ddd1df; border-radius: 50%;
  background: #fffdf9; color: var(--purple); font: 400 1.4rem/1 system-ui, sans-serif;
}
.save:hover, .save[aria-pressed="true"] { color: #592a61; background: #f3e6f4; }
.empty { grid-column: 1 / -1; margin: 0; padding: 2rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.about { margin-block: 60px; padding: clamp(1.5rem, 5vw, 3.4rem); background: var(--lavender); border-radius: 22px; }
.about p { max-width: 67ch; color: #514458; margin-bottom: 0; }
.site-footer { background: #37243c; color: #fff8fe; }
.footer-inner { display: flex; justify-content: space-between; gap: .9rem; flex-wrap: wrap; padding-block: 28px; }
.footer-inner a { text-underline-offset: 3px; }
dialog { width: min(590px, calc(100% - 24px)); max-height: 90vh; padding: 1.35rem; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fffdf9; }
dialog::backdrop { background: #211427a6; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--purple); font-weight: 650; }
.dialog-header h2, .detail h2 { line-height: 1.13; font-size: 2rem; }
.close { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.5rem; }
.detail .product-art { margin-block: .75rem 1rem; aspect-ratio: 2.15; }
.detail p { margin: .6rem 0; }
.detail .price-detail { color: var(--purple); font-size: 1.14rem; font-weight: 650; }
.detail .credit { font-size: .87rem; color: var(--muted); }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }
.saved-note { color: var(--muted); }
.saved-list { margin: 0; padding: 0; list-style: none; }
.saved-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-block: .6rem; border-top: 1px solid var(--line); }
.saved-list li button:first-child { text-align: left; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; padding: .5rem 0; }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 44px); }
  .hero { min-height: 355px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-layout { gap: 20px; }
  .search { width: min(17rem, 100%); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { min-height: 64px; }
  .main-nav { display: none; }
  .brand { font-size: 1.08rem; gap: 7px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { grid-template-columns: 1fr; margin-block: 18px 34px; }
  .hero-copy { padding: 30px 22px; }
  .hero-photo { min-height: 0; aspect-ratio: 1.58; border-radius: 0 0 24px 24px; }
  .section-intro { align-items: start; flex-direction: column; padding-bottom: 15px; }
  .search { width: 100%; }
  .catalog-layout { grid-template-columns: 1fr; margin-top: 12px; gap: 11px; }
  .category-panel h3 { margin-bottom: .45rem; }
  .categories { display: flex; flex-wrap: wrap; gap: 5px; }
  .category { min-height: 36px; padding: .35rem .52rem; border-color: var(--line); font-size: .85rem; }
  .product-grid { gap: 9px; }
  .product-card { padding: 6px; }
  .product-copy { padding-inline: 4px; }
  .save { top: 10px; right: 10px; width: 40px; height: 40px; }
  .about { margin-block: 32px; }
}
