:root {
  color-scheme: light;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color: #29231f;
  background: #faf6ef;
  --ink: #29231f;
  --muted: #695e56;
  --paper: #fffdf8;
  --cream: #f4eadc;
  --line: #d8cbbc;
  --brand: #5c3928;
  --accent: #c76d3b;
  --green: #286140;
  --danger: #913d33;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 20rem; min-height: 100vh; background: var(--paper); }
body, button, input, textarea { font: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
button, .button { min-height: 2.85rem; border-radius: 999px; font-weight: 780; }
button { padding: 0.7rem 1.1rem; border: 1px solid var(--brand); background: var(--brand); color: white; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0.72rem 1.25rem; background: var(--brand); color: white; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #de7b37; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; top: 0.5rem; left: 0.5rem; padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgb(216 203 188 / 75%); background: rgb(255 253 248 / 94%); backdrop-filter: blur(12px); }
.header-inner { width: min(100% - 1.5rem, 76rem); min-height: 4.7rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; min-height: 2.8rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 50%; background: var(--brand); color: white; font-size: 1.15rem; font-weight: 900; transform: rotate(-7deg); }
.brand-mark span { color: #efaa6d; }
.brand > span:last-child { display: grid; }
.brand strong { letter-spacing: -0.03em; }
.brand small { color: var(--muted); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 0.15rem; }
.site-header nav > a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 0.55rem; border-radius: 999px; color: #50443c; font-size: 0.82rem; font-weight: 720; text-decoration: none; }
.site-header nav > a[aria-current="page"] { background: var(--cream); color: var(--brand); }
.cart-link { gap: 0.35rem; }
.cart-count { display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.3rem; border-radius: 999px; background: var(--brand); color: white; font-size: 0.7rem; }

main { min-height: 65vh; }
.page-shell, .featured, .home-intro { width: min(100% - 2rem, 76rem); margin: 0 auto; }
.page-shell { padding: clamp(2.5rem, 8vw, 6rem) 0; }
.narrow-shell { width: min(100% - 2rem, 44rem); margin: 0 auto; padding: clamp(3.5rem, 12vw, 8rem) 0; text-align: center; }
.eyebrow { margin: 0 0 0.6rem; color: #7a543c; font-size: 0.73rem; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2 { font-family: Iowan Old Style, Charter, Georgia, serif; letter-spacing: -0.035em; }
h1 { margin: 0; font-size: clamp(2.35rem, 10vw, 5rem); line-height: 0.98; font-weight: 620; }
h2 { font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1.08; }
p { line-height: 1.65; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.page-heading p:not(.eyebrow) { max-width: 35rem; margin-bottom: 0; color: var(--muted); }
.result-count { flex: 0 0 auto; padding: 0.45rem 0.7rem; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 0.75rem; font-weight: 800; }

.hero { position: relative; overflow: hidden; display: grid; min-height: calc(100vh - 4.7rem); background: #e9dac7; }
.hero-copy { z-index: 1; align-self: center; width: min(100% - 2rem, 76rem); margin: 0 auto; padding: 4rem 0 18rem; }
.hero-copy h1 { max-width: 12ch; }
.hero-copy > p:not(.eyebrow) { max-width: 32rem; color: #594e46; font-size: 1.08rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.5rem; }
.text-link { font-weight: 800; }
.hero-art { position: absolute; right: -0.5rem; bottom: -2rem; display: grid; place-items: center; width: min(70vw, 24rem); aspect-ratio: 1; border: 1px solid #c7a98e; border-radius: 48% 52% 42% 58%; background: #f7c985; transform: rotate(-7deg); box-shadow: inset 0 0 0 1rem rgb(255 253 248 / 22%); }
.dog-mark { font-family: Georgia, serif; color: var(--brand); font-size: clamp(6rem, 27vw, 11rem); font-weight: 900; letter-spacing: -0.18em; transform: rotate(8deg); }
.stitch, .scribble { position: absolute; font-size: 0.75rem; font-weight: 850; letter-spacing: 0.14em; text-transform: uppercase; }
.stitch { top: 16%; right: 11%; padding-bottom: 0.3rem; border-bottom: 2px dashed var(--brand); }
.scribble { bottom: 20%; left: 15%; font-family: cursive; letter-spacing: 0; text-transform: none; transform: rotate(-10deg); }
.home-intro { padding: 5rem 0; text-align: center; }
.home-intro h2 { max-width: 18ch; margin: 0 auto; font-size: clamp(2.3rem, 9vw, 4.5rem); }
.home-intro > p:last-child { max-width: 34rem; margin: 1rem auto; color: var(--muted); }
.featured { padding: 1rem 0 6rem; }
.featured > header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.featured h2 { margin: 0; }
.featured > header > a { font-weight: 800; }
.quiet-message { padding: 2rem; border: 1px dashed var(--line); border-radius: 1rem; color: var(--muted); text-align: center; }

.product-grid { display: grid; gap: 1.25rem; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1.1rem; background: #fff; box-shadow: 0 0.8rem 2rem rgb(74 52 37 / 6%); }
.product-image { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--cream); }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.product-image:hover img { transform: scale(1.025); }
.image-placeholder { display: grid; place-items: center; align-content: center; gap: 0.5rem; width: 100%; height: 100%; min-height: 14rem; background: linear-gradient(145deg, #efe1d1, #f8f0e5); color: #856b58; }
.image-placeholder span { font: 900 3rem Georgia, serif; }
.image-placeholder small { font-weight: 750; }
.product-card-copy { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem 1rem; padding: 1.1rem; }
.product-card h2 { margin: 0; font-size: 1.35rem; }
.product-card h2 a { text-decoration: none; }
.product-card h2 a:hover { text-decoration: underline; }
.product-card .eyebrow { margin-bottom: 0.35rem; font-size: 0.62rem; }
.price { margin: 0; font-weight: 850; }
.availability { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--green); font-size: 0.8rem; font-weight: 800; }
.availability span { font-size: 0.6rem; }
.availability.sold-out { color: var(--danger); }
.is-sold-out .product-image img { filter: saturate(0.7); }

.breadcrumbs { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; color: var(--muted); font-size: 0.82rem; }
.product-layout { display: grid; gap: 2rem; }
.gallery-stage { overflow: hidden; aspect-ratio: 1; border-radius: 1.2rem; background: var(--cream); }
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery-controls { display: flex; gap: 0.65rem; overflow-x: auto; padding: 0.75rem 0.2rem 0.4rem; }
.gallery-thumb { flex: 0 0 4.6rem; overflow: hidden; width: 4.6rem; height: 4.6rem; min-height: 4.6rem; padding: 0; border: 2px solid transparent; border-radius: 0.75rem; background: var(--cream); }
.gallery-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-placeholder { aspect-ratio: 1; border-radius: 1.2rem; }
.product-copy { align-self: center; }
.product-copy h1 { font-size: clamp(2.5rem, 9vw, 4.5rem); }
.detail-price { margin: 1rem 0 0.7rem; font-size: 1.45rem; font-weight: 850; }
.product-copy .availability { margin: 0.2rem 0; }
.description { margin: 1.5rem 0; color: #544940; white-space: pre-line; }
.purchase-form { margin-top: 1.5rem; }
.purchase-form > label { display: block; margin-bottom: 0.45rem; font-size: 0.78rem; font-weight: 800; }
.purchase-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.7rem; }
input, textarea { width: 100%; min-height: 3rem; padding: 0.75rem; border: 1px solid #a99888; border-radius: 0.75rem; background: white; color: var(--ink); }
.fine-print { color: var(--muted); font-size: 0.78rem; }

.empty-state { display: grid; place-items: center; padding: 4rem 1.5rem; border: 1px dashed var(--line); border-radius: 1rem; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--cream); color: var(--brand); font-size: 1.5rem; font-weight: 900; }
.empty-state h1, .empty-state h2 { margin-bottom: 0; }
.empty-state p { max-width: 30rem; color: var(--muted); }
.error-state { border-color: #ddb8b0; background: #fff8f6; }
.loading-state { display: grid; min-height: 60vh; place-items: center; align-content: center; color: var(--muted); }
.spinner { width: 2rem; height: 2rem; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cart-layout { display: grid; gap: 1.5rem; }
.cart-lines { display: grid; gap: 0.8rem; }
.cart-line { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0.9rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: 1rem; }
.cart-line > strong { grid-column: 2; justify-self: end; }
.cart-line-image { overflow: hidden; width: 5rem; height: 5rem; border-radius: 0.75rem; background: var(--cream); }
.cart-line-image img, .cart-line-image .image-placeholder { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.cart-line-image .image-placeholder span, .cart-line-image .image-placeholder small { font-size: 0.65rem; }
.cart-line-copy { display: grid; gap: 0.7rem; }
.cart-line-copy h2, .cart-line-copy p { margin: 0; }
.cart-line-copy h2 { font-size: 1.15rem; }
.cart-line-copy h2 a { text-decoration: none; }
.cart-line-copy p { color: var(--muted); font-size: 0.82rem; }
.quantity-controls { display: flex; align-items: center; gap: 0.65rem; }
.quantity-controls button { display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem; padding: 0; border-color: var(--line); background: white; color: var(--ink); font-size: 1.2rem; }
.quantity-controls span { min-width: 1.5rem; text-align: center; font-weight: 850; }
.text-button { justify-self: start; min-height: 2.75rem; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--brand); text-decoration: underline; }
.line-warning { color: var(--danger) !important; font-weight: 750; }
.unavailable-line { background: #fff8f6; }
.cart-summary { align-self: start; padding: 1.35rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--cream); }
.cart-summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-block: 1px solid #d4c2ae; }
.cart-summary > p:not(.eyebrow) { color: var(--muted); font-size: 0.82rem; }
.cart-summary .button, .cart-summary > button { width: 100%; }
.continue-link { display: block; margin-top: 1rem; text-align: center; font-weight: 750; }

.boundary-page > p:not(.eyebrow) { color: var(--muted); }
.boundary-flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0; padding: 1rem; border-radius: 1rem; background: var(--cream); font-size: 0.78rem; font-weight: 800; }
.payment-readiness { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; color: var(--muted); text-align: left; }
.payment-readiness h2 { margin: 0 0 0.75rem; color: var(--ink); font-size: 1.15rem; }
.payment-readiness ul { margin: 0; padding-left: 1.2rem; }
.payment-readiness p { margin-bottom: 0; font-size: 0.78rem; }
.payment-readiness.is-unavailable { border-color: #ddb8b0; background: #fff8f6; text-align: center; }
.contact-page { display: grid; gap: 2rem; }
.contact-page header > p:last-child { max-width: 34rem; color: var(--muted); }
.contact-form { display: grid; gap: 1.2rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.contact-form label { display: grid; gap: 0.45rem; color: #4f443c; font-size: 0.82rem; font-weight: 800; }
.contact-form small { color: var(--muted); font-weight: 500; }
.contact-form textarea { resize: vertical; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.contact-form[aria-busy="true"] { opacity: 0.78; }

.payment-buttons { display: grid; gap: .75rem; margin: 1.25rem 0; }
.payment-buttons paypal-button, .payment-buttons venmo-button { display: block; width: 100%; min-height: 3rem; }
.checkout-page select { min-height: 2.75rem; border: 1px solid var(--line); border-radius: .35rem; background: white; padding: .55rem; }
.form-status { margin: 0; color: var(--muted); font-size: 0.78rem; }

.notice { position: fixed; z-index: 30; right: 0.75rem; bottom: 0.75rem; left: 0.75rem; padding: 1rem; border-radius: 0.8rem; background: var(--green); color: white; box-shadow: 0 0.8rem 2rem rgb(30 24 20 / 25%); }
.site-footer { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 2rem max(1rem, calc((100% - 76rem) / 2)); border-top: 1px solid var(--line); background: #2f2823; color: white; }
.site-footer p { margin: 0.2rem 0; color: #d6c8bc; font-size: 0.8rem; }
.site-footer nav { display: flex; gap: 1rem; font-size: 0.8rem; }

@media (max-width: 31rem) {
  .header-inner { gap: 0.2rem; }
  .brand { gap: 0.35rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
  .brand strong { font-size: 0.85rem; }
  .brand small { display: none; }
  .site-header nav { gap: 0; }
  .site-header nav > a { padding-inline: 0.35rem; font-size: 0.74rem; }
  .cart-link { gap: 0.2rem; }
  .cart-count { min-width: 1.35rem; height: 1.35rem; }
}

@media (min-width: 42rem) {
  .header-inner { width: min(100% - 2rem, 76rem); }
  .site-header nav { gap: 0.4rem; }
  .site-header nav > a { padding-inline: 0.8rem; font-size: 0.9rem; }
  .hero-copy { width: min(100% - 4rem, 76rem); padding-bottom: 5rem; }
  .hero-art { right: -2rem; bottom: 3rem; width: min(45vw, 30rem); }
  .hero-copy h1, .hero-copy > p:not(.eyebrow), .hero-actions { max-width: 52%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout { grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr); gap: clamp(2rem, 6vw, 5rem); }
  .cart-line { grid-template-columns: 6.5rem minmax(0, 1fr) auto; align-items: center; }
  .cart-line-image { width: 6.5rem; height: 6.5rem; }
  .cart-line > strong { grid-column: auto; align-self: start; }
  .contact-page { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .notice { left: auto; width: min(28rem, calc(100% - 1.5rem)); }
}

@media (min-width: 64rem) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 21rem; }
  .cart-summary { position: sticky; top: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
  .product-image img { transition: none; }
}
