/**
 * accessories.css — Accessories/Add-ons archive (template #7704).
 * Loads only on the accessory category archives (see inc/enqueue.php).
 * Layout classes are scoped under .peb-accessories so they never collide with
 * the eBikes listing.css (which isn't loaded here). Mini-cart drawer is at body
 * level so it has its own .peb-acc-* prefix. Tokens only — no hardcoded hex.
 */

/* ---- Breadcrumb + category header ---- */
.peb-accessories .breadcrumb { font-size: 13px; color: var(--muted); font-weight: 600; padding: 16px 0 0; }
.peb-accessories .breadcrumb a { color: var(--muted); text-decoration: none; }
.peb-accessories .breadcrumb a:hover { color: var(--ink); }
.peb-accessories .breadcrumb .sep { margin: 0 8px; opacity: .5; }

.peb-accessories .cat-head { padding: 14px 0 22px; }
.peb-accessories .eyebrow {
	display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em;
	text-transform: uppercase; color: var(--accent-strong); margin-bottom: 8px;
}
.peb-accessories .cat-head h1 { font-family: var(--hfont); font-size: 34px; line-height: 1.1; margin: 0 0 10px; }
.peb-accessories .cat-head .intro { color: var(--muted); font-size: 16px; max-width: 52em; margin: 0; }

/* ---- Two-column listing layout ---- */
.peb-accessories .listing-layout { display: grid; grid-template-columns: 236px 1fr; gap: 32px; align-items: start; }

/* ---- Filter sidebar ---- */
.peb-accessories .filters { position: sticky; top: 84px; }
.peb-accessories .filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.peb-accessories .filters-head h2 { font-size: 16px; margin: 0; }
.peb-accessories .clear { font-size: 12.5px; font-weight: 700; color: var(--accent-strong); background: none; border: 0; cursor: pointer; padding: 4px; }
.peb-accessories .filter-group { border-top: 1px solid var(--border); padding: 14px 0; }
.peb-accessories .filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; }
.peb-accessories .filter-opt { min-height: 34px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.peb-accessories .filter-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.peb-accessories .filter-opt .cnt { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---- Toolbar ---- */
.peb-accessories .toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.peb-accessories .toolbar .count { font-size: 14px; color: var(--muted); }
.peb-accessories .toolbar .count b { color: var(--ink); }
.peb-accessories .toolbar .spacer { flex: 1; }
.peb-accessories .sortwrap { display: flex; align-items: center; gap: 8px; }
.peb-accessories .sortwrap label { font-size: 13px; color: var(--muted); font-weight: 700; }
.peb-accessories .sort {
	appearance: none; -webkit-appearance: none; border: 1px solid var(--border); background: var(--surface);
	border-radius: 999px; padding: 10px 36px 10px 16px; min-height: 44px; font-weight: 700; font-family: var(--bfont);
	cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
	background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.peb-accessories .filters-btn { display: none; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 9px 16px; min-height: 44px; font-weight: 700; cursor: pointer; }

/* ---- Product grid + cards ---- */
.peb-accessories .products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.peb-accessories .acard {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.peb-accessories .acard.incart { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.peb-accessories .pic { position: relative; aspect-ratio: 1/1; background: #fff; }
.peb-accessories .pic img { width: 100%; height: 100%; object-fit: contain; }
.peb-accessories .incart-badge {
	position: absolute; top: 10px; left: 10px; display: none; align-items: center; gap: 4px;
	background: var(--ok); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px;
}
.peb-accessories .acard.incart .incart-badge { display: inline-flex; }
.peb-accessories .b { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.peb-accessories .b h3 { font-size: 15px; line-height: 1.25; margin: 0; }
.peb-accessories .b h3 a { color: var(--ink); text-decoration: none; }
.peb-accessories .b h3 a:hover { color: var(--accent-strong); }
.peb-accessories .pr { font-family: var(--hfont); font-size: 18px; font-weight: 900; }
.peb-accessories .pr del { font-weight: 600; opacity: .6; font-size: 14px; }
.peb-accessories .pr ins { text-decoration: none; }
.peb-accessories .qa { margin-top: auto; }
.peb-accessories .oos { display: inline-block; color: var(--muted); font-weight: 700; font-size: 14px; padding: 11px 0; }

/* Quick-add stepper (replaces the Add button in place) */
.peb-accessories .stepper {
	display: flex; align-items: center; justify-content: space-between;
	border: 1.5px solid var(--accent); border-radius: 999px; overflow: hidden; height: 46px;
}
.peb-accessories .stepper button { background: var(--surface); border: 0; width: 46px; height: 100%; font-size: 20px; color: var(--accent-strong); font-weight: 800; cursor: pointer; }
.peb-accessories .stepper button:hover { background: var(--surface-2); }
.peb-accessories .stepper .q { font-weight: 800; font-size: 15px; text-align: center; }
.peb-accessories .stepper .q small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }

.peb-accessories #noResults { color: var(--muted); padding: 24px 0; }

/* ---- Mini-cart drawer (body-level) ---- */
.peb-acc-overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 45%); z-index: 980; opacity: 0; transition: opacity .28s; }
.peb-acc-overlay.open { opacity: 1; }
.peb-acc-minicart {
	position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92%;
	background: var(--surface); z-index: 981; display: flex; flex-direction: column;
	transform: translateX(100%); transition: transform .28s ease; box-shadow: -8px 0 30px rgb(0 0 0 / 18%);
}
.peb-acc-minicart.open { transform: translateX(0); }
.peb-acc-minicart > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.peb-acc-minicart > header h2 { font-size: 17px; margin: 0; }
.peb-acc-minicart .x { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; }
.peb-acc-minicart .mc-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.peb-acc-minicart .mc-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.peb-acc-minicart .mc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.peb-acc-minicart .mc-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.peb-acc-minicart .mc-row .nm { font-weight: 700; font-size: 14px; }
.peb-acc-minicart .mc-row .li-price { color: var(--muted); font-size: 13px; }
.peb-acc-minicart .mc-step { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.peb-acc-minicart .mc-step button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; font-weight: 800; cursor: pointer; }
.peb-acc-minicart .mc-step .n { min-width: 18px; text-align: center; font-weight: 800; }
.peb-acc-minicart > footer { padding: 18px 20px; border-top: 1px solid var(--border); }
.peb-acc-minicart .mc-subtotal { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 12px; }
.peb-acc-minicart .mc-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---- Header on this surface (accessories.md §1): cart pill is the CTA, so hide
   the "Reserve My eBike" button; emphasise the current "Accessories" nav item. ---- */
#brx-header .nav-right .btn.btn-primary { display: none; }
#brx-header .current-menu-item > a,
#brx-header .current-product_cat > a { color: var(--accent-strong); }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
	.peb-accessories .listing-layout { grid-template-columns: 196px 1fr; gap: 22px; }
	.peb-accessories .products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
	.peb-accessories .cat-head h1 { font-size: 26px; }
	.peb-accessories .listing-layout { grid-template-columns: 1fr; gap: 0; }
	.peb-accessories .filters { position: static; display: none; margin-bottom: 18px; }
	.peb-accessories .filters.open { display: block; }
	.peb-accessories .filters-btn { display: inline-flex; }
	.peb-accessories .products { grid-template-columns: repeat(2, 1fr); }
}
