:root {
  --brand: #438477;
  --brand-dark: #356b60;
  --navy: #29465a;
  --ink: #29465a;
  --muted: #667b88;
  --line: #d8e6e3;
  --bg: #f4f9f8;
  --card: #ffffff;
  --sale: #b3261e;
  --sale-bg: #fde2e1;
  --grad: linear-gradient(135deg, #345f8c 0%, #36796f 100%);
  --shadow: 0 12px 34px rgba(41, 70, 90, .14);
  --radius: 16px;
  --maxw: 1120px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: none; border-radius: 10px; padding: 12px 20px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
#nav-login { padding: 7px 14px; font-size: 14px; border-radius: 8px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 249, 248, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 18px; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.nav-links { display: flex; align-items: center; gap: 10px; position: relative; }
.nav-links a.text { color: var(--muted); font-weight: 600; padding: 8px 10px; }
.nav-links a.text:hover { color: var(--navy); }

/* Hamburger menu */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 42px; height: 42px; padding: 0 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.nav-toggle:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.nav-toggle-bar { display: block; height: 2px; border-radius: 2px; background: var(--navy); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  min-width: 200px; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(41,70,90,.16);
  display: flex; flex-direction: column;
}
.nav-menu[hidden] { display: none; }
.nav-menu-item {
  padding: 10px 12px; border-radius: 9px;
  color: var(--navy); font-weight: 600; font-size: 15px;
}
.nav-menu-item:hover { background: var(--bg); color: var(--brand-dark); }
.nav-menu #nav-login { color: var(--brand-dark); }

/* ---- Hero (centered, single column) ---- */
.hero { padding: 76px 0 8px; text-align: center; }
.hero-inner { max-width: 780px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-dark); background: #dcefe9; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: 52px; line-height: 1.06; margin: 0 0 18px; color: var(--navy); letter-spacing: -.025em; }
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 auto 30px; max-width: 60ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 12px; }

/* Large hero visual: a browser-framed board of saved finds */
.hero-visual-wrap { margin-top: 48px; }
.hero-visual { max-width: 960px; margin: 0 auto; }
.board-stage { background: #f6f4f1; padding: 22px; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board.board-compact { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.board-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; box-shadow: 0 4px 14px rgba(41,70,90,.07); }
.board-thumb { aspect-ratio: 4/3; background: #ece3d6 center / cover no-repeat; }
.board-info { padding: 12px 14px; }
.board-name { font-weight: 700; color: var(--navy); font-size: 14px; line-height: 1.3; }
.board-price { color: var(--navy); font-weight: 800; font-size: 14px; margin-top: 5px; }
.board-was { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-right: 6px; }
.board-info .ext-badge { margin-top: 8px; }

/* ---- Trust strip ---- */
.trust { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; justify-content: center; align-items: center; gap: 16px 36px; flex-wrap: wrap; padding: 22px 24px; }
.trust-item { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.trust-item svg { width: 20px; height: 20px; flex: none; stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Section scaffolding ---- */
section.band { padding: 64px 0; }
section.band.alt { background: #ffffff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 32px; color: var(--navy); margin: 0 0 12px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---- Feature cards ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: #e4f1ec; display: grid; place-items: center; margin-bottom: 16px; }
.feature .ico svg { width: 24px; height: 24px; stroke: var(--brand-dark); fill: none; stroke-width: 2; }
.feature h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- Showcase rows (image + copy) ---- */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.showcase + .showcase { margin-top: 72px; }
.showcase.flip .copy { order: 2; }
.showcase .copy h3 { font-size: 26px; color: var(--navy); margin: 0 0 12px; }
.showcase .copy p { color: var(--muted); font-size: 16px; margin: 0 0 16px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: var(--ink); font-size: 15px; }
.checks li svg { flex: none; width: 20px; height: 20px; margin-top: 1px; stroke: var(--brand); fill: none; stroke-width: 2.4; }

/* ---- Browser / device mockups ---- */
.mock-window {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #eef4f2; border-bottom: 1px solid var(--line); }
.mock-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #cdd9d6; }
.mock-bar .url { margin-left: 10px; flex: 1; height: 22px; border-radius: 6px; background: #fff; border: 1px solid var(--line);
  font-size: 11px; color: var(--muted); display: flex; align-items: center; padding: 0 10px; }
.mock-stage { position: relative; background: #f6f4f1; padding: 20px; min-height: 320px; display: flex; }
.mock-photo { flex: 1; border-radius: 10px; position: relative; overflow: hidden;
  background: url("img/coverup.jpg") center 20% / cover no-repeat, #efe7db; }

/* Floating button on the mock stage */
.mock-fab {
  position: absolute; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}

/* Extension popup card */
.ext-popup {
  width: 300px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line);
}
.ext-popup .head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.ext-popup .head .logo { width: 26px; height: 26px; border-radius: 7px; }
.ext-popup .head b { color: var(--navy); font-size: 15px; }
.ext-collection { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand-dark); font-weight: 700; background: #e4f1ec; padding: 4px 10px; border-radius: 999px; line-height: 1.2; }
.ext-collection .ext-collection-caret { flex: none; font-size: 9px; }
.ext-row { display: flex; gap: 12px; padding: 14px; }
.ext-thumb { width: 64px; height: 64px; border-radius: 10px; flex: none;
  background: #ece3d6 center / cover no-repeat; }
.thumb-cardigan { background-image: url("img/coverup.jpg"); background-position: center 20%; }
.thumb-tee { background-image: url("img/tshirt.jpg"); }
.thumb-watch { background-image: url("img/bestbuy.jpg"); background-position: 21% center; background-size: 260%; }
.thumb-shoes { background-image: url("img/shoes.jpg"); background-position: center 42%; }
.thumb-dress { background-image: url("img/dress.jpg"); background-position: center 22%; }
.thumb-phone { background-image: url("img/phone.jpg"); }
.ext-info .name { font-weight: 700; color: var(--navy); font-size: 14px; line-height: 1.3; }
.ext-info .price { color: var(--navy); font-weight: 800; margin-top: 4px; }
.ext-info .was { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-right: 6px; }
.ext-badge { display: inline-block; font-size: 10px; font-weight: 800; color: var(--sale); background: var(--sale-bg); padding: 2px 7px; border-radius: 6px; margin-top: 6px; }
.ext-badge.drop { color: var(--brand-dark); background: #e4f1ec; }
.ext-actions { padding: 0 14px 14px; }
.ext-save { background: var(--brand); color: #fff; border: none; border-radius: 9px; padding: 10px; width: 100%; font-weight: 700; }

/* Price-alert showcase visual (notification toast over a saved card) */
.alert-stage { min-height: 320px; flex-direction: column; justify-content: center; gap: 18px; }
.notif { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.notif-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.notif-body { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.notif-body b { color: var(--navy); font-weight: 800; }
.board-in-stage { width: 100%; box-shadow: 0 4px 14px rgba(41,70,90,.08); }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- CTA band ---- */
.cta { background: var(--grad); border-radius: 22px; padding: 52px; text-align: center; color: #fff; box-shadow: var(--shadow); }
.cta h2 { font-size: 30px; margin: 0 0 12px; }
.cta p { margin: 0 0 24px; opacity: .92; font-size: 17px; }
.cta .btn-primary { background: #fff; color: var(--brand-dark); }
.cta .btn-primary:hover { background: #eafaf5; }

/* ---- Store / download buttons ---- */
.stores { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 14px; min-width: 260px;
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  border-radius: 14px; padding: 14px 22px; box-shadow: var(--shadow);
  transition: transform .12s ease, background .12s ease;
}
.store-btn:hover { background: #1f3646; transform: translateY(-2px); }
.store-ico { width: 34px; height: 34px; flex: none; }
.store-txt { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.store-sm { font-size: 12px; opacity: .8; }
.store-lg { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.store-note { text-align: center; color: var(--muted); font-size: 14px; margin: 22px 0 0; }

/* ---- Footer ---- */
footer { padding: 40px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Auth pages ---- */
.auth-main { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.tabs { display: flex; background: #eef4f2; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 8px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-intro { color: var(--muted); text-align: center; margin: 0 0 22px; font-size: 15px; }
.oauth { display: flex; flex-direction: column; gap: 10px; }
.btn-oauth { width: 100%; justify-content: center; gap: 10px; background: #fff; color: var(--navy); border: 1px solid var(--line); font-weight: 700; }
.btn-oauth:hover:not(:disabled) { background: #f6faf9; transform: translateY(-1px); }
.oauth-ico { width: 18px; height: 18px; flex: none; }
.oauth-err { font-size: 13px; min-height: 0; text-align: center; color: var(--muted); }
.oauth-err.err { color: var(--sale); min-height: 18px; margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(67,132,119,.15); }
.auth-msg { font-size: 13px; margin: 6px 0 14px; min-height: 18px; text-align: center; color: var(--muted); }
.auth-msg.err { color: var(--sale); }
.auth-msg.ok { color: var(--brand-dark); }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-resend { text-align: center; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.auth-resend button.text { color: var(--navy); font-weight: 600; background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; font: inherit; }
.auth-resend button.text:disabled { opacity: .6; cursor: default; }
.auth-config-warn { text-align: center; margin-top: 16px; font-size: 13px; color: #7a6410; background: #fff6d6; border: 1px solid #f0e2a8; border-radius: 10px; padding: 12px; }
.auth-config-warn code, .dash-state code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---- Dashboard ---- */
.dash { padding-bottom: 60px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 32px 0 8px; }
.dash-head h1 { font-size: 26px; color: var(--navy); margin: 0; }
.dash-sub { color: var(--muted); margin: 4px 0 0; }
/* Signup first/last name row */
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.name-fields[hidden] { display: none; }
.remember-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.remember-row[hidden] { display: none; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

/* Account menu (gear + hover/focus dropdown) in the dashboard header */
.user-menu { position: relative; }
.user-menu-trigger { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 14px; color: var(--navy); font-weight: 600; font-size: 14px; cursor: pointer; }
.user-menu-trigger:hover { background: #fff; }
.user-menu-trigger .gear { fill: var(--muted); flex: none; }
.user-menu-trigger:hover .gear { fill: var(--brand-dark); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease; z-index: 20; }
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown, .user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
/* Bridge the gap so hover doesn't drop while moving to the menu */
.user-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.user-dropdown-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.user-dropdown-item:hover { background: #eef4f2; color: var(--brand-dark); }
.dash-controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 26px; }
.dash-controls input, .dash-controls select { font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.dash-controls input { flex: 1; min-width: 200px; }
.dash-state { text-align: center; padding: 64px 20px; color: var(--muted); font-size: 15px; }
.dash-state.empty h2 { color: var(--navy); font-size: 20px; margin: 0 0 10px; }
.dash-state.empty p { max-width: 46ch; margin: 0 auto; }

/* Account settings page */
.account { max-width: 980px; padding-bottom: 60px; }
.account h1 { font-size: 26px; color: var(--navy); margin: 32px 0 4px; }
.account-intro { color: var(--muted); margin: 0 0 24px; }
.account-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.account-col { min-width: 0; }
@media (max-width: 720px) { .account-cols { grid-template-columns: 1fr; } }
.account-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.account-card h2 { font-size: 17px; color: var(--navy); margin: 0 0 16px; }
.account-card .field { display: block; margin-bottom: 14px; }
.account-card .field span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.account-card input, .account-card select { width: 100%; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.account-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.account-msg { font-size: 13px; color: var(--muted); }
.account-msg.err { color: var(--sale); }
.account-msg.ok { color: var(--brand-dark); }
.account-hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.account-config-warn { text-align: center; font-size: 13px; color: #7a6410; background: #fff6d6; border: 1px solid #f0e2a8; border-radius: 10px; padding: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .15s ease; color: inherit; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.p-img { aspect-ratio: 1/1; background: #eef4f2; overflow: hidden; display: block; width: 100%; border: 0; padding: 0; margin: 0; cursor: pointer; position: relative; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img.no-img { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.p-img.no-img::after { content: "Select"; }
.p-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-name { font-weight: 700; color: var(--navy); font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-name[href]:hover { text-decoration: underline; }
.p-name.no-link { cursor: default; }
.p-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coll-tag { color: var(--brand-dark); background: #e4f1ec; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.p-price { font-weight: 800; color: var(--navy); margin-top: auto; }
.p-price .p-was { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-left: 6px; font-size: 13px; }
.p-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.p-flag { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.p-flag.sale { color: var(--sale); background: var(--sale-bg); }
.p-flag.drop { color: var(--brand-dark); background: #e4f1ec; }
.p-flag.out { color: var(--muted); background: #eef1f0; }

/* ---- Multi-select on cards ---- */
.p-card-wrap { position: relative; }
/* The checkbox is a sibling of the <a>, positioned over its top-left corner, so
   selecting never triggers the product link. */
.p-select {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: 9px; cursor: pointer; box-shadow: 0 1px 4px rgba(41,70,90,.18);
  opacity: 0; transition: opacity .12s ease;
}
/* Reveal on hover/focus, and keep visible whenever something is selected or the
   card itself is selected (so touch users can always see their selection). */
.p-card-wrap:hover .p-select,
.p-card-wrap:focus-within .p-select,
.p-card-wrap.selected .p-select,
body.has-selection .p-select { opacity: 1; }
.p-check { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.p-card-wrap.selected .p-card {
  outline: 2px solid var(--brand); outline-offset: 2px;
  box-shadow: var(--shadow);
}
/* Kebab menu → opens product settings. Sits over the top-right corner. */
.p-menu {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: 9px; cursor: pointer; color: var(--navy);
  box-shadow: 0 1px 4px rgba(41,70,90,.18);
  opacity: 0; transition: opacity .12s ease;
}
.p-card-wrap:hover .p-menu,
.p-card-wrap:focus-within .p-menu,
body.has-selection .p-menu { opacity: 1; }
.p-menu:hover { background: #fff; }
.p-menu svg { fill: currentColor; }

/* ---- Bulk action bar (sticky, appears when items are selected) ---- */
.bulk-bar {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--navy); color: #fff;
  box-shadow: 0 -8px 24px rgba(41,70,90,.22);
}
.bulk-bar[hidden] { display: none; }
.bulk-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 24px; }
.bulk-count { font-weight: 800; white-space: nowrap; }
.bulk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bulk-move { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #dfeae7; }
.bulk-move select {
  font-size: 14px; padding: 8px 11px; border-radius: 9px; border: 1px solid transparent;
  background: #fff; color: var(--ink); max-width: 220px;
}
.bulk-bar .btn { padding: 9px 16px; font-size: 14px; }
.bulk-bar .btn-ghost { background: rgba(255,255,255,.14); color: #fff; }
.bulk-bar .btn-ghost:hover { background: rgba(255,255,255,.24); }
.bulk-apply[disabled] { opacity: .5; cursor: not-allowed; }
.bulk-msg { font-size: 13px; color: #cfe4dd; margin-left: auto; }

/* ---- Dialogs (product settings + collections manager) ---- */
.ws-dialog {
  width: min(720px, 94vw); border: none; border-radius: var(--radius); padding: 0;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
}
.ws-dialog.ws-dialog-sm { width: min(460px, 94vw); }
.ws-dialog::backdrop { background: rgba(24,40,52,.5); }
.pd-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pd-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.pd-close { border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.pd-close:hover { color: var(--navy); }
.pd-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 20px; }
.pd-image { display: flex; flex-direction: column; gap: 10px; }
.pd-preview { aspect-ratio: 1/1; background: #eef4f2; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.pd-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
.pd-preview.has-img img { display: block; }
.pd-preview.has-img .pd-preview-empty { display: none; }
.pd-preview-empty { color: var(--muted); font-size: 13px; }
.pd-hint { color: var(--muted); font-size: 12px; margin: 0; }
.pd-fields { display: flex; flex-direction: column; gap: 12px; }
.pd-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--navy); }
.pd-field input, .pd-field select, .pd-field textarea {
  font-size: 14px; font-weight: 500; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font-family: inherit;
}
.pd-field textarea { resize: vertical; min-height: 60px; }
.pd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-row .pd-narrow { max-width: 120px; }
.pd-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--line); }
.pd-actions-left, .pd-actions-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-actions .btn { padding: 9px 16px; font-size: 14px; }
.pd-msg { font-size: 13px; color: var(--muted); }
#cd-msg { text-align: center; }
.btn-danger { background: var(--sale); color: #fff; }
.btn-danger:hover { background: #96201a; }

/* Tag chips (product settings) */
.tag-control { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tag-control input { border: none; outline: none; flex: 1; min-width: 110px; font-size: 14px; font-weight: 500; padding: 4px; background: transparent; color: var(--ink); }
.tag-chips { display: contents; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; background: #e4f1ec; color: var(--brand-dark); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.tag-chip button { border: none; background: none; color: var(--brand-dark); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.tag-chip button:hover { color: var(--sale); }

/* Collections manager list */
.cd-new { display: flex; gap: 8px; padding: 16px 20px 8px; }
.cd-new input { flex: 1; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.cd-list { list-style: none; margin: 0; padding: 4px 20px 8px; max-height: 46vh; overflow-y: auto; }
.cd-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cd-item:last-child { border-bottom: none; }
.cd-item-main { flex: 1; min-width: 0; }
.cd-reorder { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.cd-move { border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 6px; width: 26px; height: 17px; padding: 0; font-size: 9px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.cd-move:hover:not([disabled]) { background: #eef4f2; }
.cd-move[disabled] { color: var(--muted); opacity: .4; cursor: not-allowed; }
.cd-item-name { font-weight: 700; color: var(--navy); }
.cd-item-count { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 6px; }
.cd-del { border: 1px solid var(--line); background: #fff; color: var(--sale); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cd-del:hover { background: var(--sale-bg); }
.cd-del[disabled] { color: var(--muted); cursor: not-allowed; opacity: .6; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .showcase, .features, .steps { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 8px; }
  .hero h1 { font-size: 38px; }
  .hero p.lead { font-size: 18px; }
  .hero-visual-wrap { margin-top: 34px; }
  .showcase.flip .copy { order: 0; }
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
  .board, .board.board-compact { grid-template-columns: 1fr 1fr; gap: 12px; }
  .board-stage { padding: 16px; }
  .btn-lg { padding: 13px 20px; font-size: 15px; }
  .hero-cta .btn { width: 100%; }
}
@media (max-width: 560px) {
  .pd-grid { grid-template-columns: 1fr; }
  .pd-image { max-width: 220px; }
}

/* Legal / prose pages (privacy) */
.legal { max-width: 760px; padding: 40px 20px 64px; }
.legal h1 { color: var(--navy); font-size: 30px; margin-bottom: 6px; }
.legal .legal-updated { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.legal h2 { color: var(--navy); font-size: 19px; margin: 30px 0 8px; }
.legal p { color: #33485a; line-height: 1.65; margin: 0 0 12px; }
.legal ul { color: #33485a; line-height: 1.65; margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--brand-dark); }

.show-more { display: block; margin: 24px auto 0; }

/* Visible keyboard-focus ring (does not show on mouse click). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.btn:focus-visible,
.user-dropdown-item:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Custom select chevron ----
   Replace the browsers' inconsistent native arrows with one styled chevron so
   every dropdown (filters, sort, dialogs, bulk bar, account) looks the same. */
.dash-controls select,
.bulk-move select,
.pd-field select,
.account-card select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2329465a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 34px;
}
/* Hide IE/legacy-Edge's default arrow so ours doesn't double up. */
.dash-controls select::-ms-expand,
.bulk-move select::-ms-expand,
.pd-field select::-ms-expand,
.account-card select::-ms-expand { display: none; }

/* ---- Sharing: dialog, share page, shared-item grid ---- */
.share-body { padding: 20px; }
.share-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.share-link-row { display: flex; gap: 8px; }
#share-msg { text-align: center; margin: 12px 0 0; }
#share-msg:empty { margin: 0; }
.share-url {
  flex: 1; min-width: 0; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
.share-link-row .btn { white-space: nowrap; }

.share-page { padding: 40px 20px 72px; }
.share-head { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.share-head h1 { color: var(--navy); font-size: 30px; margin: 8px 0 6px; }
.share-lead { color: var(--muted); font-size: 16px; margin: 0; }
.share-actions { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share-note { color: var(--muted); font-size: 13px; margin: 0; }

.share-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.share-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.share-card-img { display: block; aspect-ratio: 1 / 1; background: var(--bg); }
.share-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-card-img.no-img { display: flex; align-items: center; justify-content: center; }
.share-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.share-card-name { color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none; }
.share-card-name:hover:not(.no-link) { color: var(--brand-dark); text-decoration: underline; }
.share-card-name.no-link { pointer-events: none; }
.share-card-meta { color: var(--muted); font-size: 12px; min-height: 0; }
.share-card-price { display: flex; align-items: baseline; gap: 8px; }
.share-card-current { color: var(--navy); font-weight: 800; font-size: 16px; }
.share-card-was { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.share-card-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

@media (max-width: 560px) {
  .share-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .share-head h1 { font-size: 24px; }
}
