:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #2e2428;
  background: #fffcf9;
  --berry: #7c2945;
  --rose: #fbecf0;
  --dust: #625257;
  --border: #e3ccd2;
  --surface: white;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--berry); }
button, input, textarea, select { font: inherit; }
button, .button, .secondary {
  border: 1px solid transparent;
  border-radius: .7rem;
  background: var(--berry);
  color: white;
  cursor: pointer;
  display: inline-flex;
  gap: .4rem;
  justify-content: center;
  align-items: center;
  padding: .65rem .95rem;
  min-height: 2.75rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
.secondary, .filter { border-color: var(--border); background: white; color: var(--berry); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #ba6580; outline-offset: 3px; }
.topbar { background: #fffcf9; border-bottom: 1px solid var(--border); }
.bar-inner, footer { width: min(100% - 2.5rem, 83rem); margin-inline: auto; }
.bar-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.5rem;
  padding-block: .75rem;
  flex-wrap: wrap;
}
.wordmark { color: #412330; font: 700 clamp(1.35rem, 3vw, 1.8rem) Georgia, serif; text-decoration: none; }
.wordmark em { color: var(--berry); font-weight: 400; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; }
nav a { color: #473138; text-decoration: none; font-weight: 600; }
nav a:hover { text-decoration: underline; }
main { margin-inline: auto; max-width: 88rem; padding: 1.4rem clamp(1rem, 3vw, 2.5rem) 3rem; min-height: 76vh; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; overflow-wrap: anywhere; }
h1, h2, p { margin-block: 0 .7rem; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4.1rem); line-height: 1.04; }
h2 { font-size: clamp(1.3rem, 2.3vw, 1.65rem); line-height: 1.17; }
.hero {
  border: 1px solid var(--border);
  background: linear-gradient(100deg, #f9e6eb 10%, #fff9f6);
  border-radius: 1.15rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  overflow: hidden;
}
.hero-copy { padding: clamp(1.25rem, 4vw, 3rem); }
.hero-copy p { font-size: clamp(1.05rem, 2.5vw, 1.25rem); margin-bottom: 1.25rem; }
.hero .creator { display: inline-block; margin-bottom: .65rem; font-weight: 650; }
.hero-art { width: 100%; height: 100%; min-height: 15rem; max-height: 21rem; object-fit: cover; object-position: 50% 46%; }
.catalog { padding-top: 1.7rem; scroll-margin-top: 1rem; }
.tools { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.filters { display: flex; gap: .45rem; flex-wrap: wrap; }
.filter[aria-pressed="true"] { background: var(--berry); color: #fff; border-color: var(--berry); }
input:not([type=checkbox]), textarea, select { border: 1px solid #bfa6ac; padding: .65rem .75rem; min-height: 2.75rem; width: 100%; min-width: 0; border-radius: .55rem; background: white; color: #2e2428; }
input[type=search] { max-width: 18rem; }
.subtle { color: var(--dust); font-size: .92rem; }
.view-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem .75rem; align-items: center; padding-block: .85rem; }
#total { margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.35rem); }
.pack { overflow: hidden; border: 1px solid var(--border); background: white; border-radius: 1rem; display: flex; flex-direction: column; min-width: 0; }
.pack-image { display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; width: 100%; aspect-ratio: 1.43; overflow: hidden; background: #f9efeb; color: var(--dust); }
.pack-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pack-image:hover img { filter: saturate(1.12); }
.pack-info { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.category { font-size: .9rem; color: var(--berry); font-weight: 700; }
.description { color: var(--dust); flex: 1; }
.price-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.favorite { width: 2.75rem; background: var(--rose); color: var(--berry); font-size: 1.28rem; padding: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.sample { padding: .55rem .25rem; }
.empty { color: var(--dust); }
.notice { margin-block: 1.2rem 0; color: var(--berry); font-weight: 600; }
dialog { border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.7rem); width: min(53rem, 100% - 2rem); max-height: 88dvh; overflow: auto; color: #2e2428; background: #fffdfb; }
dialog::backdrop { background: #301a24a8; }
.dialog-title, .section-title { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .6rem; padding-bottom: .75rem; }
.dialog-title h2 { padding-top: .4rem; }
.sheet { display: block; width: 100%; max-height: 63dvh; object-fit: contain; border-radius: .6rem; background: white; margin-bottom: .85rem; }
#dialog-message { color: #922849; margin: .65rem 0 0; }
.qr { display: block; width: min(100%, 15rem); background: white; margin-block: .75rem .4rem; }
.payment { max-width: 42rem; }
form { display: grid; gap: .85rem; max-width: 45rem; margin-block: .6rem; }
form label { display: grid; gap: .35rem; font-weight: 600; min-width: 0; }
form .check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; padding-block: .3rem; }
form button { justify-self: start; }
textarea { resize: vertical; min-height: 5rem; }
small { font-weight: normal; color: var(--dust); }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
fieldset { border: 1px solid var(--border); border-radius: .55rem; }
.account { max-width: 67rem; margin-inline: auto; }
.account h1 { margin-top: .85rem; }
#orders { display: grid; gap: .65rem; }
.order, .bag-list li { border-bottom: 1px solid var(--border); padding: .85rem 0; }
.order h2 { font-size: 1.25rem; }
.bag-list { padding: 0; list-style: none; }
.bag-list li { display: flex; justify-content: space-between; align-items: center; gap: .65rem; overflow-wrap: anywhere; }
footer { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; padding-block: 1.25rem; border-top: 1px solid var(--border); }
@media (max-width: 68rem) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 38rem) {
  .bar-inner, footer { width: calc(100% - 2rem); }
  nav { gap: .4rem 1rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; height: 11rem; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  input[type=search] { max-width: none; }
  .form-pair { grid-template-columns: 1fr; }
}


.product-grid.is-list { grid-template-columns: 1fr; }
.product-grid.is-list .pack { display: grid; grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr); }
.product-grid.is-list .pack-image { aspect-ratio: auto; min-height: 7rem; }
@media (max-width: 30rem) {
  .product-grid.is-list .pack { grid-template-columns: minmax(5rem, 32%) minmax(0, 1fr); }
  .product-grid.is-list .pack-info { padding: .75rem; }
}
