/* Cart drawer + the buying vocabulary shared by the drawer, /cart/, /checkout/ and the
   confirmation (docs/CHECKOUT.md, direction D "Specimen + build sheet").
   Loaded on every page (the drawer can open anywhere); small on purpose. */
:root {
	--hrd-ink: #04011D;
	--hrd-sky: #91D2FF;
	--hrd-gray: #595959;
	--hrd-hair: #E6E6E6;
	--hrd-spec: #F0F0F0;
	--hrd-err: #990000;
	--hrd-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2'%3E%3Cpath d='M4.5 12.5 L9.5 17.5 L19.5 6.5'/%3E%3C/svg%3E");
	--hrd-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2'%3E%3Cpath d='M6 6 L18 18 M18 6 L6 18'/%3E%3C/svg%3E");
}

/* ---------- vocabulary ---------- */
.hrd-drawer, .hrd-drawer *, .hrd-drawer *::before, .hrd-drawer *::after, .hrd-btn, .hrd-cartbtn, .hrd-build, .hrd-build *, .hrd-warn, .hrd-shipnote, .hrd-meter, .hrd-cobar, .hrd-cofoot, .hrd-cf, .hrd-cf * { box-sizing: border-box; }
.hrd-micro { font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; }
.hrd-tlink { display: inline-flex; align-items: center; min-height: 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hrd-tlink:hover { text-decoration-thickness: 2px; }
.hrd-btn { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 52px; padding: 14px 20px; border: 1px solid var(--hrd-ink); border-radius: 0; background: var(--hrd-ink); color: #fff; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.hrd-btn:hover, .hrd-btn:focus-visible { background: var(--hrd-sky); border-color: var(--hrd-sky); color: var(--hrd-ink); }
.hrd-btn .hrd-slashes { --hz: 12px; color: var(--hrd-sky); }
.hrd-btn:hover .hrd-slashes, .hrd-btn:focus-visible .hrd-slashes { color: var(--hrd-ink); }
.hrd-btn--ghost { background: #fff; color: var(--hrd-ink); }
.hrd-garage-pill { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--hrd-spec); font-size: 13px; }
.hrd-garage-pill i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hrd-sky); box-shadow: 0 0 0 1px var(--hrd-ink); }

/* verdict marks: fits = sky disc, universal = outlined, no fit = ink (docs/PRODUCT-PAGE.md §9) */
.hrd-mark { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.hrd-mark svg { width: 11px; height: 11px; }
.hrd-mark--no-fit { background: var(--hrd-ink); color: #fff; }
.hrd-fitv { display: inline-flex; align-items: center; gap: 8px; }
.hrd-fitv::before { content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: 11px; }
.hrd-li-fit--fits .hrd-fitv { font-weight: 700; }
.hrd-li-fit--fits .hrd-fitv::before { background-color: var(--hrd-sky); background-image: var(--hrd-tick); }
.hrd-li-fit--universal .hrd-fitv::before { box-shadow: inset 0 0 0 1px var(--hrd-ink); background-image: var(--hrd-tick); }
.hrd-li-fit--no-fit .hrd-fitv { font-weight: 700; }
.hrd-li-fit--no-fit .hrd-fitv::before { background-color: var(--hrd-ink); background-image: var(--hrd-cross); filter: none; -webkit-mask: none; }
.hrd-li-fit--no-fit .hrd-fitv::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2'%3E%3Cpath d='M6 6 L18 18 M18 6 L6 18'/%3E%3C/svg%3E"); }
.hrd-fitv__swap, .hrd-fitv__check { display: inline-flex; align-items: center; min-height: 24px; color: var(--hrd-ink); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-underline-offset: 3px; }
.hrd-fitv__swap { margin-left: 28px; }

/* the build sheet head */
.hrd-build__hd { display: grid; gap: 6px; padding: 18px 20px 16px; background: var(--hrd-ink); color: #fff; }
.hrd-build__hd .hrd-micro { color: var(--hrd-sky); }
.hrd-build__car { margin: 0; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.045em; text-transform: uppercase; }
.hrd-build__hd .hrd-slashes { --hz: 10px; margin-top: 4px; color: var(--hrd-sky); }
.hrd-build__hd .hrd-tlink { justify-self: start; color: #fff; }
.hrd-build__hd p { margin: 0; }

/* free-shipping meter, ship note, the no-fit notice */
.hrd-meter { display: grid; gap: 8px; }
.hrd-meter p { margin: 0; }
.hrd-meter__t { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.hrd-meter__k { color: var(--hrd-gray); white-space: nowrap; }
.hrd-meter__bar { height: 4px; background: var(--hrd-hair); }
.hrd-meter__bar i { display: block; height: 100%; background: var(--hrd-sky); }
.hrd-shipnote { display: grid; gap: 6px; padding: 12px 14px; border-left: 3px solid var(--hrd-sky); background: #fff; font-size: 13px; line-height: 1.45; }
.hrd-shipnote p { margin: 0; }
.hrd-warn { display: grid; gap: 6px; padding: 14px 16px; border: 2px solid var(--hrd-ink); background: #fff; color: var(--hrd-ink); font-size: 14px; line-height: 1.45; }
.hrd-warn p { margin: 0; }
.hrd-warn__h { display: flex; align-items: center; gap: 10px; font-weight: 700; }

/* ---------- the drawer ---------- */
.hrd-cartbtn { position: relative; display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 43px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.hrd-cartbtn svg { width: 28px; height: 28px; }
.hrd-cartbtn__n { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hrd-sky); color: var(--hrd-ink); font-size: 11px; font-weight: 700; line-height: 18px; letter-spacing: 0; text-align: center; }
.hrd-cartbtn__n[hidden] { display: none; }
@media (max-width: 1023px), (max-aspect-ratio: 1/1) { /* the phone header's range (hrd.css) */
	.hrd-header__row .wp-block-hrd-cart-drawer { order: 4; min-width: 39px; width: 39px; }
	.hrd-header__row .hrd-cartbtn { min-width: 39px; }
}

.hrd-drawer[hidden] { display: none; }
.hrd-drawer { position: fixed; inset: 0; z-index: 1000; color: var(--hrd-ink); }
.hrd-drawer__dim { position: absolute; inset: 0; background: rgba(4, 1, 29, 0.55); }
.hrd-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(460px, 100%); background: #fff; letter-spacing: -0.025em; }
.hrd-drawer.is-opening .hrd-drawer__dim { animation: hrd-dim-in 0.18s ease-out both; }
.hrd-drawer.is-opening .hrd-drawer__panel { animation: hrd-panel-in 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes hrd-dim-in { from { opacity: 0; } }
@keyframes hrd-panel-in { from { transform: translateX(32px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.hrd-drawer.is-opening .hrd-drawer__dim, .hrd-drawer.is-opening .hrd-drawer__panel { animation: none; }
}
.hrd-drawer__hd { display: flex; flex: none; align-items: center; justify-content: space-between; height: 76px; padding: 0 16px 0 28px; border-bottom: 1px solid var(--hrd-hair); }
.hrd-drawer__title { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.04em; text-transform: uppercase; }
.hrd-drawer__title .hrd-micro { color: var(--hrd-gray); }
.hrd-drawer__x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
.hrd-drawer__body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 20px 24px; }
.hrd-drawer__scroll { display: contents; }
.hrd-drawer__ft { display: grid; flex: none; gap: 14px; padding: 18px 24px 22px; border-top: 1px solid var(--hrd-hair); }
.hrd-drawer__ft[hidden] { display: none; }
.hrd-drawer__ft p { margin: 0; }
.hrd-drawer__sub { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; }
.hrd-drawer__note { font-size: 13px; line-height: 1.45; color: var(--hrd-gray); }
.hrd-drawer__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--hrd-gray); }
.hrd-drawer__row .hrd-tlink { flex: none; color: var(--hrd-ink); white-space: nowrap; }
.hrd-drawer__empty { display: grid; gap: 18px; padding-top: 18px; }
.hrd-drawer__empty h3 { margin: 0; font-size: 34px; font-weight: 700; line-height: 0.95; letter-spacing: -0.05em; text-transform: uppercase; }
.hrd-drawer__empty .hrd-slashes { color: var(--hrd-ink); }
.hrd-drawer__busy { opacity: 0.55; pointer-events: none; }
.hrd-drawer__err { padding: 12px 14px; border: 2px solid var(--hrd-err); font-size: 14px; }

/* build sheet lines (drawer + confirmation share it) */
.hrd-build { border: 2px solid var(--hrd-ink); background: #fff; }
.hrd-build__body { margin: 0; padding: 0 20px; list-style: none; counter-reset: hrd-line; }
.hrd-bl { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--hrd-hair); counter-increment: hrd-line; }
.hrd-bl:last-child { border-bottom: 0; }
.hrd-bl__img { position: relative; width: 64px; height: 64px; background: var(--hrd-spec); }
.hrd-bl__img img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.hrd-bl__img::after { content: counter(hrd-line, decimal-leading-zero); position: absolute; left: -6px; bottom: -8px; padding: 2px 5px; background: var(--hrd-ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.hrd-bl__type { margin: 0; color: var(--hrd-gray); }
.hrd-bl__t { margin: 2px 0 0; font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.hrd-bl__t a { color: inherit; text-decoration: none; }
.hrd-bl__t a:hover { text-decoration: underline; }
.hrd-spec { display: grid; margin: 10px 0 0; border-top: 1px solid var(--hrd-hair); }
.hrd-spec > div { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; min-height: 30px; padding: 5px 0; border-bottom: 1px solid var(--hrd-hair); font-size: 13px; }
.hrd-spec dt { color: var(--hrd-gray); }
.hrd-spec dd { margin: 0; }
.hrd-bl__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.hrd-bl__price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hrd-bl__acts { display: flex; align-items: center; gap: 14px; }
.hrd-qty { display: inline-grid; grid-template-columns: 32px 34px 32px; align-items: center; height: 32px; border: 1px solid var(--hrd-ink); }
.hrd-qty button { height: 30px; padding: 0; border: 0; background: none; color: inherit; font-size: 16px; cursor: pointer; }
.hrd-qty button:disabled { color: #9a9a9a; cursor: default; }
.hrd-qty output { font-size: 14px; font-weight: 700; text-align: center; }
.hrd-bl__rm { color: var(--hrd-gray); }

@media (max-width: 768px) {
	.hrd-drawer__hd { height: 64px; padding: 0 8px 0 16px; }
	.hrd-drawer__body { padding: 16px; }
	.hrd-drawer__ft { padding: 16px 16px 20px; }
	.hrd-build__car { font-size: 22px; }
	.hrd-build__body { padding: 0 14px; }
}
/* D's small category label above the name, and "$120 each" under the line price (2026-11-07 audit) */
.hrd-bl__cat { margin: 0 0 4px; color: var(--hrd-gray); }
.hrd-bl__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.hrd-bl__each { margin-top: 2px; color: var(--hrd-gray); font-size: 11px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }

/* Transparent phone touch areas leave the quantity grid and Remove text in place. */
@media (max-width: 781px) {
	.hrd-drawer .hrd-qty button,
	.hrd-drawer .hrd-bl__rm { position: relative; }
	.hrd-drawer .hrd-qty button::before,
	.hrd-drawer .hrd-bl__rm::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}

/* Short landscape screens: items and totals share the space below the header.
   Keeping the header outside this scroller also keeps keyboard focus clear of it. */
@media (max-height: 500px) and (orientation: landscape) {
	.hrd-drawer__scroll { display: block; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
	.hrd-drawer__body { flex: none; overflow: visible; }
}
