:root {
  color-scheme: dark;
  --ground: #370f20;
  --panel: #46182b;
  --ink: #fff4ec;
  --muted: #ebced4;
  --rose: #f1c0cb;
  --rose-hover: #ffe0e6;
  --hero-wine: #63223b;
  --line: #865168;
  --gutter: max(5.5vw, 1.25rem);
  --serif: 'Baskerville', 'Palatino Linotype', Georgia, serif;
  font-family: Arial, sans-serif;
  background: var(--ground);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, p { margin: 0; }
p { line-height: 1.6; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .28em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
.masthead, footer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.2rem var(--gutter); }
.masthead { border-bottom: 1px solid var(--line); background: var(--ground); }
.wordmark { display: block; flex: none; width: clamp(7rem, 13vw, 10rem); }
.wordmark img { width: 100%; height: auto; filter: brightness(0) invert(1); }
.brand-mark { width: 7rem; height: auto; filter: brightness(0) invert(1); }
#featured-title .brand-mark { display: inline-block; vertical-align: middle; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.6rem, 2.5vw, 1.75rem); }
.masthead nav a, .masthead .header-order {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
}
.masthead nav a { padding: .35rem .2rem; color: var(--ink); text-decoration: none; }
.masthead nav a:hover { color: var(--rose); text-decoration: underline; }
.masthead svg {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button, .outline { display: inline-block; padding: .8rem 1.2rem; border: 1px solid var(--rose); text-decoration: none; font-size: .875rem; }
.button { background: var(--rose); color: var(--ground); }
.button:hover { background: var(--rose-hover); }
.outline:hover { background: var(--rose); color: var(--ground); }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(3rem, 7vw, 6rem) var(--gutter); background: linear-gradient(120deg, var(--ground), var(--hero-wine)); }
.eyebrow { color: var(--rose); font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; }
h1 { font-size: clamp(3.25rem, 6.6vw, 7rem); line-height: .97; max-width: 9em; margin: 1rem 0 1.3rem; }
h1 em { display: block; color: var(--rose); }
h2 { font-size: clamp(2.45rem, 5vw, 5rem); line-height: 1.02; }
.lede { max-width: 29rem; color: var(--muted); margin-bottom: 1.55rem; }
.hero-art { position: relative; padding: 0 11% 6% 5%; }
.hero-main { aspect-ratio: 4 / 5; object-fit: cover; }
.hero-detail { position: absolute; right: 0; bottom: 0; width: 34%; aspect-ratio: 4 / 5; object-fit: cover; border: 5px solid var(--ground); }
.collection, .delivery { padding: clamp(3rem, 7vw, 6rem) var(--gutter); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2rem; }
.section-head h2, .delivery h2 { margin-top: .5rem; }
.section-head > p, details p, footer p { color: var(--muted); }
.collection-group { scroll-margin-top: 1.5rem; }
.collection-group + .collection-group { margin-top: 3rem; }
.collection-group h3 { margin: 0 0 1rem; font: 2rem/1.1 var(--serif); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.2vw, 2rem); }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); }
.card img { aspect-ratio: 4 / 5; object-fit: cover; }
.card-body { display: grid; grid-template-rows: auto 1fr auto; gap: .75rem; flex: 1; padding: clamp(.8rem, 2vw, 1.25rem); }
.card h4 { margin: 0; font: 1.65rem/1.1 var(--serif); }
.card p { color: var(--muted); }
.card .outline { justify-self: start; }
.delivery { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details:first-child { border-top: 1px solid var(--line); }
summary { cursor: pointer; }
details p { margin-top: .75rem; }
footer { border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 35rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .masthead { flex-wrap: wrap; }
  .masthead nav { order: 3; width: 100%; justify-content: space-between; }
  .masthead nav a { flex-direction: column; justify-content: center; gap: .3rem; }
  .masthead .header-order { padding: .6rem .8rem; }
  .section-head, footer { align-items: flex-start; flex-direction: column; }
  .delivery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.categories, .contact {
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
  border-top: 1px solid var(--line);
}
.categories { background: var(--panel); }
.categories h2 { margin-bottom: 1.8rem; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.65rem, 2.2vw, 2rem);
}
.category-grid a {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(9rem, 21vw, 19rem);
  padding: clamp(.65rem, 2vw, 1.4rem);
  overflow: hidden;
  background: var(--ground);
  text-decoration: none;
}
.category-grid img {
  position: absolute;
  inset: 0;
  z-index: -2;
  height: 100%;
  object-fit: cover;
}
.category-grid a::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent 25%, rgb(15 9 13 / 90%));
}
.category-grid a span { color: #fff8f7; font: clamp(1rem, 2.4vw, 2rem)/1.1 var(--serif); }
.category-grid a:hover span { text-decoration: underline; }
.collection-group:target h3 { color: var(--rose); }
.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: var(--panel);
}
.contact-links { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (max-width: 980px) { .masthead { flex-wrap: wrap; } }
@media (max-width: 680px) {
  .contact { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 540px) { .gallery { grid-template-columns: 1fr; } }

.shop-tabs { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.25rem; }
.shop-tabs button[aria-pressed="true"] { background: var(--rose); color: var(--ground); }
.collection .gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: 1rem; }
.collection-group[hidden] { display: none; }
.collection-group:not([hidden]) + .collection-group:not([hidden]) { margin-top: clamp(2.5rem, 6vw, 5rem); }
.catalog-pager[hidden] { display: none; }
.tile { display: flex; flex-direction: column; gap: .5rem; border: 0; padding: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.tile img { aspect-ratio: 1; object-fit: cover; background: var(--panel); }
.tile[data-product="crimson-rose-flower-bag"] img { object-position: center bottom; }
button { font-family: inherit; cursor: pointer; }
.outline { color: var(--ink); background: transparent; }
button:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
dialog { width: min(94vw, 52rem); max-height: 90dvh; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--line); color: var(--ink); background: var(--panel); }
dialog::backdrop { background: rgb(27 5 15 / 72%); }
.dialog-close { float: right; font-size: 1.65rem; border: 0; background: transparent; color: var(--ink); }
.product-view { clear: both; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; }
.product-view img { max-height: 65dvh; object-fit: contain; align-self: center; }
.product-view h2, #cart-title { font-size: clamp(1.8rem, 4vw, 3rem); }
.product-view p, #cart-total, #cart-status { margin: .75rem 0; }
#cart-items { padding: 0; list-style: none; }
#cart-items li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
#cart-items input { width: 4rem; }
#delivery-form { display: grid; gap: .75rem; }
#delivery-form[hidden] { display: none; }
#delivery-form label { display: grid; gap: .35rem; }
#delivery-form input, #delivery-form textarea { width: 100%; padding: .65rem; font: inherit; }
#delivery-form .button { justify-self: start; }
@media (max-width: 550px) {
  .product-view { grid-template-columns: 1fr; }
  .product-view img { max-height: 48dvh; }
  .collection .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
  .tile span { font-size: .875rem; overflow-wrap: anywhere; }
}

.tile[hidden] { display: none; }
.catalog-pager { margin: 1.25rem 0 0; }

footer { flex-wrap: wrap; }
.studio-link { white-space: nowrap; }

.delivery-strip { padding: .65rem var(--gutter); background: #f1c0cb; color: #370f20; text-align: center; font-size: .875rem; }
.delivery-strip a { text-decoration: none; }
.delivery-strip a:hover { text-decoration: underline; }
.storefront .masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "search logo cart" "nav nav nav";
  gap: .85rem 1.25rem;
  padding-block: .95rem .55rem;
}
.storefront .masthead .wordmark { grid-area: logo; width: clamp(7rem, 14vw, 11rem); }
.storefront .masthead nav { grid-area: nav; width: auto; justify-content: center; gap: .3rem clamp(.8rem, 4vw, 3rem); }
.storefront .masthead nav a { min-height: 40px; flex-direction: row; gap: .45rem; font-size: .94rem; }
.storefront .masthead nav svg { width: 1.25rem; height: 1.25rem; }
.storefront .masthead .header-search { grid-area: search; justify-self: start; }
.storefront .masthead .header-order { grid-area: cart; justify-self: end; }
.header-search { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; }
.storefront .hero {
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.25rem, 4vw, 3.75rem) var(--gutter);
  background: linear-gradient(105deg, var(--ground), var(--hero-wine));
}
.storefront .hero-art {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(.4rem, 1vw, .85rem);
  padding: 0;
  max-width: none;
}
.storefront .hero img { position: static; width: 100%; height: auto; border: 0; object-fit: contain; }
.storefront .hero-main, .storefront .hero-detail { aspect-ratio: auto; }
.storefront .hero h1 { font-size: clamp(2.85rem, 5.8vw, 6.4rem); }
.storefront .categories { background: var(--ground); }
.storefront .categories, .storefront .featured { padding: clamp(2.4rem, 5vw, 4.5rem) var(--gutter); }
.storefront .categories h2, .storefront .featured h2, .storefront .collection h2 { font-size: clamp(2.35rem, 4.4vw, 4.4rem); }
.storefront .category-grid a { aspect-ratio: 1.55; min-height: 0; }
.featured { background: var(--panel); border-block: 1px solid var(--line); }
.featured-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.35rem; }
.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.storefront .tile img { border: 1px solid var(--line); }
.storefront .tile span { font-family: var(--serif); font-size: clamp(1rem, 1.85vw, 1.5rem); }
.storefront .collection .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.65rem, 1.5vw, 1.3rem); }
#search-dialog h2 { clear: both; font-size: clamp(2rem, 5vw, 3.5rem); }
.search-label { display: block; margin: 1rem 0 .5rem; }
#flower-search { width: 100%; padding: .75rem; border: 1px solid var(--line); font: inherit; }
#search-count { margin: .75rem 0; }
@media (max-width: 700px) {
  .storefront .hero { grid-template-columns: 1fr; }
  .storefront .hero-copy { padding-block: .75rem; }
  .storefront .hero-art { gap: .5rem; }
  .storefront .masthead .header-search, .storefront .masthead .header-order { padding: .45rem .55rem; }
  .storefront .masthead nav a { font-size: .85rem; }
  .storefront .masthead nav svg { display: none; }
  .featured-grid, .storefront .collection .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront .category-grid a { aspect-ratio: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .storefront .hero-copy, .storefront .hero-art { animation: storefront-enter .6s ease-out both; }
  .storefront .hero-art { animation-delay: .12s; }
  .storefront .tile img, .storefront .category-grid img, .storefront .outline, .storefront .button {
    transition: transform .22s ease, background-color .2s ease, color .2s ease;
  }
  .storefront .tile:hover img { transform: translateY(-.2rem); }
  .storefront .category-grid a:hover img { transform: scale(1.04); }
  .storefront dialog[open] { animation: storefront-enter .22s ease-out both; }
  @keyframes storefront-enter {
    from { opacity: 0; transform: translateY(.65rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.product-gallery { min-width: 0; align-self: start; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: .65rem; }
.photo-controls[hidden] { display: none; }
.photo-controls button { min-width: 44px; min-height: 44px; padding: .25rem .7rem; font-size: 1.5rem; }

.hero-clip { position: relative; min-width: 0; aspect-ratio: 9 / 16; }
.hero-fallback, .storefront .hero-clip video { position: absolute; inset: 0; }
.storefront .hero-fallback img { display: block; width: 100%; height: 100%; object-fit: cover; }
.storefront .hero-clip video { opacity: 0; }
.storefront .hero-clip.has-video-frame video { opacity: 1; }
.storefront .hero-clip video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border: 0; }
.hero-playback { position: absolute; bottom: .55rem; right: .55rem; min-height: 36px; padding: .35rem .65rem; color: white; background: rgb(32 8 20 / 88%); border: 1px solid rgb(255 255 255 / 65%); }

.hero-product { position: absolute; inset: 0; width: 100%; padding: 0; background: transparent; border: 0; cursor: pointer; }
.hero-product:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.hero-clip.is-playing .hero-playback { display: none; }

.product-view .product-brand { display: block; width: 5.5rem; height: auto; margin: 0 auto .85rem; }

.trimmed-photo {
  --photo-height-limit: 65dvh;
  position: relative;
  overflow: hidden;
  width: min(100%, var(--photo-height-limit) * var(--photo-ratio));
  aspect-ratio: var(--photo-ratio);
  margin-inline: auto;
}
.product-view .trimmed-photo img {
  position: absolute;
  top: var(--photo-offset);
  width: 100%;
  height: auto;
  max-height: none;
}
@media (max-width: 600px) {
  .trimmed-photo { --photo-height-limit: 48dvh; }
}
.product-sizes { display: flex; justify-content: center; gap: .5rem; margin-top: .85rem; }
.product-sizes[hidden], .product-sizes button[hidden] { display: none; }
.product-sizes .outline { min-width: 44px; min-height: 44px; padding: .4rem; }
.product-sizes .outline[aria-pressed="true"] { background: var(--rose); color: var(--ground); }
.product-view #photo-size-caption {
  margin: .4rem 0 0;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
}
