/*
 * KIKO MELT — product page, box builder, help page.
 *
 * Inherits styles.css. Same three rules as the shop: red only ever means the
 * action that takes money, no decision offers more than three choices, and
 * the price is never separated from the button that commits to it.
 */

/* ================================================== product page (PDP) == */

/* Big panel, sticky buy. The picture bleeds to the left edge because the
   photograph is the argument — the panel beside it only has to close. */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; align-items: start; }
/* the buy column needs `start` to be sticky; the picture opts back into
   stretch so it fills the row instead of leaving a band under itself */
.pdp__art {
  position: relative; align-self: stretch; background: var(--cream);
  min-height: min(86vh, 900px); overflow: hidden;
}
.pdp__art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pdp__badge {
  position: absolute; top: 26px; left: 26px; z-index: 2;
  background: var(--red); color: var(--paper); padding: 7px 16px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.pdp__badge.soft { background: var(--yellow); color: var(--ink); }

.pdp__buy {
  position: sticky; top: 96px;
  padding: clamp(30px, 4vw, 64px) clamp(24px, 4vw, 64px) 60px;
}
.pdp__crumb { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.pdp__crumb a:hover { color: var(--red); }
.pdp h1 { font-size: clamp(38px, 4.4vw, 62px); }
.pdp h1 .ar {
  display: block; font-family: "Readex Pro", sans-serif; font-weight: 400;
  font-size: 0.42em; color: var(--muted); margin-top: 8px; letter-spacing: 0;
}
.pdp__price { font-family: "Fredoka", sans-serif; font-size: 34px; margin: 20px 0 0; }
.pdp__price small { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.pdp__blurb { font-size: 17px; color: var(--cocoa); margin: 22px 0 0; max-width: 44ch; }
.pdp__blurb .ar { display: block; margin-top: 10px; font-size: .92em; opacity: .75; }

.pdp__row { display: flex; gap: 14px; align-items: center; margin: 30px 0 0; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border-radius: 999px; background: rgba(67,37,27,.07); }
.qty button { width: 44px; height: 48px; border-radius: 999px; font-size: 19px; transition: background .2s; }
.qty button:hover { background: rgba(67,37,27,.12); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }
.pdp__row .btn { flex: 1; min-width: 200px; }

.pdp__facts { margin: 34px 0 0; border-top: 2px solid rgba(67,37,27,.12); }
.pdp__facts details { border-bottom: 1px solid rgba(67,37,27,.1); }
.pdp__facts summary {
  list-style: none; cursor: pointer; padding: 17px 0; display: flex;
  justify-content: space-between; align-items: center;
  font-family: "Fredoka", sans-serif; font-size: 16px;
}
.pdp__facts summary::-webkit-details-marker { display: none; }
.pdp__facts summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.pdp__facts details[open] summary::after { content: "–"; }
.pdp__facts p { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); line-height: 1.65; }

.pdp__trust { display: grid; gap: 9px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.pdp__trust div { display: flex; gap: 9px; align-items: center; }

/* the related shelf sits on paper, not cream — the product photograph above
   it already carries the warm ground, and a second one underneath made the
   page read as two cream blocks with a white gap between them */
.related { background: var(--paper); padding: clamp(52px, 7vw, 92px) 0 clamp(60px, 8vw, 100px); }

@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__art { min-height: 62vh; }
  .pdp__buy { position: static; }
}

/* ==================================================== build a box ====== */

.builder { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; padding: 34px 0 90px; }

.picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pick { position: relative; }
.pick__img {
  position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--cream);
  aspect-ratio: 1; box-shadow: var(--shadow-s);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pick:hover .pick__img { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.pick__img img { width: 100%; height: 100%; object-fit: cover; }
/* the count badge only appears once the cookie is in the box, so an empty
   grid stays quiet */
.pick__n {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 32px; height: 32px; border-radius: 999px; background: var(--red); color: var(--paper);
  display: grid; place-items: center; font-family: "Fredoka", sans-serif; font-size: 15px;
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease);
}
.pick.has .pick__n { opacity: 1; transform: none; }
.pick__ctl {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; border-radius: 999px;
  background: rgba(255,253,246,.94); backdrop-filter: blur(6px); box-shadow: var(--shadow-s);
}
.pick__ctl button { width: 36px; height: 36px; border-radius: 999px; font-size: 18px; transition: background .2s; }
.pick__ctl button:hover { background: rgba(67,37,27,.1); }
.pick__ctl button[disabled] { opacity: .3; cursor: not-allowed; }
.pick__minus { display: none; }
.pick.has .pick__minus { display: block; }
.pick__body { display: flex; justify-content: space-between; gap: 10px; padding: 12px 4px 0; }
.pick__name { font-family: "Fredoka", sans-serif; font-size: 16px; line-height: 1.15; }
.pick__name .ar { display: block; font-family: "Readex Pro", sans-serif; font-size: 12.5px; color: var(--muted); }

/* the box panel: six slots that fill as you pick — visible progress toward a
   fixed target does more for completion than any amount of copy */
.boxsum { position: sticky; top: 96px; background: var(--cream); border-radius: var(--r-m); padding: 26px; }
.boxsum h3 { font-size: 21px; }
.boxsum .hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 20px; }
/* .slots6 base lives in styles.css - the offer modal uses it too */
.boxsum .count { font-family: "Fredoka", sans-serif; font-size: 15px; margin: 0 0 16px; }
.boxsum .count b { color: var(--red); }
.boxsum .list { display: grid; gap: 8px; margin-bottom: 18px; font-size: 14px; }
.boxsum .list div { display: flex; justify-content: space-between; }
.boxsum .total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: "Fredoka", sans-serif; font-size: 24px;
  padding-top: 16px; border-top: 2px solid rgba(67,37,27,.16);
}
.boxsum .btn { width: 100%; margin-top: 14px; }
.boxsum .btn[disabled] { opacity: .45; pointer-events: none; box-shadow: 0 6px 0 var(--red-dark); }
.boxsum .saving { font-size: 13px; color: #2fae6a; font-weight: 600; margin: 12px 0 0; text-align: center; }

.mobox {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,253,246,.95); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(67,37,27,.12);
  align-items: center; gap: 14px;
}
.mobox .t { font-family: "Fredoka", sans-serif; font-size: 17px; }
.mobox .btn { flex: 1; }

@media (max-width: 1000px) {
  .builder { grid-template-columns: 1fr; }
  .boxsum { position: static; }
  .boxsum .btn { display: none; }
  .mobox { display: flex; }
  body.has-mobox { padding-bottom: 86px; }
}
@media (max-width: 620px) { .picker { grid-template-columns: repeat(2, 1fr); } }

/* ========================================================= help page === */

.helphero { background: var(--cream); padding: clamp(40px, 6vw, 76px) 0; }
.helphero h1 { font-size: clamp(38px, 6vw, 72px); }
.helphero p { max-width: 46ch; color: var(--cocoa); margin: 16px 0 0; }

.helpnav { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 0; }
.helpnav a {
  padding: 11px 20px; border-radius: 999px; background: rgba(67,37,27,.08);
  font-size: 14.5px; font-weight: 500; transition: background .2s, color .2s;
}
.helpnav a:hover { background: var(--ink); color: var(--paper); }

.helpbody { padding: clamp(46px, 6vw, 82px) 0 100px; display: grid; gap: clamp(40px, 5vw, 68px); }
.helpsec { scroll-margin-top: 100px; }
.helpsec h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 8px; }
.helpsec .sub { color: var(--muted); margin: 0 0 26px; max-width: 52ch; }

.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area { background: var(--cream); border-radius: var(--r-m); padding: 24px; }
.area b { font-family: "Fredoka", sans-serif; font-size: 19px; display: block; }
.area .time { font-family: "Fredoka", sans-serif; font-size: 30px; color: var(--red); margin: 8px 0 4px; }
.area span { font-size: 13.5px; color: var(--muted); }

.qa { border-top: 2px solid rgba(67,37,27,.12); }
.qa details { border-bottom: 1px solid rgba(67,37,27,.1); }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 0; display: flex;
  justify-content: space-between; align-items: center; gap: 20px;
  font-family: "Fredoka", sans-serif; font-size: 18px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 22px; color: var(--muted); flex: 0 0 auto; }
.qa details[open] summary::after { content: "–"; }
.qa p { margin: 0 0 20px; color: var(--muted); line-height: 1.7; max-width: 62ch; }
.qa p .ar { display: block; margin-top: 8px; }

.allergen { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.allergen div { background: var(--cream); border-radius: var(--r-m); padding: 24px; }
.allergen b { font-family: "Fredoka", sans-serif; font-size: 17px; display: block; margin-bottom: 8px; }
.allergen p { margin: 0; font-size: 14.5px; color: var(--cocoa); }

.contactcard {
  background: var(--red); color: var(--cream); border-radius: var(--r-l);
  padding: clamp(30px, 4vw, 56px); display: grid; grid-template-columns: 1fr auto;
  gap: 30px; align-items: center;
}
.contactcard h3 { font-size: clamp(28px, 3.4vw, 44px); }
.contactcard p { margin: 12px 0 0; opacity: .88; max-width: 40ch; }
.contactcard .ways { display: grid; gap: 10px; }
.contactcard .ways a,
.contactcard .ways span {
  display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  background: rgba(255,253,246,.14); font-weight: 600; font-size: 15px;
  transition: background .2s, transform .2s var(--ease);
}
.contactcard .ways a:hover { background: rgba(255,253,246,.26); transform: translateX(4px); }
/* placeholder details in a mockup - shown, not linked */
.contactcard .ways span { cursor: default; }

@media (max-width: 860px) {
  .areas, .allergen { grid-template-columns: 1fr; }
  .contactcard { grid-template-columns: 1fr; }
}
