:root {
  --pink: #ff6fae;
  --pink-deep: #e94b8a;
  --cream: #fff6ea;
  --butter: #ffe8a3;
  --mint: #8de3c6;
  --lilac: #d5c2ff;
  --ink: #3b2144;
  --card: #fffdf8;
  --shadow: 0 14px 30px rgba(233, 75, 138, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #ffd6ea 0 18px, transparent 19px),
    radial-gradient(circle at 80% 8%, #c8ffe9 0 14px, transparent 15px),
    radial-gradient(circle at 70% 90%, #ffe08a 0 16px, transparent 17px),
    radial-gradient(circle at 20% 86%, #d9c6ff 0 12px, transparent 13px),
    linear-gradient(180deg, #fff8f1, #ffeef6 50%, #eefcf7);
  min-height: 100vh;
}

h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; letter-spacing: 0.01em; }

.sprinkles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(#ff6fae 1.6px, transparent 1.7px),
    radial-gradient(#7ad9bb 1.4px, transparent 1.5px),
    radial-gradient(#ffd36a 1.5px, transparent 1.6px);
  background-size: 84px 84px, 110px 110px, 70px 70px;
  background-position: 0 0, 30px 40px, 50px 10px;
  opacity: 0.35;
}

.hero, main, footer, .cake-box, .admin-wrap { position: relative; z-index: 1; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem 6vw 1.4rem;
}

.eyebrow {
  display: inline-block;
  background: var(--butter);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 0.35rem 0 0.6rem;
  color: var(--pink-deep);
  text-shadow: 3px 3px 0 #ffe3f0;
}

.tagline { font-size: 1.15rem; max-width: 36rem; }
.ig-line a { color: var(--pink-deep); font-weight: 800; }

.hero-art img {
  width: 100%;
  border-radius: 28px 48px 24px 56px;
  box-shadow: var(--shadow);
  border: 8px solid #fff;
  transform: rotate(1.5deg);
}

.shelf { padding: 0.5rem 6vw 5rem; }
.shelf-head h2 { font-size: 2rem; margin-bottom: 0.2rem; }
.shelf-head p { margin-top: 0; }

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

.bit {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 3px solid #fff;
  transform: rotate(-0.4deg);
  display: flex;
  flex-direction: column;
}
.bit:nth-child(2n) { transform: rotate(0.6deg); }
.bit:nth-child(3n) { transform: rotate(-0.8deg); }
.bit:hover { transform: rotate(0deg) translateY(-4px); }

.bit-photo { position: relative; background: #fff3fb; }
.bit-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.washi {
  position: absolute; top: -8px; left: 18%;
  width: 64%; height: 18px;
  background: repeating-linear-gradient(90deg, #ff9ec8, #ff9ec8 10px, #fff 10px, #fff 14px);
  opacity: 0.85;
  transform: rotate(-1deg);
}

.bit-body { padding: 0.9rem 1rem 1.1rem; }
.bit-body h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.bit-desc { margin: 0 0 0.7rem; min-height: 3.2em; }
.bit-price {
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  color: var(--pink-deep);
  margin: 0 0 0.7rem;
  font-weight: 700;
}

.add-btn, .checkout-btn, .form button, .inline button {
  background: var(--pink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--pink-deep);
}
.add-btn:hover, .checkout-btn:hover, .form button:hover { filter: brightness(1.05); }
.add-btn.just-added { background: #2bb673; box-shadow: 0 4px 0 #1c7a4d; }

.empty-shelf {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  border: 3px dashed #ffb4d4;
}
.ig-btn {
  display: inline-block;
  margin-top: 0.6rem;
  background: var(--lilac);
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 800;
}

.cake-box {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 5;
  width: min(320px, calc(100vw - 1.6rem));
}
.box-toggle {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 18px 18px 0 0;
  padding: 0.75rem 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.box-toggle span {
  background: var(--pink);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  margin-left: 0.35rem;
}
.box-panel {
  display: none;
  background: #fff;
  border-radius: 0 0 18px 18px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: var(--shadow);
}
.cake-box.open .box-panel { display: block; }
.box-panel ul { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.box-panel li {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.35rem 0; border-bottom: 1px dashed #ffd0e4;
}
.box-total { display: flex; justify-content: space-between; }
.box-msg { color: var(--pink-deep); min-height: 1.2em; font-weight: 700; }
.checkout-btn { width: 100%; }
.box-panel button.qty {
  background: var(--butter); color: var(--ink); box-shadow: none;
  padding: 0.1rem 0.45rem; border-radius: 8px; margin-left: 0.25rem;
}

footer {
  text-align: center;
  padding: 1rem 1rem 6rem;
  color: #6b456f;
}
.foot-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }

.flash {
  margin: 0 6vw 1rem;
  background: #d8fff0;
  border: 2px solid #7ad9bb;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-weight: 700;
}
.flash.error { background: #ffe1ea; border-color: var(--pink); }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.4rem; }
  .hero-art img { transform: none; }
}
