/* =============================================================================
 * erp-shop.css — browse experience (Phase 3, tuju-shop)
 *
 * Covers `/shop/`, the 7 product-category archives, the 6 warehouse landings and
 * product search. Loaded ONLY on those screens (`erp_shop_enqueue()`), at
 * priority 20 so it lands after erp-layout.css AND after WooCommerce's own
 * `woocommerce-general` — source order is what wins the neutralisers at the end.
 *
 * ⚠️ This file is DELIBERATELY SMALL. The source's archive chrome is almost
 * entirely its own Bootstrap build plus utility classes:
 *   · `.category-hero`, `.category-header`, `.category-title`, `.category-body`,
 *     `.product-tool`, `.results-count`, `.right-column`, `.order-select` have
 *     ZERO rules in the source's app.css — they are structural hooks only.
 *   · `.pagination` / `.page-link` / `.card` / `.breadcrumb` / `.form-select`
 *     are already themed inside `vendor-bootstrap.css`, which IS the source's
 *     own compiled build (`--bs-primary:#0a1a3b`, grey pill pagination,
 *     borderless shadowed cards, `--bs-breadcrumb-margin-bottom:0`).
 * So everything below is either lifted verbatim from the source's app.css, or a
 * neutraliser for something WooCommerce injects that the source never had.
 * ========================================================================== */

/* -----------------------------------------------------------------------------
 * 0. ⚠️ CONTAINER WIDTH — a real bug, caught by the CDP diff.
 *
 * The source pins BOTH containers at 1320px **with `!important`**:
 *     body .container, body .container-fluid { max-width: 1320px !important }
 * `erp-tokens.css` reproduces that rule but WITHOUT the `!important`, and the
 * vendored Bootstrap build (the source's own) carries
 *     .container-fluid:not(.w-100.px-0) { max-width: 1920px }
 * whose `:not()` argument counts toward specificity — 0,3,0, which beats
 * `body .container-fluid` at 0,1,1. Result: every `-fluid` page ran full-bleed.
 * Measured at 1440: the source's content starts at x=110 (60px centring + 50px
 * padding); ours started at x=50, and the 5-up cards were ~35px too wide.
 *
 * `.container` pages were unaffected (Bootstrap's own xxl max-width is 1320), so
 * only the warehouse landings, `/products/` and search showed it.
 *
 * Fixed HERE, scoped to this phase's screens, because `erp-tokens.css` belongs
 * to P1. ⚠️ The same one-word fix is owed globally — reported in the phase return.
 * -------------------------------------------------------------------------- */
.erp-shop-page .container-fluid {
	max-width: var(--erp-container, 1320px) !important;
}

/* -----------------------------------------------------------------------------
 * 1. Breadcrumb strip — app.css, verbatim
 *    Shown on `/shop/`, the warehouse landings and search. NOT on a category
 *    archive: the source renders no breadcrumb there (category.html contains
 *    zero `breadcrumb-wrap`), and neither do we.
 * -------------------------------------------------------------------------- */
.breadcrumb-wrap {
	background-color: #fff;
	margin-bottom: 20px;
}

@media (max-width: 992px) {
	.breadcrumb-wrap {
		margin-bottom: 10px;
	}

	.breadcrumb-wrap .breadcrumb {
		padding-bottom: 0.4rem;
		padding-top: 0.4rem;
	}
}

/* -----------------------------------------------------------------------------
 * 2. Support-contact strip — app.css, verbatim (only the rules the compact
 *    variant on these four screens actually uses).
 * -------------------------------------------------------------------------- */
.support-contact-card {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(10, 26, 59, 0.08);
	border-radius: 22px;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	padding: 16px 18px;
}

.support-contact-card__content {
	min-width: 0;
}

.support-contact-card__description {
	color: #5e6776;
	font-size: 0.9rem;
	line-height: 1.55;
	margin: 0;
	max-width: 720px;
}

.support-contact-card__hint {
	align-items: center;
	align-self: flex-start;
	background: #f8fafc;
	border-radius: 12px;
	color: #0a1a3b;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.8rem;
	font-weight: 600;
	gap: 8px;
	line-height: 1.35;
	padding: 0.38rem 0.6rem;
	text-decoration: none;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.support-contact-card__hint:hover {
	background: #eef3ff;
	color: #0a1a3b;
	transform: translateY(-1px);
}

.support-contact-card__hint i {
	font-size: 0.86rem;
}

.support-contact-card--compact {
	border-radius: 16px;
	padding: 8px 10px;
}

.support-contact-card--compact .support-contact-card__description {
	font-size: 0.84rem;
	line-height: 1.45;
}

.support-contact-card--compact .support-contact-card__hint {
	font-size: 0.76rem;
	padding: 0.34rem 0.56rem;
}

@media (max-width: 768px) {
	.support-contact-card {
		align-items: flex-start;
		border-radius: 18px;
		flex-direction: column;
		gap: 8px;
		padding: 8px 10px;
	}

	.support-contact-card__description {
		font-size: 0.84rem;
		line-height: 1.45;
	}

	.support-contact-card__hint {
		align-self: stretch;
		justify-content: flex-start;
		width: 100%;
	}
}

/* -----------------------------------------------------------------------------
 * 3. Category archive
 *
 * ⚠️ NOTHING is styled here that the source styles itself. In particular
 * `.product-tool`, `.results-count` and `.order-select` get NO rules, because
 * the source gives them none: the tool bar is `d-flex justify-content-between`,
 * the count inherits the Bootstrap build's 0.8rem body scale, and the select is
 * a stock `.form-select`. Our added <form> wrapper sits at the same flex depth
 * as the source's inner <div>, so the row computes identically — including the
 * source's own two-line "Sort / by" label, which is a shrink-to-fit artefact of
 * `.form-select{width:100%}` and is reproduced rather than quietly "fixed".
 * (Flagged in the phase return; the one-line fix is a `white-space:nowrap` on
 * the label plus `width:auto` on the select, if the client wants it.)
 * -------------------------------------------------------------------------- */

/* ⚠️ The "View Category" pill — the second bug the CDP diff caught.
 *
 * `erp-tokens.css` styles the source's UNSIZED `.btn-outline-dark` (the hero
 * CTA): 999px radius, 8.8px/16px padding, 14.72px/600. Being a single-class rule
 * it also beats Bootstrap's `.btn-sm`, so the landing's small pill rendered
 * 41×143 at weight 600 where the source's is 26×100 at weight 400 — 14px taller,
 * which pushed every grid row down by 14px and the page by 15.
 *
 * Re-pointed at the `--bs-btn-*` custom properties that `.btn-sm` /
 * `.btn-outline-dark` already set on the element, so this reads Bootstrap's own
 * numbers rather than re-hard-coding them. Measured source values, for the
 * record: padding .25rem/.5rem · font .7rem/400 · radius .175rem · border #212529.
 * Scoped to this phase's screens because `erp-tokens.css` belongs to P1;
 * the general `.btn-sm` yielding fix is reported in the phase return. */
.erp-shop-page .btn-outline-dark.btn-sm {
	border-color: var(--bs-btn-border-color);
	border-radius: var(--bs-btn-border-radius);
	font-size: var(--bs-btn-font-size);
	font-weight: var(--bs-btn-font-weight, 400);
	line-height: var(--bs-btn-line-height, 1.5);
	padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
}

/* Category description: a HOOK, not seeded copy — the source ships no
   description on any of its 7 categories (all seven probed live, every
   `.category-header` holds exactly one element, the `<h1>`). It renders the
   moment a client fills the term description in wp-admin. */
.erp-shop-page--category .category-description {
	color: var(--erp-body-copy, #4a5a6d);
	font-size: 0.95rem;
	line-height: 1.7;
	margin-top: 12px;
	max-width: 860px;
}

.erp-shop-page--category .category-description > :last-child {
	margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
 * 4. Warehouse landing
 *
 * The hero is `card.border-0.shadow-sm > .card-body.p-4.p-lg-5` — all of it
 * already themed by the vendored Bootstrap build (`--bs-card-border-width:0`
 * plus its own box-shadow). Only the coverage strip needs anything, and that is
 * the source's own PDP alert component reused verbatim.
 * -------------------------------------------------------------------------- */
/* `term_description()` runs the note through `wpautop()`, so our description is
   `<div class="text-muted mb-0"><p>…</p></div>` where the source's is bare text.
   Bootstrap's `p{margin-bottom:1rem}` then collapses out of the div and made the
   hero card 231px instead of 215 — every section below it shifted 16px, which is
   what the CDP diff surfaced. `mb-0` on the wrapper cannot reach the child. */
.erp-shop-page--warehouse .card-body > .text-muted > :last-child {
	margin-bottom: 0;
}

.erp-warehouse-coverage {
	border-radius: 12px;
	max-width: 720px;
}

/* -----------------------------------------------------------------------------
 * 5. Empty state
 *    ⛔ NEVER the source's `image/no-data.svg` — it is watermarked with the
 *    the source platform wordmark as vector paths (invisible to a grep, plain
 *    to the eye). `erp_acct_no_data_svg()` returns P7's clean replacement.
 * -------------------------------------------------------------------------- */
.erp-shop-empty {
	padding: 56px 16px 72px;
}

.erp-shop-empty-art {
	height: auto;
	margin-bottom: 18px;
	max-width: 200px;
	opacity: 0.9;
}

.erp-shop-empty-title {
	color: #111;
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 6px;
}

.erp-shop-empty-text {
	color: #5e6776;
	font-size: 0.92rem;
	margin-bottom: 20px;
}

/* -----------------------------------------------------------------------------
 * 6. Non-product search results
 *    Only reachable with an explicit `?post_type=` other than product; products
 *    are the only card-able type, so these render as a plain list.
 * -------------------------------------------------------------------------- */
.erp-shop-results {
	margin: 0 auto;
	max-width: 860px;
}

.erp-shop-result {
	border-bottom: 1px solid rgba(10, 26, 59, 0.08);
	padding: 20px 0;
}

.erp-shop-result:last-child {
	border-bottom: 0;
}

.erp-shop-result-title {
	font-size: 1.25rem;
	margin-bottom: 6px;
}

.erp-shop-result-title a {
	color: var(--erp-navy, #0a1a3b);
}

.erp-shop-result-excerpt {
	color: #5e6776;
	font-size: 0.92rem;
}

/* -----------------------------------------------------------------------------
 * 7. WooCommerce neutralisers
 *
 * These templates never call `woocommerce_content()` or the default loop hooks,
 * so Woo's own archive furniture should not appear at all. These rules are the
 * belt to that braces: if a plugin (or a future `woocommerce.php` edit) re-adds
 * `woocommerce_breadcrumb` / `result_count` / `catalog_ordering` / the `ul.products`
 * loop on one of our screens, it stays hidden instead of double-rendering next to
 * the source's own chrome.
 * -------------------------------------------------------------------------- */
.erp-shop .woocommerce-breadcrumb,
.erp-shop .woocommerce-products-header,
.erp-shop .woocommerce-result-count,
.erp-shop .woocommerce-ordering,
.erp-shop ul.products,
.erp-shop nav.woocommerce-pagination {
	display: none !important;
}

/* Woo's notice list is kept — add-to-cart / wish-list feedback lands here — but
   it must sit inside our container rhythm rather than Woo's. */
.erp-shop .woocommerce-notices-wrapper {
	margin-bottom: 16px;
}

.erp-shop .woocommerce-notices-wrapper:empty {
	display: none;
}
