/* ===== Prime Haven Market — interactive features ===== */

/* --- Live catalog search --- */
.cps-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 2px 10px; font-size: 12px; color: rgba(245,243,237,.55); }
.cps-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: #7ee2a8; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.cps-live i { width: 7px; height: 7px; border-radius: 50%; background: #7ee2a8; animation: phmLive 2s infinite; }
.cps-results { min-height: 296px; max-height: 330px; overflow-y: auto; }
.cps-row { gap: 14px; animation: cpsIn .3s ease both; }
.cps-row em { font-style: normal; font-weight: 500; text-transform: none; color: rgba(245,243,237,.4); margin-left: 6px; letter-spacing: 0; }
.cps-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; text-align: right; }
.cps-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: rgba(245,243,237,.75) !important; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 3px 9px; text-decoration: none; transition: background .2s; }
.cps-lock:hover { background: rgba(255,255,255,.1); }
.cps-lock svg { width: 11px; height: 11px; }
.cps-empty { padding: 28px 12px; text-align: center; color: rgba(245,243,237,.6); font-size: 14px; }
.cps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cps-chips button { font: inherit; font-size: 12px; font-weight: 600; color: rgba(245,243,237,.8); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: background .2s, border-color .2s; }
.cps-chips button:hover { background: rgba(79,175,122,.2); border-color: #4faf7a; }
@keyframes cpsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- ZIP checker --- */
.zip-check { width: 100%; }
.zip-label { display: block; font-weight: 800; font-size: 15px; color: var(--color-text); margin-bottom: 8px; }
.zip-row { display: flex; gap: 8px; }
.zip-input { flex: 1; min-width: 0; font: inherit; font-size: 16px; letter-spacing: .08em; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.zip-input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.zip-btn { flex: none; }
.zr { margin-top: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; animation: cpsIn .3s ease both; }
.zr a { color: var(--color-primary); font-weight: 700; }
.zr-ok { background: var(--color-primary-light); border: 1px solid var(--color-primary-highlight); color: var(--color-text); }
[data-theme='dark'] .zr-ok { background: rgba(79,175,122,.12); border-color: rgba(79,175,122,.3); }
.zr-warn { background: #fdf3e3; border: 1px solid #f1d9a9; color: #5c4518; }
[data-theme='dark'] .zr-warn { background: rgba(232,163,61,.12); border-color: rgba(232,163,61,.3); color: var(--color-text); }
.zr-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.zr-dot { width: 9px; height: 9px; border-radius: 50%; background: #2d8a55; box-shadow: 0 0 0 4px rgba(45,138,85,.18); }
.zr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zr-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); }
.zr-grid b { font-size: 14px; color: var(--color-text); }
.zr-cta { display: inline-block; margin-top: 12px; text-decoration: none; }
@media (max-width: 520px) { .zr-grid { grid-template-columns: 1fr 1fr; } }
.map-zip { max-width: 640px; margin: 0 auto var(--space-6); padding: var(--space-5); border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: 0 10px 30px rgba(26,93,58,.06); }
.phm-target { position: relative; width: 22px; height: 22px; }
.phm-target span { position: absolute; inset: 4px; border-radius: 50%; background: #e8a33d; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.phm-target::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(232,163,61,.5); animation: phmPulse 1.8s ease-out infinite; }
.phm-lane-hot { stroke-dasharray: 10 8; animation: phmDash .9s linear infinite; }

/* --- State coverage map --- */
.sm-wrap { display: grid; grid-template-columns: 1fr; gap: var(--space-6); align-items: start; margin-bottom: var(--space-10); }
@media (min-width: 1000px) { .sm-wrap { grid-template-columns: 1fr 340px; } }
.sm-map { position: relative; border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); padding: var(--space-4); min-height: 260px; }
.sm-svg { width: 100%; height: auto; display: block; }
.sm-state { fill: var(--color-surface-offset, #efece4); stroke: none; transition: fill .2s, opacity .2s; cursor: default; }
[data-theme='dark'] .sm-state { fill: rgba(255,255,255,.06); }
.sm-state.on { cursor: pointer; opacity: .82; }
.sm-state.on:hover, .sm-state.hl { opacity: 1; filter: brightness(1.12); }
.sm-state:not(.on).hl { fill: #e9d5b0; }
.sm-mesh { fill: none; stroke: var(--color-surface, #fff); stroke-width: 1; stroke-linejoin: round; pointer-events: none; }
.sm-lane { fill: none; stroke-width: 1.4; stroke-dasharray: 4 6; opacity: .45; pointer-events: none; animation: phmDash 1.6s linear infinite; }
.sm-lane.hl { stroke: #e8a33d !important; stroke-width: 3; opacity: 1; stroke-dasharray: 8 6; }
.sm-dc .sm-dot { fill: #fff; stroke: #10231a; stroke-width: 4; }
.sm-dc .sm-pulse { fill: rgba(232,163,61,.35); transform-box: fill-box; transform-origin: center; animation: smPulse 2.4s ease-out infinite; }
.sm-dc .sm-pulse.d2 { animation-delay: 1.2s; }
.sm-dc text { font-size: 15px; font-weight: 800; fill: #10231a; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 4px; }
[data-theme='dark'] .sm-dc text { fill: #fff; stroke: rgba(0,0,0,.6); }
@keyframes smPulse { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.sm-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: #10231a; color: #f5f3ed; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 24px rgba(0,0,0,.2); white-space: nowrap; z-index: 5; }
.sm-tip b { display: block; font-size: 14px; }
.sm-tip span { display: block; color: rgba(245,243,237,.75); }
.sm-tip .muted { color: #f1d9a9; }
.sm-side { display: flex; flex-direction: column; gap: var(--space-4); }
.sm-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-kpis div { padding: 14px; border-radius: 14px; background: #10231a; color: #f5f3ed; }
.sm-kpis b { display: block; font-size: 28px; line-height: 1; font-weight: 900; color: #7ee2a8; }
.sm-kpis span { font-size: 12px; color: rgba(245,243,237,.7); }
.sm-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--color-text-muted); }
.sm-legend i, .sm-list i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sm-legend .sm-off { background: var(--color-surface-offset, #efece4); border: 1px solid var(--color-border); }
.sm-zip { padding: var(--space-4); border-radius: 14px; border: 1px solid var(--color-border); background: var(--color-surface); }
.sm-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; max-height: 260px; overflow-y: auto; font-size: 13px; }
.sm-list li { display: flex; align-items: center; padding: 5px 6px; border-radius: 8px; cursor: pointer; color: var(--color-text); transition: background .15s; }
.sm-list li small { margin-left: auto; color: var(--color-text-faint); font-size: 11px; }
.sm-list li:hover, .sm-list li.hl { background: var(--color-primary-light); }
[data-theme='dark'] .sm-list li:hover, [data-theme='dark'] .sm-list li.hl { background: rgba(79,175,122,.15); }
.sm-fallback { padding: 40px; text-align: center; color: var(--color-text-muted); }

/* --- Brand explorer --- */
.bx-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.bx-search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); }
.bx-search svg { width: 18px; height: 18px; color: var(--color-text-faint); flex: none; }
.bx-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; padding: 12px 0; color: var(--color-text); outline: none; }
.bx-seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--color-surface-2, #f3f1ea); border: 1px solid var(--color-border); }
.bx-seg button { font: inherit; font-size: 14px; font-weight: 700; border: 0; background: none; color: var(--color-text-muted); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.bx-seg button.on { background: var(--color-primary); color: #fff; }
.bx-sort select { font: inherit; font-size: 14px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); }
.bx-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: thin; }
.bx-chips button { flex: none; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); cursor: pointer; transition: all .2s; }
.bx-chips button i { width: 8px; height: 8px; border-radius: 50%; }
.bx-chips button.on { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
[data-theme='dark'] .bx-chips button.on { background: rgba(79,175,122,.15); color: var(--color-accent); border-color: var(--color-accent); }
.bx-count { font-size: 13px; color: var(--color-text-faint); margin: 6px 0 14px; }
.bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bx-tile { text-align: left; font: inherit; cursor: pointer; padding: 16px; border-radius: 16px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); transition: transform .2s, box-shadow .2s, border-color .2s; animation: cpsIn .35s ease both; animation-delay: var(--d); }
.bx-tile:hover { transform: translateY(-3px); border-color: var(--color-accent); box-shadow: 0 12px 26px rgba(26,93,58,.12); }
.bx-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bx-mono { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 14px; background: linear-gradient(135deg, #1a5d3a, #4faf7a); color: #fff; letter-spacing: .02em; }
.bx-tags { display: flex; gap: 4px; }
.bx-tags span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 7px; border-radius: 999px; background: var(--color-surface-2, #f3f1ea); color: var(--color-text-muted); }
.bx-name { font-weight: 800; font-size: 15px; line-height: 1.25; margin-bottom: 4px; min-height: 2.5em; }
.bx-n { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }
.bx-n b { color: var(--color-text); }
.bx-meter { height: 4px; border-radius: 4px; background: var(--color-surface-2, #f3f1ea); overflow: hidden; margin-bottom: 6px; }
.bx-meter i { display: block; height: 100%; background: var(--color-accent); border-radius: 4px; transition: width .4s; }
.bx-mix { display: flex; height: 6px; border-radius: 4px; overflow: hidden; gap: 1px; }
.bx-mix i { display: block; }
.bx-loading { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--color-text-muted); }
.bx-drawer { position: fixed; inset: 0; z-index: 1100; background: rgba(16,35,26,0); transition: background .25s; display: flex; justify-content: flex-end; }
.bx-drawer.open { background: rgba(16,35,26,.45); }
.bx-panel { position: relative; width: min(440px, 100%); height: 100%; overflow-y: auto; background: var(--color-surface); padding: 32px 28px; transform: translateX(100%); transition: transform .25s ease; box-shadow: -20px 0 40px rgba(0,0,0,.15); }
.bx-drawer.open .bx-panel { transform: none; }
.bx-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); font-size: 22px; line-height: 1; cursor: pointer; color: var(--color-text); }
.bx-body h3 { font-size: 1.7rem; margin: 6px 0 4px; color: var(--color-text); }
.bx-sub { color: var(--color-text-muted); margin-bottom: 18px; }
.bx-deps div { position: relative; display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0 12px; color: var(--color-text); }
.bx-deps div i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.bx-deps div em { position: absolute; left: 0; bottom: 4px; height: 3px; border-radius: 3px; opacity: .7; }
.bx-body h4 { margin: 20px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-faint); }
.bx-prod { list-style: none; padding: 0; margin: 0; }
.bx-prod li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; color: var(--color-text); }
.bx-prod small { color: var(--color-text-faint); white-space: nowrap; }

/* --- Starter order builder --- */
.ob-wrap { display: grid; grid-template-columns: 1fr; gap: var(--space-6); align-items: start; }
@media (min-width: 1000px) { .ob-wrap { grid-template-columns: 1.1fr 1fr; } }
.ob-step { position: relative; padding: 0 0 22px 44px; }
.ob-step::before { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 2px; background: var(--color-border); }
.ob-step:last-child::before { display: none; }
.ob-num { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--color-primary); color: #fff; }
.ob-step h4 { font-size: 16px; color: var(--color-text); margin: 4px 0 12px; }
.ob-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ob-3 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ob-2 { grid-template-columns: repeat(2, 1fr); }
.ob-opt { font: inherit; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; transition: all .18s; }
.ob-opt b { display: block; font-size: 14px; }
.ob-opt small { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.ob-opt:hover { border-color: var(--color-accent); }
.ob-opt.on { border-color: var(--color-primary); background: var(--color-primary-light); box-shadow: inset 0 0 0 1px var(--color-primary); }
[data-theme='dark'] .ob-opt.on { background: rgba(79,175,122,.14); border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.ob-out { position: sticky; top: 96px; padding: var(--space-6); border-radius: var(--radius-xl); background: #10231a; color: #f5f3ed; box-shadow: 0 20px 40px rgba(16,35,26,.2); }
.ob-out .section-eyebrow { color: #7ee2a8; }
.ob-big { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.ob-big b { font-size: 56px; line-height: 1; font-weight: 900; color: #fff; letter-spacing: -.03em; }
.ob-big span { font-size: 14px; color: rgba(245,243,237,.7); line-height: 1.3; }
.ob-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 16px; }
.ob-bar i { display: block; transition: flex .4s ease; }
.ob-row { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); animation: cpsIn .35s ease both; animation-delay: var(--d); }
.ob-rh { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.ob-rh i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.ob-rh b { color: #7ee2a8; }
.ob-brands { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ob-brands span { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(245,243,237,.9); }
.ob-brands small { font-size: 11px; color: rgba(245,243,237,.45); margin-left: 4px; }
.ob-note { font-size: 13px; color: rgba(245,243,237,.6); margin: 14px 0; line-height: 1.5; }
.ob-cta { width: 100%; justify-content: center; background: #4faf7a !important; border-color: #4faf7a !important; }
.ob-loading { padding: 40px; text-align: center; color: rgba(245,243,237,.6); }
@media (max-width: 999px) { .ob-out { position: static; } }

/* --- How an order moves (scroll story) --- */
.jr { position: relative; padding-top: 30px; }
.jr-track { position: relative; display: flex; justify-content: space-between; margin: var(--space-10) 0 var(--space-8); height: 6px; border-radius: 6px; background: var(--color-surface-offset, #efece4); }
.jr-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #1a5d3a, #4faf7a, #e8a33d); }
.jr-pkg { position: absolute; left: 0; top: 50%; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e8a33d; color: #fff; box-shadow: 0 8px 20px rgba(232,163,61,.45); transform: translate(0, -50%); z-index: 2; transition: background .3s; }
.jr-pkg svg { width: 24px; height: 24px; }
.jr-pkg[data-stage="4"] { background: #2d8a55; box-shadow: 0 8px 20px rgba(45,138,85,.45); }
.jr-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.jr-step { position: relative; padding: 18px; border-radius: 16px; border: 1px solid var(--color-border); background: var(--color-surface); opacity: .5; transform: translateY(8px); transition: opacity .35s, transform .35s, border-color .35s, box-shadow .35s; }
.jr-step .jr-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; background: var(--color-surface-2, #f3f1ea); color: var(--color-text-muted); transition: all .35s; }
.jr-step .jr-ic svg { width: 20px; height: 20px; }
.jr-step .jr-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-faint); }
.jr-step h3 { font-size: 16px; margin: 4px 0 6px; color: var(--color-text); }
.jr-step p { font-size: 13.5px; color: var(--color-text-muted); line-height: 1.5; }
.jr-step.on, .jr-step.done { opacity: 1; transform: none; }
.jr-step.on { border-color: #e8a33d; box-shadow: 0 14px 30px rgba(232,163,61,.18); }
.jr-step.on .jr-ic { background: #e8a33d; color: #fff; }
.jr-step.done .jr-ic { background: var(--color-primary); color: #fff; }
.jr-step.done .jr-k { color: var(--color-accent); }
@media (max-width: 899px) {
  .jr-body { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
  .jr-track { flex-direction: column; width: 6px; height: auto; margin: 0 0 0 19px; }
  .jr-fill { width: 100%; height: 0; }
  .jr-pkg { left: 50%; top: 0; transform: translate(-50%, 0); }
  .jr-steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .jr-step, .jr-pkg, .bx-tile, .cps-row, .ob-row { transition: none; animation: none; } }
.bx-drawer[hidden], .sm-tip[hidden] { display: none !important; }
.sm-wrap > *, .ob-wrap > *, .policy-wrap > * { min-width: 0; } .sm-map { overflow: hidden; }
