/* Manga Magnets — playful sticker-shop redesign.
 * Palette: cream #FFF6E9, hot pink #FF4D8D, sunny yellow #FFC53D,
 * teal #00B8A9, purple #7C5CFF, orange #FF7A29, ink #231F20.
 * Chunky 3px ink borders + hard offset shadows. No soft grey shadows.
 */
:root {
  --ink: #231f20;
  --cream: #fff6e9;
  --pink: #ff4d8d;
  --yellow: #ffc53d;
  --teal: #00b8a9;
  --purple: #7c5cff;
  --orange: #ff7a29;
  --card: #ffffff;
  --muted: #5c554e;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 20px;
  --font-display: "Fredoka", "Trebuchet MS", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  background-image: radial-gradient(#ffd9e8 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; padding: 80px 20px; }
a { color: var(--pink); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, .logo, .price, .badge, .button, .cart-button, .step-num {
  font-family: var(--font-display);
}

/* Header */
.site-header {
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 12px 20px; }
.logo {
  font-weight: 700; font-size: 1.5rem; color: var(--ink); text-decoration: none;
  transform: rotate(-2deg); display: inline-block; letter-spacing: .01em;
}
.logo-dot { color: var(--pink); }
nav { display: flex; gap: 8px; margin-left: auto; }
nav a {
  color: var(--ink); text-decoration: none; font-weight: 800;
  padding: 6px 12px; border-radius: 999px; border: 2px solid transparent;
}
nav a:hover { background: var(--yellow); border-color: var(--ink); }
.cart-button {
  border: 3px solid var(--ink); background: var(--pink); color: #fff;
  border-radius: 999px; padding: 8px 18px; cursor: pointer;
  font-size: 1rem; font-weight: 700; box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.cart-button:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.cart-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Marquee ticker */
.ticker {
  background: var(--yellow); border-bottom: 3px solid var(--ink);
  overflow: hidden; white-space: nowrap; padding: 8px 0;
}
.ticker-track {
  display: flex; width: max-content; animation: marquee 22s linear infinite;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .06em;
}
.ticker-track span { flex-shrink: 0; padding-right: 8px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Hero */
.hero {
  display: block; max-width: 760px; text-align: center;
  padding: 56px 20px 64px;
}
.hero-copy { margin: 0 auto; }
.hero h1 { text-wrap: balance; }
.hero p { margin-left: auto; margin-right: auto; max-width: 620px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600;
  background: var(--teal); color: #fff; padding: 6px 14px; border: 3px solid var(--ink);
  border-radius: 999px; transform: rotate(-2deg); box-shadow: var(--shadow-sm);
  margin: 0 0 16px;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease;
}
.texas-icon { flex-shrink: 0; filter: drop-shadow(1px 1px 0 var(--ink)); }
/* The eyebrow is a button: smash it and mini Texas buttons explode out. */
.hero-eyebrow { cursor: pointer; font-size: 1rem; touch-action: manipulation; }
.hero-eyebrow:hover { transform: rotate(-2deg) translateY(-5px) scale(1.12); box-shadow: 6px 8px 0 var(--ink); }
.hero-eyebrow:active { transform: rotate(-2deg) scale(.94); }
/* Texas burst minis — spawned by JS, fly out and remove themselves.
 * Cute little white chiclet tiles with a solid Texas silhouette inside. */
.texas-mini {
  position: fixed; z-index: 30; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-sm); cursor: pointer; padding: 4px;
}
.texas-mini:hover { background: var(--yellow); }
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.4rem); line-height: 1.02; margin: 0 0 16px;
  font-weight: 700; letter-spacing: -.01em;
}
.hl {
  display: inline-block; padding: 0 10px; border: 3px solid var(--ink);
  border-radius: 12px; transform: rotate(-1.5deg); box-shadow: var(--shadow-sm);
  -webkit-text-stroke: 0;
}
.hl-pink { background: var(--pink); color: #fff; }
.hl-yellow { background: var(--yellow); }
.hl-teal { background: var(--teal); color: #fff; }
.hero p { font-size: 1.1rem; }
.scroll-cue-wrap { margin-top: 24px; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px;
  padding: 10px 20px; box-shadow: var(--shadow-sm);
}
.scroll-cue:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.scroll-arrow { display: inline-block; animation: cue-bounce 1.4s ease-in-out infinite; }
@keyframes cue-bounce { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
.hero-art { position: relative; margin: 0; }
.hero-img {
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink); transform: rotate(1.5deg);
  filter: saturate(1.28) contrast(1.12) brightness(1.06);
  animation: wobble 6s ease-in-out infinite;
}
.hero-art figcaption { margin-top: 18px; font-weight: 800; text-align: center; }
.hero-mini {
  position: absolute; width: 96px; border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-sm); background: #fff;
}
.hero-mini-a { left: -14px; bottom: 44px; transform: rotate(-8deg); animation: bob 4s ease-in-out infinite; }
.hero-mini-b { right: -8px; top: -18px; transform: rotate(7deg); animation: bob 4.6s ease-in-out infinite reverse; }
.hero-sticker {
  position: absolute; right: 6px; bottom: 52px; z-index: 2;
  font-family: var(--font-display); font-weight: 700; background: var(--orange); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 8px 14px;
  transform: rotate(6deg); box-shadow: var(--shadow-sm);
  animation: pop 3.2s ease-in-out infinite;
}
.float-shape { position: absolute; z-index: 1; pointer-events: none; }
.shape-circle {
  width: 44px; height: 44px; border-radius: 50%; background: var(--pink);
  border: 3px solid var(--ink); top: -14px; left: 34%;
  animation: bob 3.4s ease-in-out infinite;
}
.shape-star {
  width: 38px; height: 38px; background: var(--purple); border: 3px solid var(--ink);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  bottom: -8px; left: 18%; animation: spin-bob 5s ease-in-out infinite;
}
.shape-squiggle {
  width: 64px; height: 16px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--yellow); top: 42%; right: -18px; transform: rotate(-18deg);
  animation: wobble 5s ease-in-out infinite;
}
.shape-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--teal);
  border: 3px solid var(--ink); bottom: 88px; right: 22%;
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes wobble { 0%, 100% { transform: rotate(1.5deg); } 50% { transform: rotate(-1deg); } }
@keyframes spin-bob { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(25deg) translateY(-10px); } }
@keyframes pop { 0%, 100% { transform: rotate(6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.12); } }

/* Buttons */
.button {
  display: inline-block; background: var(--pink); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 12px 22px;
  font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }

/* Sections */
section { padding: 24px 0 48px; }
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 12px; font-weight: 700;
}
.section-intro { font-size: 1.05rem; max-width: 720px; }
#shop { scroll-margin-top: 90px; }
#how-it-works, #shipping { scroll-margin-top: 90px; }

/* Style carousel — three magnet styles, swipeable */
.style-carousel { margin: 28px 0 8px; }
.carousel-title { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin: 0 0 8px; font-weight: 700; }
.carousel-viewport {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: 0; border: 3px solid var(--ink); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); scroll-behavior: smooth;
  scrollbar-width: none; margin-top: 20px;
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; }
.carousel-slide img {
  width: 100%; height: 420px; object-fit: cover;
  border-bottom: 3px solid var(--ink);
  /* Colour grading is baked into the image files themselves (see original-images/),
     so no CSS filter here — it would double-process them. */
}
.carousel-slide figcaption { padding: 16px 20px; font-size: 1.05rem; }
.carousel-slide figcaption strong { font-family: var(--font-display); font-size: 1.25rem; margin-right: 4px; }
.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 16px; }
.carousel-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--yellow); color: var(--ink); font-size: 1.3rem; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s ease;
  flex-shrink: 0; /* arrows never squash, even when 12 dots crowd the row */
}
.carousel-btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.carousel-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
/* The dots strip takes whatever room is left between the arrows and scrolls
 * horizontally; JS keeps the active dot centered and adds .overflowing when
 * the dots don't all fit, which fades the dots at the strip's edges. */
.carousel-dots {
  display: flex; gap: 10px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 2px;
  /* Center the dots when they all fit (desktop); `safe` keeps the strip
   * left-aligned and scrollable when they overflow (mobile). */
  justify-content: safe center;
}
.carousel-dots::-webkit-scrollbar { display: none; }
.carousel-dots.overflowing {
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}
.carousel-dot {
  width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ink);
  background: #fff; cursor: pointer; padding: 0; flex-shrink: 0;
}
.carousel-dot[aria-current="true"] { background: var(--pink); }

/* Products — text-only cards, no images */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0 48px; }
/* Flex column + a flex:1 inner makes every card in a row stretch to the
 * tallest card, so the bottom-pinned "How big are they?" buttons align
 * even when the penny-scale backs are different heights. */
.product {
  position: relative;
  display: flex; flex-direction: column;
  transition: transform .2s ease;
  overflow: visible; perspective: 1200px;
}
/* Flip cards — the penny-scale photo lives on the back of each pack card.
 * .flip-inner is as tall as its tallest face; both faces stack in one grid
 * cell, the back pre-rotated 180deg, and .flipped rotates the whole inner.
 * The card background/border/shadow live ON the faces, so the whole card —
 * not just its text — rotates when it flips. */
.flip-inner {
  display: grid;
  flex: 1;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4, .1, .2, 1);
}
.product.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  grid-area: 1 / 1;
  display: flex; flex-direction: column;
  padding: 26px 20px 20px;
  background: var(--card); border: 3px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-front { position: relative; }
.flip-back { transform: rotateY(180deg); }
.flip-back img {
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.flip-back p { margin: 12px 0; }
.flip-back p strong { font-family: var(--font-display); font-size: 1.15rem; margin-right: 4px; }
.flip-btn {
  display: block; width: 100%; margin-top: auto;
  background: #fff; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px;
  font-family: var(--font-body); font-weight: 800; font-size: .92rem;
  cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.flip-front .flip-btn { margin-top: auto; }
.flip-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.flip-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.product-pink .flip-face { background: #fff0f5; }
.product-yellow .flip-face { background: #fff8dc; }
.product-teal .flip-face { background: #e6f9f6; }
.product:hover {
  transform: translateY(-8px) rotate(-1deg);
}
.product:hover .flip-face { box-shadow: 9px 11px 0 var(--ink); }
.product h3 { margin: 6px 0 4px; font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.price { font-size: 2.1rem; font-weight: 700; margin: 0 0 8px; color: var(--pink); }
.product .add-to-cart { width: 100%; text-align: center; margin-top: 16px; font-size: 1.15rem; padding: 14px 22px; }
.product:hover .add-to-cart { animation: wiggle .45s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
/* Badges live on the static card wrapper (.product), NOT inside the flipping
 * faces — so the card turns underneath them and they never mirror or rotate. */
.badge {
  position: absolute; top: -14px; right: 14px; z-index: 3;
  font-weight: 700; font-size: .95rem; color: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 4px 12px;
  box-shadow: var(--shadow-sm); transform: rotate(4deg);
  transition: transform .2s ease;
}
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-pink { background: var(--pink); }
.badge-purple { background: var(--purple); }
.product:hover .badge { transform: rotate(4deg) scale(1.15); }

/* How it works */
.steps { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); font-size: 1rem;
}
.steps li:nth-child(1) { transform: rotate(-1deg); }
.steps li:nth-child(2) { transform: rotate(.6deg); }
.steps li:nth-child(3) { transform: rotate(-.5deg); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--yellow);
  border: 3px solid var(--ink); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px;
}
.steps li:nth-child(2) .step-num { background: var(--pink); color: #fff; }
.steps li:nth-child(3) .step-num { background: var(--teal); color: #fff; }
.steps strong { display: block; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 4px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.gallery img {
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease;
}
.gallery img:nth-child(1) { transform: rotate(-1.5deg); }
.gallery img:nth-child(2) { transform: rotate(1deg); }
.gallery img:nth-child(3) { transform: rotate(-.6deg); }
.gallery img:hover { transform: rotate(0deg) scale(1.04); }
.fine { color: var(--muted); font-size: .9rem; }

/* Shipping section card */
#shipping p {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
#shipping p:first-of-type { background: #fff8dc; }

/* Footer */
.site-footer { border-top: 3px solid var(--ink); background: var(--purple); color: #fff; padding: 32px 0 44px; margin-top: 24px; }
.site-footer a { color: var(--yellow); }
.footer-big { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: 0 0 8px; }
.site-footer .fine { color: #efeaff; }

/* Success / cancel pages */
.narrow h1 { font-size: 2.6rem; line-height: 1.1; }
.narrow { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 64px; margin-bottom: 64px; }

/* Cart drawer */
.cart-drawer { position: fixed; inset: 0; background: rgba(35, 31, 32, .55); z-index: 20; }
.cart-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%);
  background: var(--cream); padding: 20px; overflow-y: auto;
  border-left: 3px solid var(--ink);
}
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 {
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px;
  padding: 6px 18px; transform: rotate(-2deg); box-shadow: var(--shadow-sm); margin: 0;
}
.cart-head button {
  font-size: 1.8rem; background: var(--pink); color: #fff; border: 3px solid var(--ink);
  border-radius: 50%; width: 44px; height: 44px; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.cart-summary {
  background: #fff; border: 3px solid var(--ink); border-radius: 14px;
  padding: 14px 16px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
.cart-summary p { display: flex; justify-content: space-between; margin: 6px 0; }
.cart-summary .fine { display: block; margin: 4px 0 0; }
.cart-total-row {
  border-top: 3px dashed #e8cfa8; margin-top: 10px !important; padding-top: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.cart-total-note { font-family: var(--font-body); font-weight: 700; font-size: .85rem; color: var(--muted); }
.cart-secure { text-align: center; margin-top: 12px; }
.cart-line {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 0; border-bottom: 3px dashed #e8cfa8;
}
.qty { display: inline-flex; gap: 6px; align-items: center; }
.qty button {
  width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--yellow); cursor: pointer; font-weight: 900; font-size: 1rem; line-height: 1;
}
.checkout-button { width: 100%; margin-top: 16px; }
.error { color: #c00; font-weight: 800; }

@media (max-width: 760px) {
  .hero, .products, .gallery, .steps { grid-template-columns: 1fr; }
  nav { display: none; }
  .hero { padding: 36px 20px 48px; gap: 28px; }
  .hero-mini-a { left: 0; }
  .hero-mini-b { right: 0; }
  .shape-squiggle { right: 0; }
  .logo { font-size: 1.25rem; }
  .cart-button { padding: 8px 12px; margin-left: auto; }
  .ticker-track { font-size: .9rem; }
  .carousel-slide img { height: 260px; }
  .product h3 { font-size: 1.6rem; }
  .narrow { margin-top: 32px; margin-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .hero-img, .hero-mini-a, .hero-mini-b, .hero-sticker,
  .float-shape, .scroll-arrow, .product:hover .add-to-cart { animation: none; }
  .flip-inner { transition: none; }
  .carousel-viewport { scroll-behavior: auto; }
  html { scroll-behavior: auto; }
}
