/* Product page in the fp-matrix design (_scripts/fp-matrix v2): live-site frame on top, option tiles, white rail card with quantity rows, production rows, total and CTA. */
:root { --m-line: #d8dfda; --m-line2: #c3ccc6; --m-mut: #56645c; --m-up: #7a3b16; --m-down: #1f6b45; --m-on: #e9f1ec; }

/* frame: title + "as low as" + intro left, photo right (phones: photo first) */
.phero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 4px 0 28px; }
.phero-media { margin: 0; order: -1; background: var(--forest); aspect-ratio: 16 / 9; overflow: hidden; }
.phero-media img { width: 100%; height: 100%; object-fit: cover; }
.phero h1 { margin-bottom: 14px; }
.phero .lowas { margin: 0 0 14px; color: var(--m-mut); font-size: 1rem; }
.phero .lowas-k { display: block; font: 700 15px/1.2 var(--font); text-transform: uppercase; color: #939393; letter-spacing: .01em; margin-bottom: 4px; }
.phero .lowas strong { font: 700 1.3rem/1.1 var(--display); color: #131313; }
.phero .intro { color: var(--text); max-width: 62ch; }

/* option groups: rules between groups instead of cards */
.pgrid { gap: 28px; }
.matrix { gap: 0; }
.opt { background: none; box-shadow: none; border-radius: 0; border-top: 1px solid var(--m-line); padding: 16px 0 18px; }
.opt-title { font: 700 17px/1.2 var(--display); color: #1f2622; }
.opt-cur { margin-left: 12px; color: var(--m-mut); font: 400 14px/1.2 var(--font); }
.opt legend { padding-right: 180px; }
.opt-head { top: 8px; right: 0; }
.help-btn { font-weight: 400; color: var(--forest); }
.help { background: var(--ground); border-radius: 8px; }
.tiles { gap: 10px; margin-top: 10px; }
.tile { border: 1px solid var(--m-line); border-radius: 12px; padding: 12px 12px 10px; min-height: 68px; justify-content: space-between; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.tile:hover { border-color: var(--m-line2); box-shadow: 0 2px 10px rgba(31, 38, 34, .07); }
.tile:active { transform: scale(.985); }
.tile-label { font-weight: 400; font-size: 15px; color: #1f2622; }
.tile-sub { color: var(--m-mut); }
.tile-diff { word-spacing: -.04em; font-weight: 400; font-size: 13px; color: var(--m-mut); }
.tile-diff.is-up { color: var(--m-up); }
.tile-diff.is-down { color: var(--m-down); }
.tile-diff.is-current { color: var(--forest); font-weight: 600; }
.tile-input:checked + .tile { border: 2px solid var(--forest); box-shadow: 0 0 0 3px var(--mustard); background: #fff; padding: 11px 11px 9px; }
.tile.is-denied { background: var(--ground); border-style: solid; }
.tile.is-denied:hover { box-shadow: none; border-color: var(--m-line); }

/* rail card */
.rail-card { background: #fff; color: #1f2622; border: 1px solid var(--m-line); border-radius: 16px; padding: 6px 18px 18px; box-shadow: 0 1px 2px rgba(31, 38, 34, .04), 0 8px 28px rgba(31, 38, 34, .06); }
.rail-card .opt { border-top: 0; border-bottom: 1px solid var(--m-line); padding: 12px 0 10px; }
.rail-card .opt legend { padding-right: 0; }
.rail-card .opt-head { position: static; margin: -2px 0 2px; }
.rail-card .help-btn { min-height: 32px; padding: 4px 0; }
.rail-card .ladder-wrap { margin: 0; }
.rail-card .hint { display: none; }
.rail-card .opt-cur { display: none; }

/* quantity rows: qty | saving | each | total */
.ladder { border-spacing: 0 2px; font-size: 14.5px; }
.ladder thead th { font: 500 11.5px/1.2 var(--font); padding: 6px 10px 4px; color: var(--m-mut); }
.ladder th, .ladder td { padding: 8px 10px; }
.ladder tbody th, .ladder tbody td { background: #fff; border-top: 1px solid transparent; border-bottom: 1px solid transparent; font-variant-numeric: tabular-nums; }
.ladder tbody th { font-weight: 600; border-left: 1px solid transparent; position: relative; }
.ladder tbody td:last-child { border-right: 1px solid transparent; }
.ladder tbody td:nth-child(2) { font-weight: 600; }
.ladder tbody td:nth-child(3) { color: var(--m-mut); }
.ladder tbody tr:hover th, .ladder tbody tr:hover td { background: var(--ground); }
.ladder tbody tr.is-current th, .ladder tbody tr.is-current td { background: var(--m-on); color: #1f2622; border-color: var(--forest); }
.ladder tbody tr.is-current th { box-shadow: inset 4px 0 0 var(--mustard); }
.ladder tbody tr.is-current td:nth-child(3) { color: var(--m-mut); }
.col-save { color: var(--m-down); font-size: 12.5px; }
.is-current .col-save { color: var(--m-down); }
.custom-qty { max-width: none; margin-top: 8px; }

/* production time rows in the rail */
.opt-rail .tiles { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 4px; }
.opt-rail .tile { min-height: 0; padding: 8px 10px; border-color: transparent; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "d" "s" "r"; row-gap: 2px; }
.opt-rail .tile:hover { background: var(--ground); box-shadow: none; }
.opt-rail .tile-label { grid-area: l; font-weight: 600; font-size: 14.5px; }
.opt-rail .tile-diff { grid-area: d; text-align: left; }
.opt-rail .tile-sub { grid-area: s; font-size: 12.5px; }
.opt-rail .tile-reason { grid-area: r; }
.opt-rail .tile-input:checked + .tile { background: var(--m-on); border: 1px solid var(--forest); box-shadow: inset 4px 0 0 var(--mustard); padding: 8px 10px; }

/* total block + CTA */
.rail-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; }
.rail-label { font: 700 15px/1.2 var(--display); text-transform: none; letter-spacing: 0; opacity: 1; }
/* Adieu's tabular figures are circled display glyphs, so prices in Adieu keep proportional figures */
.rail-total { font: 700 30px/1.05 var(--display); color: #1f2622; margin: 0; font-variant-numeric: normal; }
.rail-unit { text-align: right; color: var(--m-mut); font-size: 13.5px; }
.rail-ready { color: var(--forest); font-weight: 600; margin-top: 6px; }
.rail-summary { color: var(--m-mut); opacity: 1; font-size: 13px; }
.rail-msg { background: var(--ground); }
.rail-card .btn-primary { background: var(--forest); color: #fff; min-height: 52px; font: 700 15.5px/1.2 var(--display); }
.rail-card .btn-primary:hover { background: var(--forest-dark); }
.rail-note { color: var(--m-mut); text-align: center; opacity: 1; font-size: 12.5px; }

/* phone bar: white, total + forest pill */
.mbar { background: rgba(255, 255, 255, .97); color: #1f2622; border-top: 1px solid var(--m-line); box-shadow: 0 -6px 20px rgba(31, 38, 34, .08); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.mbar-total { font: 700 20px/1.1 var(--display); }
.mbar-unit { color: var(--m-mut); }
.mbar .btn-primary { background: var(--forest); color: #fff; min-height: 48px; font: 700 14.5px/1.2 var(--display); }
body.rail-cta-seen .mbar { transform: translateY(110%); }

/* content below the matrix: live product cards (about, uses, tips, FAQ) */
.about, .faq { background: none; box-shadow: none; padding: 0; max-width: 1040px; margin: 48px auto 0; }
.about > h2, .faq > h2 { font-size: clamp(1.4rem, 3.4vw, 1.875rem); font-weight: 700; color: var(--forest); }
.about-sec { border-radius: 14px; padding: 24px 22px; margin: 0 0 18px; color: #34453c; }
.about-sec h3 { font: 700 clamp(1.15rem, 3vw, 1.5rem)/1.25 var(--display); color: var(--forest); margin-bottom: 12px; }
.about-about { padding: 0; }
.about-uses { background: #faf6d0; }
.about-tips { background: #e2efc2; }
.faq .acc { background: #fff; border: 1px solid #e4e8d5; border-radius: 14px; padding: 6px 18px; }
.acc summary { font: 600 15px/1.5 var(--display); color: var(--forest); }
.acc details:first-child { border-top: 0; }
.acc details:last-child { border-bottom: 0; }
.gallery img { border-radius: 0; }

@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: calc(5 * 196px + 40px); }
  .about-sec { padding: 28px 30px; }
}
@media (min-width: 900px) {
  .phero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
  .phero-media { order: 0; }
  .pgrid { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
  .rail { top: 16px; }
}
@media (max-width: 899px) {
  .rail-card .btn-primary { display: flex; }
}
@media (max-width: 640px) {
  .pmain .tiles { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pmain .tile { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 10px; min-height: 52px; padding: 10px 12px; }
  .pmain .tile-input:checked + .tile { padding: 9px 11px; }
  .tile-sub, .tile-reason { flex-basis: 100%; order: 3; }
  .tile-diff { text-align: right; }
  .opt-title { font-size: 16px; }
  .opt-cur { display: block; margin: 4px 0 0; }
  .rail-card { padding: 4px 14px 16px; border-radius: 14px; }
  .rail-total { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .mbar, .tile { transition: none; } }
