/* Muddy Paw · Pass 3 brand: "the two scruffy terriers".
   Colors come from her photos and fabrics; Shantell Sans for headings and prices only. */
:root {
  --ink: #1c1b19;
  --paper: #ffffff;
  --leaf: #2f5d45;
  --leaf-tint: #eaf2ec;
  --pumpkin: #e86f2c;
  --jute: #eadcc6;
  --jute-soft: #f6f1e8;
  --muted: #5b574f;
  --line: #efe8dc;
  --edge: #c9bfae;
  --error: #a0281a;
  --radius: 14px;
  --pill: 999px;
  --display: "Shantell Sans", "Atkinson Hyperlegible", sans-serif;
  --body: "Atkinson Hyperlegible", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--ink); }
a:hover { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--pumpkin); outline-offset: 2px; }
::selection { background: var(--jute); color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; }
.muted { color: var(--muted); }
.fine { margin: 0; font-size: 14px; color: var(--muted); }
.price-type { font-family: var(--display); font-weight: 700; }

/* Preview + info strips */
.strip { background: var(--ink); color: #fff; font-size: 14px; }
.strip .wrap { padding: 8px 16px; display: flex; justify-content: space-between; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .top { height: 64px; padding: 0 12px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: auto; height: 56px; }
/* "Accessories" spreads letter by letter to exactly the width of "Muddy Paw" (inline-grid sizes the column to the name). */
.brand-text { display: inline-grid; line-height: 1; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 24px; white-space: nowrap; }
.brand-sub { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav .link { min-height: 44px; padding: 0 8px; display: flex; align-items: center; font-weight: 700; text-decoration: none; }
.cart-pill { position: relative; height: 44px; padding: 0 14px; border-radius: var(--pill); background: var(--leaf); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.cart-pill:hover { color: #fff; background: #244a37; }
.catbar { display: flex; gap: 2px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.catbar::-webkit-scrollbar { display: none; }
.catbar a { flex: none; min-height: 44px; padding: 0 10px; display: flex; align-items: center; font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.catbar a[aria-current] { border-bottom-color: var(--pumpkin); }
.catbar a.seasonal { color: var(--pumpkin); }
.nav .link[aria-current] { text-decoration: underline; text-decoration-color: var(--pumpkin); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.label-short, .catbar .phone-only { display: none; }
/* Phones: logo + cart on one compact row, then one row of scrollable chips (no hamburger).
   Guides and About move into the chip row and the footer. */
@media (max-width: 599px) {
  .nav .link { display: none; }
  .site-header .top { height: 56px; padding: 0 12px 0 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { height: 40px; }
  .brand-name { font-size: 20px; }
  .brand-sub { font-size: 11px; }
  .cart-pill { height: 40px; padding: 0 12px; }
  .catbar { gap: 8px; padding: 2px 12px 10px; scroll-padding-inline: 12px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .catbar a { min-height: 36px; padding: 0 14px; border: 1px solid var(--edge); border-bottom: 1px solid var(--edge); border-radius: var(--pill); font-size: 15px; }
  .catbar a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .catbar a.seasonal { border-color: var(--pumpkin); }
  .catbar a.seasonal[aria-current] { background: var(--pumpkin); color: var(--ink); }
  .catbar .phone-only { display: flex; }
  .label-full { display: none; }
  .label-short { display: inline; }
  .strip { font-size: 13px; }
  .strip .wrap { padding: 6px 16px; }
}

/* Footer: brand blurb + three link columns (2 columns on phones, 4 from 900px) */
.site-footer { margin-top: 48px; background: var(--ink); color: #fff; }
.footer-grid { padding: 32px 16px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin: 8px 0 0; color: #cfc6b6; max-width: 34ch; }
.site-footer nav { display: grid; align-content: start; }
.site-footer h2 { margin: 0 0 4px; font-family: var(--display); font-size: 16px; color: #cfc6b6; font-weight: 700; }
.site-footer nav a { color: #fff; min-height: 40px; display: flex; align-items: center; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .mark { font-family: var(--display); font-weight: 800; font-size: 22px; }
.site-footer .mark-sub { font-weight: 400; color: #cfc6b6; }
.footer-base { padding: 16px; border-top: 1px solid #3a3833; color: #cfc6b6; font-size: 14px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }

/* Buttons */
.btn { min-height: 52px; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--pill); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover { background: #244a37; color: #fff; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 44px; padding: 0 16px; }
.sticker { display: inline-block; padding: 6px 12px; border-radius: 6px; background: var(--pumpkin); color: var(--ink); font-family: var(--display); font-weight: 800; transform: rotate(-3deg); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; }

/* Photos: 1:1, rounded */
.photo { aspect-ratio: 1; background: var(--jute-soft); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; }
.photo:has(img) { padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-name { background: var(--ink); color: #fff; font-family: var(--display); font-size: 18px; }

/* Home */
.intro { padding: 24px 16px 0; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.intro h1 { font-size: 34px; }
.intro p { margin: 0; color: var(--muted); }
.hero { position: relative; margin: 16px 16px 0; }
.hero .photo { aspect-ratio: auto; height: 320px; border-radius: 18px; }
.hero .sticker { position: absolute; left: 14px; top: 14px; }
.hero .btn { position: absolute; left: 14px; right: 14px; bottom: 14px; }
.section { padding: 28px 16px 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.section-head a { font-weight: 700; font-size: 14px; color: var(--leaf); }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.cat-tile .name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.cat-tile .meta { font-size: 13px; color: var(--muted); }
.band { margin: 24px 16px 0; padding: 18px; border-radius: 18px; background: var(--jute); display: flex; gap: 14px; align-items: center; }
.band img { width: 64px; height: 64px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.band b { font-family: var(--display); font-size: 18px; display: block; }
.band span { color: #4a463f; font-size: 15px; }

/* Grid + tiles */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.grid-pad { padding: 0 16px; }
.tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.tile .name { font-weight: 700; line-height: 1.3; }
.tile .price { font-family: var(--display); font-weight: 700; }
.tile.sold { color: var(--muted); }
.tile-photo { position: relative; }
.sold-label { position: absolute; left: 8px; top: 8px; }
.tile-photo .flip { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tile-photo .flip { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); opacity: 0; transition: opacity .25s ease-out; }
  .tile:hover .flip, .tile:focus-visible .flip { opacity: 1; }
}
.page-title { margin: 24px 16px 14px; font-size: 30px; }
.page-title .count { font-family: var(--body); font-size: 16px; font-weight: 400; color: var(--muted); }

/* Product */
.crumbs { padding: 12px 16px 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product-media { padding: 0 16px; }
.gallery-wrap { position: relative; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { flex: 0 0 100%; scroll-snap-align: start; border-radius: 0; }
.product-media > .photo { border-radius: 18px; }
.media-badge { position: absolute; left: 12px; top: 12px; z-index: 2; }
.gallery-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.thumbs { display: flex; gap: 8px; padding: 10px 0; }
.thumb { width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current] { border-color: var(--ink); }
.product-info { padding: 6px 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.title-row h1 { font-size: 28px; }
.title-row .price { font-family: var(--display); font-weight: 800; font-size: 26px; white-space: nowrap; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.size { min-height: 62px; border: 1px solid var(--edge); border-radius: 12px; background: var(--paper); font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.size small { color: var(--muted); font-size: 13px; }
.size[aria-pressed="true"] { border: 2px solid var(--leaf); background: var(--leaf-tint); }
.size:disabled { border-style: dashed; color: #8a857c; background: var(--jute-soft); cursor: not-allowed; }
.size:disabled b { text-decoration: line-through; }
.size-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.size-note a { color: var(--leaf); font-weight: 700; }
.stock { margin: 0; font-weight: 700; }
.stock:empty { display: none; }
.form-error { margin: 0; color: var(--error); font-weight: 700; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.info-box { padding: 14px 16px; border-radius: var(--radius); background: var(--jute); display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { font-weight: 700; min-height: 32px; cursor: pointer; }
details.more p { margin: 8px 0 0; white-space: pre-line; }
.set { padding: 0 16px 8px; }
.set h2 { font-size: 22px; margin-bottom: 12px; }
.set-row { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.set-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.set-row .txt { flex: 1; display: flex; flex-direction: column; text-decoration: none; }
.set-row .txt span { color: var(--muted); font-size: 14px; }

/* Phone: keep Add to cart in reach */
@media (max-width: 899px) {
  .actions { position: sticky; bottom: 0; z-index: 3; margin: 0 -16px; padding: 12px 16px; background: var(--paper); border-top: 1px solid var(--line); flex-direction: row; }
  .actions .btn { flex: 1; padding: 0 12px; }
  .actions .fine { display: none; }
}

/* Cart */
.cart-wrap { max-width: 640px; }
.ship-progress { margin: 0 16px 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--jute); display: flex; flex-direction: column; gap: 8px; }
.ship-progress .bar { height: 10px; border-radius: 5px; background: #fff; overflow: hidden; }
.ship-progress .bar span { display: block; height: 10px; background: var(--leaf); }
.cart-list { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.cart-row { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 12px; }
.cart-row .photo { width: 76px; height: 76px; flex: none; padding: 0; border-radius: 10px; }
.cart-row .photo img { width: 76px; height: 76px; }
.cart-row .meta { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-row .name { font-weight: 700; text-decoration: none; }
.cart-row.gone { opacity: .6; }
.cart-row .line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.line-price { font-family: var(--display); font-weight: 700; font-size: 18px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--edge); border-radius: var(--pill); }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font: inherit; font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper button:disabled { color: #bdb6aa; cursor: not-allowed; }
.stepper span { min-width: 24px; text-align: center; }
.note { font-size: 14px; color: #7a4a0b; background: #fbebd0; padding: 2px 8px; border-radius: 4px; align-self: flex-start; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 32px; }
.summary { margin: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; }
.summary .row { display: flex; justify-content: space-between; }
.summary .total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; align-items: baseline; }
.summary .total span:last-child { font-family: var(--display); font-size: 22px; }
.summary .fine { text-align: center; }
.custom-note { margin: 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--jute-soft); font-size: 14px; color: #4a463f; }
.empty { margin: 0 16px 16px; }
.cart-root > .btn { margin: 0 16px; max-width: 260px; }

/* Added-to-cart bar */
.added-bar { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 10; max-width: 560px; margin: 0 auto; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.added-links { display: flex; gap: 16px; align-items: center; }
.added-links a { color: var(--jute); font-weight: 700; }
.added-links button { background: none; border: 0; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
@media (min-width: 900px) { .added-bar { bottom: 16px; } }

/* Text pages */
.prose { max-width: 720px; padding: 0 16px 24px; }
.prose .page-title { margin-left: 0; margin-right: 0; }
.prose section { margin-top: 28px; }
.prose h2 { font-size: 22px; margin-bottom: 8px; }
.prose p, .prose li { margin: 0 0 10px; }
.size-table { border-collapse: collapse; width: 100%; max-width: 440px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.size-table th, .size-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.size-table th { background: var(--jute-soft); }
.thanks { max-width: 640px; padding: 28px 16px; }
.thanks h1 { font-size: 32px; margin-bottom: 12px; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.thanks-actions .btn { flex: 1 1 200px; }

/* Wider screens */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-top { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; padding: 0 16px; }
  .home-top .intro, .home-top .hero { margin: 24px 0 0; padding: 0; }
  .hero .photo { height: 440px; }
  .product { display: grid; grid-template-columns: 55fr 45fr; gap: 32px; padding: 0 16px; }
  .product-media { padding: 0; }
  .product-side { position: sticky; top: 130px; align-self: start; }
  .product-info { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .tile-photo .flip { transition: none; } .gallery { scroll-behavior: auto; } }

/* Banner / vacation notice (admin settings) */
.notice { background: var(--leaf); color: var(--paper); text-align: center; font-weight: 700; padding: 8px 16px; }

/* /admin */
.admin { max-width: 640px; padding-bottom: 48px; }
.admin-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; display: grid; gap: 10px; }
.admin-card h2 { margin: 0; font-size: 20px; }
.admin-card p, .admin-card ul { margin: 0; }
.admin-alert { border-color: var(--error); background: #fbeeec; padding: 12px 16px; border-radius: var(--radius); }
.admin-msg { background: var(--leaf-tint); border-radius: var(--radius); padding: 10px 16px; font-weight: 700; }
.admin-msg.bad { background: #fbeeec; color: var(--error); }
.admin-form { display: grid; gap: 12px; }
.admin-form label { display: grid; gap: 4px; font-weight: 700; }
.admin-form label.check { display: flex; gap: 8px; align-items: center; }
.admin-form input:not([type="checkbox"]) { font: inherit; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 10px; min-height: 44px; }
.admin-form input[type="checkbox"] { width: 22px; height: 22px; }

/* Guides + about (src/content.mjs) */
.prose .crumbs { padding-left: 0; padding-right: 0; }
.prose ol, .prose ul { padding-left: 22px; margin: 0 0 14px; }
.guide .size-table { max-width: none; margin: 4px 0 10px; }
.guide h2 { margin-top: 28px; }
.lede { margin: 0 16px 16px; font-size: 18px; color: var(--muted); max-width: 640px; }
.guide-list { list-style: none; padding: 0 16px; margin: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .guide-list { grid-template-columns: repeat(3, 1fr); } }
.guide-list a { display: grid; gap: 4px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; background: var(--jute-soft); }
.guide-list a:hover { border-color: var(--edge); }
.guide-list b { font-family: var(--display); font-size: 18px; }
.guide-list span { color: var(--muted); font-size: 15px; }
.guide-photo { margin: 4px 0 20px; }
.guide-photo img { display: block; width: 100%; max-width: 357px; height: auto; border-radius: var(--radius); }
.guide-photo figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Share bars (no third-party script) */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.share-label { font-weight: 700; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--edge); border-radius: var(--pill); background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--ink); }
.share-native { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.share-native:hover { background: #244a37; border-color: #244a37; }
/* Phones with a share sheet: one Share button + Copy link; the per-site links move behind it. */
@media (max-width: 899px) { .share.has-native a.share-btn { display: none; } }
.share-compact { margin: 16px 0 0; gap: 6px; }
.share-compact .share-label { color: #cfc6b6; font-weight: 400; font-size: 14px; width: 100%; }
.share-compact .share-btn { min-height: 36px; padding: 0 12px; font-size: 14px; background: transparent; color: #fff; border-color: #5b574f; }
.share-compact .share-btn:hover { border-color: #fff; }
.share-compact .share-native { background: var(--leaf); border-color: var(--leaf); }
