/* Veryplants Wholesale v2 — page styles
   Loaded AFTER ../wholesale_site/site.css. Holds layout for new surfaces
   (receipts, tax-exempt, application form, marketplace redirect)
   plus tweaks to v1 patterns. */

/* === Body baseline tweaks for v2 ======================================== */
.hdr { grid-template-columns: auto 1fr auto auto auto; }
.hdr .actions { gap: 10px; }
.hdr nav.primary a:hover,
.hdr nav.primary a.is-active { color: var(--vp-link); }
.hdr nav.primary a.is-active::after { background: var(--vp-orange); }
.hdr .login-btn { background: var(--vp-ink); color: white; }
.hdr .login-btn:hover { background: var(--vp-link); }

/* Drop the cart count when not logged in */
body:not(.is-logged-in) .cart-pill .n { display: none; }

/* Inline links inside copy */
.copy a { color: var(--vp-link); text-decoration: underline; text-underline-offset: 3px; }
.copy a:hover { color: var(--vp-link-hover); }

/* Section header reuse */
.s-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 24px; flex-wrap: wrap; }
.s-head h2 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); color: var(--vp-muted); margin: 6px 0 0; line-height: 1.1; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--vp-link); }

/* === Account chrome ==================================================== */
.acct { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 20px 0 40px; }
.acct-side { position: sticky; top: 84px; align-self: start; background: var(--vp-cream); padding: 22px; border: 1px solid var(--vp-line); }
.acct-side h4 { font-family: var(--font-display); font-size: 20px; color: var(--vp-ink); margin: 0 0 4px; }
.acct-side .sub { font-size: 12px; color: var(--vp-muted); margin: 0 0 16px; }
.acct-side nav { display: flex; flex-direction: column; gap: 2px; }
.acct-side nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--vp-ink); padding: 10px 12px; border-radius: 6px; }
.acct-side nav a:hover { background: white; text-decoration: none; }
.acct-side nav a.is-active { background: var(--vp-ink); color: white; }
.acct-side nav a .badge-n { background: var(--vp-orange); color: var(--vp-ink); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.acct-side nav a.is-active .badge-n { background: var(--vp-orange); color: var(--vp-ink); }
.acct-main h1 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 36px); color: var(--vp-ink); margin: 0 0 6px; line-height: 1.1; }
.acct-main .lede { font-size: 14px; color: var(--vp-muted); margin: 0 0 24px; }

/* === KPI strip (Receipts / dashboard) ================================ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 28px; }
.kpi { background: white; border: 1px solid var(--vp-line); padding: 18px 20px; }
.kpi.is-warn  { border-color: var(--vp-orange-700); border-left-width: 4px; }
.kpi.is-danger { border-color: var(--vp-error); border-left-width: 4px; }
.kpi .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vp-muted); }
.kpi .num { font-family: var(--font-display); font-size: 30px; color: var(--vp-ink); line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--vp-muted); }
.kpi.is-warn .num { color: var(--vp-orange-700); }
.kpi.is-danger .num { color: var(--vp-error); }
@media (max-width: 880px) { .kpi-row { grid-template-columns: 1fr 1fr; } }

/* === Filter tabs ======================================================= */
.filter-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--vp-line); margin-bottom: 16px; }
.filter-tabs a { padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--vp-muted); border-bottom: 2px solid transparent; }
.filter-tabs a:hover { color: var(--vp-ink); text-decoration: none; }
.filter-tabs a.is-active { color: var(--vp-ink); border-bottom-color: var(--vp-orange); }
.filter-tabs .count { background: var(--vp-cream); color: var(--vp-muted); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.filter-tabs a.is-active .count { background: var(--vp-ink); color: white; }

/* === Data table ======================================================== */
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; background: white; border: 1px solid var(--vp-line); }
.dtable th, .dtable td { padding: 14px 16px; text-align: left; font-size: 14px; vertical-align: middle; }
.dtable th { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vp-muted); background: var(--vp-cream); border-bottom: 1px solid var(--vp-line); }
.dtable tbody tr { border-top: 1px solid var(--vp-line); }
.dtable tbody tr:hover { background: var(--vp-cream); }
.dtable tbody tr:hover td.row-cta a { color: var(--vp-link); }
.dtable td.num { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.dtable td.row-cta { text-align: right; }
.dtable td .ref { font-family: var(--font-body); font-weight: 700; color: var(--vp-ink); }
.dtable td .meta { font-size: 12px; color: var(--vp-muted); margin-top: 2px; }
.dtable .empty { padding: 56px; text-align: center; color: var(--vp-muted); font-size: 14px; }
.dtable .empty .vp-h2 { display: block; margin-bottom: 8px; color: var(--vp-ink); }

/* === Single receipt doc layout ======================================== */
.doc-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 24px 28px; background: var(--vp-cream); border: 1px solid var(--vp-line); margin-bottom: 24px; }
.doc-head .h-no { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vp-muted); }
.doc-head h1 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); color: var(--vp-ink); margin: 4px 0 8px; line-height: 1.1; }
.doc-head .meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--vp-muted); }
.doc-head .meta strong { color: var(--vp-ink); display: block; font-weight: 600; }
.doc-head .actions-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }

.doc-summary { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.doc-summary .ds-card { background: white; border: 1px solid var(--vp-line); padding: 0; }
.doc-summary .ds-card h3 { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vp-muted); padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--vp-line); background: var(--vp-cream); }
.doc-summary .ds-body { padding: 18px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: 14px; }
.totals .label { color: var(--vp-muted); }
.totals .val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--vp-ink); text-align: right; }
.totals .grand { border-top: 1px solid var(--vp-line); padding-top: 12px; margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--vp-ink); }
.totals .grand .val { font-size: 22px; font-family: var(--font-display); }
.totals .out  { color: var(--vp-orange-700); }
.totals .out .val { color: var(--vp-orange-700); }

@media (max-width: 980px) {
  .acct { grid-template-columns: 1fr; }
  .acct-side { position: static; }
  .doc-summary { grid-template-columns: 1fr; }
}

/* === Tax-exempt tab ==================================================== */
.tax-card { background: white; border: 1px solid var(--vp-line); padding: 28px; }
.tax-status { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--vp-line); margin-bottom: 24px; }
.tax-status.is-ok      { border-color: var(--vp-trade-green-700); background: rgba(58,153,67,0.04); }
.tax-status.is-warn    { border-color: var(--vp-orange-700); background: rgba(242,146,48,0.06); }
.tax-status.is-expired { border-color: var(--vp-error); background: rgba(192,57,43,0.06); }
.tax-status .ico { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; flex: none; font-size: 18px; }
.tax-status.is-ok .ico      { background: var(--vp-trade-green-700); color: white; }
.tax-status.is-warn .ico    { background: var(--vp-orange-700); color: white; }
.tax-status.is-expired .ico { background: var(--vp-error); color: white; }
.tax-status h4 { margin: 0 0 2px; font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--vp-ink); }
.tax-status p  { margin: 0; font-size: 13px; color: var(--vp-muted); }
.tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .tax-grid { grid-template-columns: 1fr; } }

/* File upload drop zone */
.dropz { border: 1.5px dashed var(--vp-line-strong); padding: 28px; text-align: center; background: var(--vp-cream); cursor: pointer; }
.dropz:hover { border-color: var(--vp-ink); }
.dropz .ico { width: 36px; height: 36px; margin: 0 auto 8px; display: grid; place-items: center; background: white; border-radius: 999px; }
.dropz strong { display: block; font-size: 14px; color: var(--vp-ink); margin-bottom: 2px; }
.dropz span { font-size: 12px; color: var(--vp-muted); }

/* === Application form (4 steps) ====================================== */
.appform { background: white; border: 1px solid var(--vp-line); padding: 32px; }
.steps { display: flex; gap: 0; margin: 0 0 32px; border-bottom: 1px solid var(--vp-line); }
.steps .step { flex: 1; padding: 12px 14px; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 600; color: var(--vp-muted); display: flex; align-items: center; gap: 8px; }
.steps .step .n { width: 22px; height: 22px; border-radius: 999px; background: var(--vp-cream); color: var(--vp-muted); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.steps .step.is-active { color: var(--vp-ink); border-bottom-color: var(--vp-orange); }
.steps .step.is-active .n { background: var(--vp-ink); color: white; }
.steps .step.is-done { color: var(--vp-trade-green-700); }
.steps .step.is-done .n { background: var(--vp-trade-green-700); color: white; }
.fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.fieldset .full { grid-column: 1 / -1; }
.appform h2 { font-family: var(--font-display); font-size: 26px; color: var(--vp-ink); margin: 0 0 6px; line-height: 1.1; }
.appform .step-lede { font-size: 14px; color: var(--vp-muted); margin: 0 0 24px; max-width: 600px; }
.appform .nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--vp-line); }
@media (max-width: 720px) { .fieldset { grid-template-columns: 1fr; } .steps { flex-wrap: wrap; } .steps .step { flex: 1 1 50%; } }

/* === Marketplace redirect screen ====================================== */
.mr-screen { max-width: 640px; margin: 80px auto; background: white; border: 1px solid var(--vp-line); padding: 48px; text-align: center; }
.mr-screen .badge-channel { display: inline-flex; padding: 6px 14px; border-radius: 999px; background: var(--vp-cream); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vp-muted); margin-bottom: 18px; }
.mr-screen h1 { font-family: var(--font-display); font-size: 36px; color: var(--vp-ink); margin: 0 0 14px; line-height: 1.1; }
.mr-screen p { font-size: 15px; line-height: 1.6; color: var(--vp-body); margin: 0 0 24px; }

/* === Info band (cart/checkout/application) =========================== */
.info-band { background: var(--vp-cream); border: 1px solid var(--vp-line); padding: 16px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.info-band.is-active { border-color: var(--vp-trade-green-700); background: rgba(58,153,67,0.04); }
.info-band .ico { width: 32px; height: 32px; border-radius: 999px; background: var(--vp-orange); color: var(--vp-ink); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.info-band.is-active .ico { background: var(--vp-trade-green-700); color: white; }
.info-band .body { flex: 1; }
.info-band strong { display: block; font-size: 14px; color: var(--vp-ink); }
.info-band span { font-size: 13px; color: var(--vp-muted); }
.info-band .meter { width: 120px; height: 6px; background: white; border-radius: 999px; overflow: hidden; }
.info-band .meter > i { display: block; height: 100%; background: var(--vp-orange); border-radius: 999px; }
.info-band.is-active .meter > i { background: var(--vp-trade-green-700); }

/* === Hero / index v2 tweaks =========================================== */
.hero-v2 { background: var(--vp-cream); padding: 64px 0 72px; position: relative; }
.hero-v2 .grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero-v2 h1 { font-family: var(--font-display); font-size: clamp(40px, 5vw, 60px); color: var(--vp-muted); line-height: 1.05; margin: 14px 0 16px; }
.hero-v2 h1 em { font-style: normal; color: var(--vp-link); }
.hero-v2 .promise { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--vp-link); margin: 0 0 4px; }
.hero-v2 p.lede { font-size: 17px; line-height: 1.6; color: var(--vp-body); margin: 0 0 24px; max-width: 540px; }
.hero-v2 .cta-row { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.hero-v2 .stats { display: grid; grid-template-columns: repeat(3, auto); gap: 28px; padding-top: 24px; border-top: 1px solid var(--vp-line-strong); }
.hero-v2 .stats .num { font-family: var(--font-display); font-size: 28px; color: var(--vp-link); }
.hero-v2 .stats .lbl { font-size: 12px; color: var(--vp-muted); margin-top: 2px; }
.hero-v2 .photo { aspect-ratio: 4/5; overflow: hidden; }
.hero-v2 .photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 880px) {
  .hero-v2 .grid { grid-template-columns: 1fr; }
  .hero-v2 .photo { aspect-ratio: 4/3; }
}

/* === CTA band ========================================================== */
.cta-band { background: var(--vp-ink); color: white; padding: 64px 24px; text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 12px; line-height: 1.1; }
.cta-band p { max-width: 640px; margin: 0 auto 24px; font-size: 16px; line-height: 1.6; opacity: 0.85; }

/* === Stockist row (logo lockups) ====================================== */
.stockist-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.stockist-row .lc { background: var(--vp-cream); aspect-ratio: 3/2; display: grid; place-items: center; padding: 18px; border: 1px solid var(--vp-line); }
.stockist-row .lc img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0.7; filter: grayscale(1); transition: opacity var(--dur-base) var(--ease-out); }
.stockist-row .lc:hover img { opacity: 1; filter: none; }
@media (max-width: 880px) { .stockist-row { grid-template-columns: repeat(3, 1fr); } }

/* === Catalog grid (v2) ================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 880px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { position: relative; background: white; border: 1px solid var(--vp-line); display: flex; flex-direction: column; transition: box-shadow var(--dur-base) var(--ease-out); text-decoration: none; color: inherit; }
.cat-card__overlay { position: absolute; inset: 0; z-index: 1; text-indent: -9999px; overflow: hidden; }
.cat-card__overlay:focus-visible { outline: 2px solid var(--vp-trade-green); outline-offset: -3px; }
/* Only real links sit above the whole-card overlay anchor. Span "buttons"
   stay below, letting card clicks fall through to the overlay link. */
.cat-card .foot a { position: relative; z-index: 2; }
.cat-card, a.cat-card, a.cat-card:hover, a.cat-card:focus, a.cat-card:visited { text-decoration: none !important; color: inherit; }
.cat-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card .title, .cat-card .blurb, .cat-card .skus, .cat-card .foot { text-decoration: none !important; }
.cat-card .media { aspect-ratio: 1; padding: 24px; display: grid; place-items: center; position: relative; overflow: hidden; }
.cat-card .media img { max-width: 78%; max-height: 78%; object-fit: contain; }
.cat-card .media.aroid     { background: var(--vp-sage); }
.cat-card .media.succulent { background: var(--vp-pink); }
.cat-card .media.orchid    { background: var(--vp-peach); }
.cat-card .media.cream     { background: var(--vp-cream); }
.cat-card .media .chips { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.cat-card .body { padding: 18px 20px 22px; border-top: 1px solid var(--vp-line); display: flex; flex-direction: column; gap: 6px; }
.cat-card .title { font-family: var(--font-display); font-size: 22px; color: var(--vp-ink); line-height: 1.15; margin: 0; }
.cat-card .blurb { font-size: 13px; color: var(--vp-muted); margin: 2px 0 8px; line-height: 1.5; }
.cat-card .skus  { font-size: 12px; color: var(--vp-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cat-card .skus .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--vp-line-strong); }
.cat-card .foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.cat-card .foot .price { font-weight: 700; font-size: 18px; color: var(--vp-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cat-card .foot .price small { font-weight: 500; font-size: 12px; color: var(--vp-muted); margin-left: 4px; }
.cat-card .foot .locked { font-size: 13px; font-weight: 600; color: var(--vp-link); text-decoration: underline; }

/* Chip styles */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.chip--ink   { background: var(--vp-ink); color: white; }
.chip--orange{ background: var(--vp-orange); color: var(--vp-ink); }
.chip--green { background: var(--vp-trade-green-700); color: white; }
.chip--soft  { background: white; color: var(--vp-ink); border: 1px solid var(--vp-line); }
.chip--bilingual { background: var(--vp-orange-200); color: var(--vp-link); }
