/* Rose Milk — demo lip-care storefront (a madebyruby demo build)
   Look: Warm Pastel — peach + blush (Variation 2 / "soluna")
   Palette: bg #F7E6DA · cards #F3D8C6 · headings #6E4130 · body #86604C
            blush #ECB79C (decorative only) · terracotta #B15F3E (actions) */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../../assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F7E6DA;
  --card: #F3D8C6;
  --head: #6E4130;
  --body: #86604C;
  --pastel: #ECB79C;
  --rose: #B15F3E;
  --rose-dark: #97502F;
  --line: #EFD7C6;
  --white: #FFFFFF;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 1rem/1.65 var(--serif);
}

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

h1, h2 { font-family: var(--display); font-weight: 700; color: var(--head); margin: 0 0 0.35em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.1; }

a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

/* --- Chrome ------------------------------------------------------------ */

.attrib {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--head);
  color: var(--bg);
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
}
.attrib p { margin: 0; }
.attrib a { color: var(--pastel); }
.attrib a:hover { color: var(--bg); }

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.wordmark { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: 0.24em; color: var(--head); font-size: 1.05rem; display: flex; align-items: center; gap: 0.6rem; }
.head nav { display: none; gap: 1.6rem; }
.head nav span { font-family: var(--display); font-weight: 600; font-size: 0.92rem; cursor: default; }
.bag { margin: 0; display: flex; align-items: center; gap: 0.45rem; color: var(--head); font-family: var(--display); font-weight: 700; font-size: 0.95rem; }

@media (min-width: 760px) {
  .head { padding: 1.2rem 2.5rem; }
  .head nav { display: flex; }
}

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

.builder-page { width: min(100% - 2.5rem, 74rem); margin: 2.2rem auto 0; }

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
}
.sub { margin: 0; font-size: 1.05rem; }

.builder { display: grid; gap: 2.4rem; margin-top: 2rem; }
@media (min-width: 920px) {
  .builder { grid-template-columns: minmax(300px, 400px) 1fr; gap: 3.5rem; align-items: start; }
  .picks { position: sticky; top: 1.5rem; }
}

/* --- Slots + summary ------------------------------------------------------- */

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.slot {
  position: relative;
  aspect-ratio: 1;
  border: 2px dashed var(--rose);
  border-radius: 16px;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.slot::before {
  content: "+";
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--rose);
}
.slot.is-filled { border-style: solid; background: var(--card); }
.slot.is-filled::before { content: none; }
.slot .tube { width: 46%; }
.slot-name {
  position: absolute;
  bottom: 6%;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--head);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.15em 0.65em;
}
.slot-remove {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--rose);
  background: var(--white);
  color: var(--rose);
  font: 700 0.85rem/1 var(--display);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.slot-remove:hover { background: var(--rose); color: var(--white); }

.progress-label { margin: 1.1rem 0 0.4rem; font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: var(--head); }
.progress { height: 10px; border-radius: 5px; background: var(--card); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--pastel); border-radius: 5px; transition: width 0.25s ease; }

.summary { margin-top: 1.1rem; min-height: 4.6rem; }
.sum-line { margin: 0; font-size: 0.92rem; }
.sum-total { margin: 0.15rem 0 0; font-family: var(--display); color: var(--head); font-size: 1.15rem; }
.sum-total strong { font-weight: 700; }
.sum-save { margin: 0.15rem 0 0; font-weight: 600; color: var(--rose); font-size: 0.95rem; }
[hidden] { display: none !important; }

.cta {
  display: block;
  width: 100%;
  background: var(--rose);
  color: var(--white);
  border: 0;
  border-radius: 999px;
  font: 700 1rem/1 var(--display);
  padding: 1.05em 1.4em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cta:hover { background: var(--rose-dark); }
.cta[aria-disabled="true"] { background: var(--card); color: var(--head); cursor: default; }
.micro { margin: 0.7rem 0 1.4rem; font-size: 0.85rem; }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  color: var(--head);
  font-size: 0.95rem;
  padding: 0.8rem 0.2rem;
}
details p { margin: 0 0 1rem; font-size: 0.93rem; padding: 0 0.2rem; }

/* --- Product grid ------------------------------------------------------------ */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.product {
  position: relative;
  background: var(--card);
  border-radius: 16px;
  padding: 1.1rem 0.9rem 1rem;
  text-align: center;
}
.product .tube { width: 34%; margin: 0.4rem auto 0.8rem; }
.product h2 { font-size: 1rem; margin: 0 0 0.1rem; }
.product .price { margin: 0 0 0.7rem; font-size: 0.9rem; }
.add-btn {
  background: var(--bg);
  border: 1.5px solid var(--rose);
  color: var(--rose);
  border-radius: 999px;
  font: 700 0.85rem/1 var(--display);
  padding: 0.65em 1.3em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.add-btn:hover { background: var(--rose); color: var(--white); }
.count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--head);
  color: var(--bg);
  font: 700 0.72rem/1 var(--display);
  border-radius: 999px;
  padding: 0.35em 0.6em;
}

/* --- Footer + toast --------------------------------------------------------------- */

.foot {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding: 2.2rem 1.4rem 3rem;
  text-align: center;
}
.foot .wordmark { justify-content: center; }
.foot p { max-width: 46rem; margin: 0.6rem auto; font-size: 0.9rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 12px);
  z-index: 30;
  margin: 0;
  background: var(--head);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(92vw, 30rem);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
