/* =========================================================
   IKIMOCHI — Order Online
   Brand: Pink #FE2785 / Blue #015CE0 / Yellow #FBC45C / White
   Headline font: Baloo 2 (fallback for "Moodcake" — see README)
   Body font: Poppins
   ========================================================= */

:root {
  --pink: #FE2785;
  --pink-dark: #D81368;
  --pink-soft: #FFE3F0;
  --blue: #015CE0;
  --blue-dark: #0148AD;
  --blue-soft: #E3EDFF;
  --yellow: #FBC45C;
  --yellow-dark: #E8A82F;
  --purple: #B15CE6;
  --white: #FFFFFF;
  --ink: #2B1E28;
  --ink-soft: #6B5F68;
  --bg: #FFFBFD;
  --line: #F0DDE8;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 6px 20px rgba(254, 39, 133, 0.12);
  --shadow-pop: 0 10px 30px rgba(1, 92, 224, 0.18);

  --font-head: "Baloo 2", "Fredoka", sans-serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.1;
}

p { margin: 0; }

a { color: inherit; }

/* =========================================================
   PATTERN — scallop mask, brand-accurate vector
   ========================================================= */
.hero__pattern,
.how-to__pattern,
.site-footer__pattern {
  -webkit-mask-image: url("../img/pattern-mask.svg");
  mask-image: url("../img/pattern-mask.svg");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 200px 200px;
  mask-size: 200px 200px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--pink);
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.btn--primary:hover { background: var(--pink-dark); }
.btn--primary:disabled {
  background: #F0C3D8;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn--ghost:hover { background: var(--blue-soft); }

.btn--small { padding: 10px 20px; font-size: 0.92rem; }
.btn--full { width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 253, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.site-header__logo img { height: 48px; width: auto; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--pink);
  overflow: hidden;
  padding: 56px 0 72px;
}
.hero__pattern {
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.16);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}
.hero__eyebrow {
  color: var(--yellow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 18px;
}
.hero__desc {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 26px;
}
.hero__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--pink);
  text-align: center;
}
.section-title--light { color: var(--white); }
.section-subtitle {
  text-align: center;
  color: var(--ink-soft);
  margin: 10px auto 0;
  max-width: 50ch;
}

/* =========================================================
   MENU
   ========================================================= */
.menu { padding: 64px 0; }
.menu-list {
  margin-top: 36px;
  display: grid;
  gap: 22px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.product-card__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.product-card__char {
  width: 84px;
  height: 84px;
  object-fit: contain;
}
.product-card__char--kunafa {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--blue-soft);
}

.product-card__name {
  font-size: 1.4rem;
  color: var(--ink);
}
.swatch-pink .product-card__name { color: var(--pink); }
.swatch-purple .product-card__name { color: var(--purple); }
.swatch-yellow .product-card__name { color: var(--yellow-dark); }
.swatch-blue .product-card__name { color: var(--blue); }

.product-card__tagline {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 4px;
}
.product-card__price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 8px;
}
.product-card__rules {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--pink-soft);
  border-radius: var(--radius-pill);
  padding: 6px 8px;
}
.stepper__btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--pink);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper__btn:hover { background: var(--pink-dark); }
.stepper__qty {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-head);
}

.product-card__body:not(:empty) {
  border-top: 2px dashed var(--line);
  padding: 20px 24px 24px;
  background: #FFFAFC;
}

.mode-toggle__question {
  font-weight: 600;
  margin-bottom: 10px;
}
.mode-toggle__options {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}
.mode-toggle__opt {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.portions {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.portion + .portion {
  padding-top: 20px;
  border-top: 2px dashed var(--line);
}
.portion__label {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
}
.portion__all-inclusive {
  color: var(--yellow-dark);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.option-group { margin-bottom: 16px; }
.option-group__label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.option-group__count {
  font-weight: 400;
  color: var(--ink-soft);
}
.option-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--white);
  transition: all 0.15s ease;
}
.chip--checked span {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
}
.chip--disabled { cursor: not-allowed; }
.chip--disabled span {
  opacity: 0.4;
}
.chip--soldout span {
  text-decoration: line-through;
  text-decoration-color: var(--pink-dark);
}
.chip--soldout.chip--checked span {
  opacity: 1;
  text-decoration: none;
  background: var(--pink-dark);
}
.chip__soldout-tag {
  font-style: normal;
  font-weight: 700;
  font-size: 0.68rem;
  text-decoration: none;
  color: var(--pink-dark);
  margin-left: 2px;
}
.chip--checked .chip__soldout-tag { color: var(--yellow); }

.portion__note-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 4px;
}
.portion__note {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
}
.portion__note:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* =========================================================
   HOW TO ORDER
   ========================================================= */
.how-to {
  position: relative;
  background: var(--blue);
  padding: 60px 0;
  overflow: hidden;
}
.how-to__pattern {
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.14);
  pointer-events: none;
}
.how-to__steps {
  position: relative;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.how-to__step {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  color: var(--white);
  text-align: center;
}
.how-to__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 14px;
}
.how-to__step p { font-size: 0.92rem; line-height: 1.5; }

/* =========================================================
   CHECKOUT
   ========================================================= */
.checkout { padding: 64px 0 100px; }
.checkout__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.checkout__form {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.checkout__form .section-title { text-align: left; margin-bottom: 22px; }

.field { display: block; margin-bottom: 20px; }
.field__label { display: block; font-weight: 600; margin-bottom: 8px; }
.field__input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
}
.field__input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.field__hint { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }

fieldset.field { border: none; padding: 0; margin: 0 0 20px; }
.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkout__error {
  color: var(--pink-dark);
  background: var(--pink-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.checkout__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 20px 20px;
  width: 100%;
  order: -1;
}
.checkout__logo { width: 140px; opacity: 0.9; }
.checkout__note { color: var(--ink-soft); font-size: 0.9rem; max-width: 38ch; }
.checkout__form { width: 100%; }

/* =========================================================
   STICKY CART SUMMARY
   ========================================================= */
.cart-summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100px;
  z-index: 90;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
  transition: bottom 0.25s ease;
}
.cart-summary.is-visible { bottom: 0; }
.cart-summary__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
}
.cart-summary__count { font-size: 0.85rem; opacity: 0.8; }
.cart-summary__total {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  margin-right: auto;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  position: relative;
  background: var(--pink);
  padding: 56px 0 36px;
  overflow: hidden;
}
.site-footer__pattern {
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.16);
  pointer-events: none;
}
.site-footer__inner {
  position: relative;
  text-align: center;
  color: var(--white);
}
.site-footer__logo { width: 150px; margin: 0 auto 28px; filter: brightness(0) invert(1); }
.site-footer__outlets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto 28px;
  text-align: left;
}
.site-footer__outlet h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.site-footer__outlet p {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.5;
}
.site-footer__social { margin-bottom: 8px; font-size: 0.9rem; }
.site-footer__social a { text-decoration: underline; }
.site-footer__copy { font-size: 0.78rem; opacity: 0.75; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__media { order: -1; }
  .how-to__steps { grid-template-columns: 1fr 1fr; }
  .site-footer__outlets { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 560px) {
  .product-card__top {
    grid-template-columns: auto 1fr;
    grid-template-areas: "char info" "stepper stepper";
  }
  .product-card__char { grid-area: char; }
  .product-card__info { grid-area: info; }
  .stepper { grid-area: stepper; justify-content: center; margin-top: 4px; }
  .how-to__steps { grid-template-columns: 1fr; }
  .cart-summary__inner { flex-wrap: wrap; }
}
