/* ==========================================================================
   Mehak Wants Positivity — storefront styles
   Palette is lifted from the artwork itself: cream paper, IIMA/“Tiny Space”
   navy, “Aligned” violet, “I Fix” teal, “My Girl” blush + rose, mustard.
   ========================================================================== */

:root {
  --paper: #fbf5e9;
  --paper-2: #f4ead6;
  --ink: #23284f;
  --ink-soft: #4a4d72;
  --muted: #666a88;
  --violet: #6b4de0;
  --violet-ink: #5a3fcb;
  --lilac: #ece7fb;
  --teal: #3cc3cf;
  --teal-ink: #0f6f79;
  --mint: #def4f5;
  --rose: #d8566a;
  --rose-ink: #b02f47;
  --blush: #fde6e9;
  --gold: #f0b93a;
  --sun: #fff1c7;
  --leaf: #1f7a3a;
  --line: rgba(35, 40, 79, 0.16);

  /* aliases kept so admin / older pages keep working */
  --cream: var(--paper);
  --sky: #9cc9e0;
  --red: var(--rose-ink);

  --radius: 18px;
  --shadow: 0 14px 34px rgba(35, 40, 79, 0.14);
  --shadow-sm: 0 4px 14px rgba(35, 40, 79, 0.1);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { left: 12px; }

.hand { font-family: var(--font-hand); font-weight: 600; letter-spacing: 0.01em; }

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

header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 245, 233, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--line);
}

.header-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--blush);
  border: 2px dashed var(--rose);
  border-radius: 8px;
  transform: rotate(-4deg);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }
.brand-handle { font-family: var(--font-hand); font-size: 1.05rem; color: var(--violet-ink); font-weight: 600; }

nav.site-nav { display: flex; align-items: center; gap: 6px; }

nav.site-nav a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.98rem; font-weight: 500;
  transition: background 0.2s;
}
nav.site-nav a:hover { background: var(--lilac); }
nav.site-nav a[aria-current='page'] { background: var(--ink); color: var(--paper); }

.cart-pill {
  padding: 9px 18px; border-radius: 999px;
  background: var(--violet); color: #fff; font-weight: 700; font-size: 0.98rem;
  transition: background 0.2s;
}
.cart-pill:hover { background: var(--violet-ink); }
.cart-pill[aria-current='page'] { background: var(--ink); }

.brand { margin-right: auto; }

@media (max-width: 720px) {
  .brand-handle { display: none; }
  .header-inner { padding: 10px 16px; }
  .brand { flex: 1 1 0; min-width: 0; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.02rem; }
  /* row 1: logo + cart; row 2: scrollable category links */
  .cart-pill { order: 2; }
  nav.site-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  nav.site-nav a { white-space: nowrap; }
}

/* ---------- Layout ---------- */

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 72px; }

.section { margin-top: 72px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }
.section-title { text-align: center; margin: 56px 0 10px; }

.eyebrow {
  font-family: var(--font-hand); font-size: 1.45rem; font-weight: 700;
  color: var(--violet-ink); display: block; margin-bottom: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  background: var(--ink); color: var(--paper);
  padding: 11px 26px; border-radius: 999px;
  font: 700 1rem var(--font-body);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.violet:hover { background: var(--violet-ink); }

.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--lilac); }

.btn.full { width: 100%; }

/* ---------- Hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px;
  align-items: center; padding: 28px 0 8px;
}

.hero h1 { margin-bottom: 14px; }
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34ch; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.highlight { background: var(--lilac); padding: 0 10px; border-radius: 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.highlight-gold { background: var(--sun); padding: 0 10px; border-radius: 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.highlight-rose { background: var(--blush); padding: 0 10px; border-radius: 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.collage { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1 / 1; margin-left: auto; }

.tile {
  position: absolute; margin: 0;
  background: #fff; padding: 9px; border-radius: 6px;
  box-shadow: var(--shadow);
}
.tile img { display: block; width: 100%; height: auto; border-radius: 2px; }
.tile::before {
  content: ''; position: absolute; top: -11px; left: 50%;
  width: 70px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 185, 58, 0.55); border-radius: 2px;
}

.tile-postcard { width: 74%; top: 8%; left: 0; transform: rotate(-4deg); }
.tile-bm-a { width: 22%; top: 0; right: 3%; transform: rotate(5deg); }
.tile-bm-a::before { background: rgba(60, 195, 207, 0.55); }
.tile-bm-b { width: 21%; bottom: 0; right: 27%; transform: rotate(-3deg); }
.tile-bm-b::before { background: rgba(216, 86, 106, 0.45); }
.tile-sticker { width: 33%; bottom: 5%; left: 9%; transform: rotate(7deg); padding: 0; border-radius: 50%; overflow: hidden; }
.tile-sticker::before { display: none; }
.tile-sticker img { border-radius: 50%; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .collage { margin: 0 auto; max-width: 440px; }
}

/* ---------- Quote marquee ---------- */

.marquee {
  margin: 56px -20px 0; overflow: hidden; background: var(--ink); color: var(--paper);
  padding: 14px 0; transform: rotate(-1deg);
}
.marquee-track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee span { font-family: var(--font-hand); font-size: 1.7rem; font-weight: 600; padding: 0 28px; white-space: nowrap; }
.marquee span::after { content: '✦'; color: var(--gold); margin-left: 56px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Grids and cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--shadow); }

.card-media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}
/* image is taken out of flow so a tall bookmark can never stretch its card */
.card-media img {
  position: absolute; inset: 14px;
  width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(35, 40, 79, 0.18));
}
.card-media.cat-postcard { background: var(--blush); }
.card-media.cat-postcard img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.card-media.cat-bookmark { background: var(--lilac); }
.card-media.cat-sticker { background: var(--mint); }

.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; line-height: 1.25; }
.card-price { font-weight: 700; color: var(--ink); }

.badge {
  align-self: flex-start;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.1rem; line-height: 1;
  color: var(--violet-ink); background: transparent;
  padding: 0; text-transform: none; letter-spacing: 0;
}

/* ---------- Category tiles ---------- */

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.cat-tile {
  border-radius: 24px; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cat-tile:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.cat-tile.postcards { background: var(--blush); }
.cat-tile.bookmarks { background: var(--lilac); }
.cat-tile.stickers { background: var(--mint); }
.cat-tile img { height: 190px; width: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(35,40,79,.2)); }
.cat-tile h3 { margin: 0; font-size: 1.5rem; }
.cat-tile p { margin: 0; color: var(--ink-soft); }
.cat-tile .go { font-family: var(--font-hand); font-size: 1.4rem; font-weight: 700; color: var(--violet-ink); }

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

/* ---------- Feature / quote bands ---------- */

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
  background: #fff; border-radius: 28px; padding: 36px;
  box-shadow: var(--shadow-sm);
}
.feature h2 { color: var(--ink); }
.feature ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 4px; }
.feature li { font-family: var(--font-hand); font-size: 1.5rem; font-weight: 600; color: var(--ink-soft); }
.feature-art { display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.feature-art a { background: var(--paper-2); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.feature-art a:hover { transform: translateY(-5px) rotate(-1deg); }
.feature-art img { display: block; }
.feature-art .fa-card img { width: min(330px, 40vw); }
.feature-art .fa-mark img { width: min(100px, 16vw); }

@media (max-width: 820px) { .feature { grid-template-columns: 1fr; padding: 24px; } }

.quote-band {
  margin-top: 72px; text-align: center; background: var(--blush);
  border-radius: 28px; padding: 54px 24px;
}
.quote-band p { margin: 0; font-family: var(--font-hand); font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; color: var(--rose-ink); line-height: 1.15; }
.quote-band small { display: block; margin-top: 12px; color: var(--muted); font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 8px 12px; }
.step .num {
  width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center;
  border-radius: 50%; background: var(--sun); border: 2px solid var(--ink);
  font-family: var(--font-hand); font-size: 1.9rem; font-weight: 700;
}
.step h3 { font-size: 1.2rem; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Shop page ---------- */

.page-head { text-align: center; padding: 16px 0 8px; }
.page-head p { color: var(--muted); max-width: 52ch; margin: 0 auto; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0 30px; }
.filters button {
  font: 600 0.98rem var(--font-body); color: var(--ink);
  background: transparent; border: 2px solid var(--ink); border-radius: 999px;
  padding: 8px 18px; min-height: 42px; cursor: pointer; transition: background 0.15s;
}
.filters button:hover { background: var(--lilac); }
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.filters .count { opacity: 0.7; font-weight: 500; margin-left: 4px; }

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

.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.product-media {
  border-radius: 24px; padding: clamp(14px, 3vw, 30px);
  display: grid; place-items: center; background: var(--paper-2);
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.product-media.cat-postcard { background: var(--blush); }
.product-media.cat-bookmark { background: var(--lilac); }
.product-media.cat-sticker { background: var(--mint); }
.product-media img { display: block; width: 100%; max-height: 640px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(35,40,79,.2)); }
.product-media.cat-bookmark img { width: auto; max-width: 100%; height: min(620px, 78vw); }
.media-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }

.product-info .price { font-size: 1.7rem; font-weight: 700; margin: 4px 0 14px; }
.product-info .desc { color: var(--ink-soft); }
.perks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; color: var(--ink-soft); font-size: 0.98rem; }
.perks li::before { content: '✦'; color: var(--gold); margin-right: 10px; }
.buy-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 22px; }

.qty-row { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--ink); border-radius: 999px; padding: 3px; background: #fff; }
.qty-row button {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--ink);
}
.qty-row button:hover { background: var(--lilac); }
.qty-row span { min-width: 28px; text-align: center; font-weight: 700; }

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 28px; }
  .product-media { box-shadow: 5px 5px 0 var(--ink); }
}

/* ---------- Reviews ---------- */

.review-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 12px; }
.review-card .stars { color: var(--gold); letter-spacing: 2px; }
.review-card p { margin: 6px 0 0; }
.verified-tag { font-size: 0.8rem; color: var(--teal-ink); font-weight: 700; }

/* ---------- Cart / checkout / forms ---------- */

table.cart-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
table.cart-table th, table.cart-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.cart-table th { font-family: var(--font-display); background: var(--paper-2); }
table.cart-table tr:last-child td { border-bottom: none; }

form.checkout-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; margin-top: 20px; }
form.checkout-form input, form.checkout-form textarea, form.checkout-form select {
  padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  font: inherit; color: var(--ink); min-height: 46px;
}
form.checkout-form input:focus, form.checkout-form textarea:focus { border-color: var(--violet); outline: none; }

footer.site-footer {
  margin-top: 40px; padding: 40px 20px 36px; text-align: center;
  background: var(--ink); color: var(--paper);
}
.site-footer .f-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.site-footer .f-hand { font-family: var(--font-hand); font-size: 1.5rem; color: var(--gold); display: block; margin: 2px 0 10px; font-weight: 600; }
.site-footer nav { display: flex; gap: 8px 22px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.site-footer nav a { color: var(--paper); opacity: 0.85; }
.site-footer nav a:hover { opacity: 1; text-decoration: underline; }
.site-footer small { opacity: 0.7; }

.empty-state { text-align: center; padding: 60px 16px; color: var(--muted); grid-column: 1 / -1; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px;
  font-weight: 600; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { min-height: 280px; border-radius: var(--radius); background: linear-gradient(90deg, var(--paper-2), #fff 50%, var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .skeleton { animation: none; }
  .card, .btn, .cat-tile, .feature-art a { transition: none; }
  .card:hover, .btn:hover, .cat-tile:hover, .feature-art a:hover { transform: none; }
}
