/* Sweet Stitches shop - styles copied from the main Wix site so the two read as one site */

:root {
  --ink: #3e3a36;
  --ink-soft: #6b645d;
  --pink: #d96b8a;
  --pink-wash: #f7e1e8;
  --cream: #fbf7f1;
  --sand: #f5ece4;
  --sage: #dde2cf;
  --white: #ffffff;
  --line: #e2d5c8;

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", cursive;

  --gutter: 20px;
  --max: 1180px;
  --pill: 50px;
  --frame: 8px solid var(--white);
  --frame-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 0.45em; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.125rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.accent { color: var(--pink); }
.kicker { font-family: var(--hand); font-size: 1.5rem; line-height: 1.4; color: var(--pink); margin: 0 0 0.1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons (same as the main site) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 30px; border-radius: var(--pill);
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
  background: var(--pink); color: var(--sand); border: 1px solid var(--pink);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--sand); }
.btn:disabled { background: #cfc3b8; border-color: #cfc3b8; color: var(--white); cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--sand); }
.btn-small { min-height: 40px; padding: 0 28px; }
.btn-block { width: 100%; }
@media (min-width: 900px) { .btn { min-height: 40px; } }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 20; }
.bar {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter) 0;
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: start;
}
.menu-btn {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: var(--sand); display: grid; place-items: center;
}
.brand { justify-self: center; }
.brand-slim { display: none; }
.brand-wreath { width: 168px; height: 168px; }
.nav, .nav-contact { display: none; }
.cart-link { justify-self: end; position: relative; color: var(--pink); padding-top: 8px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--pink); color: var(--sand); font-size: 13px; font-weight: 700;
  display: inline-grid; place-items: center;
}

@media (min-width: 1140px) {
  .bar { grid-template-columns: auto 1fr auto auto; gap: 28px; align-items: center; height: 98px; padding-top: 0; }
  .menu-btn, .brand-wreath { display: none; }
  .brand { justify-self: start; }
  .brand-slim { display: block; width: 248px; height: 69px; object-fit: contain; }
  .nav { display: block; justify-self: center; }
  .nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
  .nav a { color: var(--ink); text-decoration: none; font-size: 15px; white-space: nowrap; }
  .nav a:hover, .nav a[aria-current="page"] { color: var(--pink); }
  .nav-contact { display: inline-flex; }
  .cart-link { padding-top: 0; }
}

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--sand);
  padding: 90px var(--gutter) 40px; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.menu li { margin: 0 0 14px; }
.menu ul a { color: var(--ink); text-decoration: none; font-size: 20px; }
.menu ul a[aria-current="page"] { color: var(--pink); }
.menu-close {
  position: absolute; top: 14px; left: var(--gutter);
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: var(--sand); display: grid; place-items: center;
}

/* ---------- Page intro (matches the main site's page headers) ---------- */

.intro { padding: 30px 0 10px; }
.intro p.lede { font-size: 18px; max-width: 46ch; }
@media (min-width: 900px) { .intro { padding: 60px 0 20px; } .intro p.lede { font-size: 20px; } }

/* ---------- Category filter ---------- */

.shop { padding: 10px 0 70px; }
.shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 26px; }
.result-count { color: var(--ink-soft); margin: 0; font-size: 15px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.chip {
  font: inherit; font-size: 15px; font-weight: 700; min-height: 40px; padding: 0 22px;
  border-radius: var(--pill); border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.chip:hover { background: var(--ink); color: var(--sand); }
.chip[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--sand); }

/* ---------- Product cards: the main site's polaroid frame ---------- */

.grid {
  display: grid; gap: 30px 16px; grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: block; position: relative; text-decoration: none; color: var(--ink); }
.card-photo { border: var(--frame); box-shadow: var(--frame-shadow); background: var(--white); aspect-ratio: 1 / 1; overflow: hidden; }
.card-photo img { width: 100%; height: 100% !important; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card-photo img { transform: scale(1.03); }
.card-name { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; margin-top: 12px; }
.card:hover .card-name { color: var(--pink); }
.card-price { display: block; font-size: 16px; margin-top: 2px; }
.card-price s, .product-price s { color: var(--ink-soft); margin-right: 6px; }

.tag {
  position: absolute; top: 18px; left: 18px; z-index: 1;
  background: var(--pink); color: var(--sand); font-size: 13px; font-weight: 700;
  padding: 3px 12px; border-radius: var(--pill);
}
.tag-out { background: var(--ink); }

.grid > .empty { grid-column: 1 / -1; }
.empty { text-align: center; max-width: 540px; margin: 10px auto 0; }
.empty img { width: min(80%, 340px); margin: 0 auto 20px; }
.loading-grid .card-photo { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.message { padding: 12px 16px; border-radius: 14px; background: var(--pink-wash); margin: 14px 0; }
.message[data-tone="ok"] { background: var(--sage); }

/* ---------- Product page ---------- */

.crumbs { font-size: 15px; margin: 24px 0 20px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }

.product { display: grid; gap: 30px; padding-bottom: 70px; }
@media (min-width: 900px) { .product { grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; } }

.gallery-main { border: var(--frame); box-shadow: var(--frame-shadow); background: var(--white); }
.gallery-main img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream); }
.thumbs { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; list-style: none; padding: 0; }
.thumbs button { padding: 0; border: 4px solid var(--white); box-shadow: var(--frame-shadow); background: var(--white); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--pink); }
.thumbs img { width: 64px; height: 64px; object-fit: cover; }

.product h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.product-price { font-size: 22px; font-weight: 700; margin: 0 0 22px; }

.option { border: 0; padding: 0; margin: 0 0 20px; }
.option legend { font-weight: 700; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  font: inherit; font-size: 15px; font-weight: 700; min-height: 40px; padding: 0 20px;
  border-radius: var(--pill); border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
}
.choice[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--sand); }
.choice[data-sold-out="true"] { text-decoration: line-through; color: var(--ink-soft); border-color: #cfc3b8; }

.stock { font-weight: 700; font-size: 15px; margin: 0 0 16px; }
.stock[data-state="out"] { color: var(--pink); }

.buy-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin: 6px 0 10px; }
.buy-row .btn { flex: 1 1 200px; min-height: 48px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: var(--pill); }
.qty button { font: inherit; font-size: 20px; width: 44px; height: 46px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.qty output, .qty span { min-width: 26px; text-align: center; font-weight: 700; }

.description { margin-top: 26px; max-width: 62ch; }
.description p:last-child { margin-bottom: 0; }

.delivery-box { background: var(--cream); border-radius: 20px; padding: 20px 22px; margin-top: 28px; }
.delivery-box h2 { font-size: 1.15rem; margin-bottom: 8px; }
.delivery-box ul { margin: 0; padding-left: 1.1em; }
.delivery-box li { margin: 4px 0; }
.delivery-box p:last-child { margin-bottom: 0; }

/* ---------- Basket ---------- */

.basket { display: grid; gap: 30px; padding: 6px 0 70px; }
@media (min-width: 900px) { .basket { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.line-photo { border: 5px solid var(--white); box-shadow: var(--frame-shadow); background: var(--white); align-self: start; }
.line-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.line-name { font-weight: 700; margin: 0 0 2px; }
.line-name a { color: var(--ink); text-decoration: none; }
.line-meta { color: var(--ink-soft); font-size: 15px; margin: 0 0 10px; }
.line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.line-actions .qty button { width: 38px; height: 38px; }
.line-price { font-weight: 700; margin-left: auto; }
.link-btn { font: inherit; font-size: 15px; background: none; border: 0; padding: 0; color: var(--pink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.summary { background: var(--cream); border-radius: 20px; padding: 24px; }
.summary h2 { font-size: 1.4rem; }
.summary-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 19px; margin: 0 0 8px; }
.summary .small { font-size: 15px; color: var(--ink-soft); }

/* ---------- Thank you / not found ---------- */

.thanks { text-align: center; max-width: 580px; margin: 0 auto; padding: 40px 0 80px; }
.thanks img { width: min(70%, 300px); margin: 0 auto 20px; }

/* ---------- Footer (same as the main site) ---------- */

.site-footer { background: var(--ink); color: var(--sand); }
.foot {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 28px;
  display: grid; gap: 30px;
}
@media (min-width: 760px) { .foot { grid-template-columns: 1fr 1fr; gap: 60px; } }
.foot-about img { width: 108px; height: 108px; border-radius: 50%; margin-bottom: 16px; }
.foot-about p { font-size: 15px; line-height: 1.6; max-width: 34ch; }
.foot-social { display: flex; gap: 14px; }
.foot-social img { width: 26px; height: 26px; }
.foot-title { font-size: 15px; font-weight: 400; color: var(--sage); margin: 0 0 10px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list a { color: var(--sand); text-decoration: none; font-size: 14px; line-height: 2.9; }
.foot-list a:hover { color: var(--pink); }
.foot-bottom {
  max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 26px;
  border-top: 1px solid rgba(245, 236, 228, 0.25);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 14px;
}
.foot-bottom p { margin: 0; }
.foot-legal { display: flex; gap: 10px; }
.foot-legal a { color: var(--sand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Preview mode banner */
.demo-bar { margin: 0; padding: 8px var(--gutter); background: var(--ink); color: var(--sand); font-size: 14px; text-align: center; }
.demo-bar a { color: var(--sand); font-weight: 700; }
