/* EBIKE Storefront. Tokens come from theme.json; this file styles shop components. */
:root {
	--ebs-ink: var(--wp--preset--color--contrast);
	--ebs-muted: var(--wp--preset--color--muted);
	--ebs-line: var(--wp--preset--color--line);
	--ebs-surface: var(--wp--preset--color--surface);
	--ebs-accent: var(--wp--preset--color--accent);
	--ebs-accent-strong: var(--wp--preset--color--accent-strong);
	--ebs-radius: var(--wp--custom--radius);
	--ebs-focus: 0 0 0 2px #fff, 0 0 0 4px var(--wp--preset--color--contrast);
}
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: none; box-shadow: var(--ebs-focus); border-radius: 3px; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* ---------- Header ---------- */
.ebs-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--ebs-line); }
.admin-bar .ebs-header { top: var(--wp-admin--admin-bar--height, 0); }
.ebs-header-row { min-height: 72px; gap: 1.5rem; }
.ebs-brand { gap: .75rem; flex: 0 0 auto; }
.ebs-brand .wp-block-site-logo img { display: block; max-height: 44px; width: auto; }
.ebs-brand .wp-block-site-logo + .wp-block-site-title { border: 0; clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.ebs-brand .wp-block-site-title a { color: var(--ebs-ink); }
.ebs-nav { flex: 1 1 auto; }
.ebs-nav .wp-block-navigation__container { gap: clamp(.75rem, 2vw, 1.75rem); }
.ebs-nav .wp-block-navigation-item__content { padding: .5rem 0; border-bottom: 2px solid transparent; }
.ebs-nav .wp-block-navigation-item__content:hover,
.ebs-nav .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--ebs-accent-strong); }
.ebs-tools { gap: .25rem; flex: 0 0 auto; }
.ebs-tools .wp-block-search__button,
.ebs-tools .wc-block-mini-cart__button,
.ebs-tools .wp-block-woocommerce-customer-account a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .5rem; margin: 0; background: none; color: var(--ebs-ink); border: 0; border-radius: var(--ebs-radius); }
.ebs-tools .wp-block-search__button:hover,
.ebs-tools .wc-block-mini-cart__button:hover,
.ebs-tools .wp-block-woocommerce-customer-account a:hover { background: var(--ebs-surface); }
.ebs-tools .wp-block-search__input { border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); padding: .5rem .75rem; font: inherit; min-width: 0; }
.ebs-tools .wp-block-search__inside-wrapper { border: 0; padding: 0; }
.ebs-tools .wc-block-mini-cart__badge { background: var(--ebs-accent); color: var(--ebs-ink); font-weight: 700; }
@media (max-width: 599px) {
	.ebs-header-row { min-height: 60px; gap: .5rem; }
	.ebs-nav { order: -1; flex: 0 0 auto; }
	.ebs-brand { flex: 1 1 auto; }
	.ebs-brand .wp-block-site-logo img { max-height: 34px; }
}
.ebs-nav .wp-block-navigation__responsive-container-open, .ebs-nav .wp-block-navigation__responsive-container-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
@media (min-width: 600px) { .ebs-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none; } }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; font-weight: 600; padding: .6rem 0; }

/* ---------- Layout ---------- */
.ebs-main, .ebs-product { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--60); }
.ebs-main > .wp-block-post-title, .ebs-main > .wp-block-query-title { margin-bottom: var(--wp--preset--spacing--40); }

/* ---------- Breadcrumbs ---------- */
.woocommerce .woocommerce-breadcrumb, .wc-block-breadcrumbs, .wp-block-woocommerce-breadcrumbs { font-size: .8125rem; color: var(--ebs-muted); margin-bottom: 1.25rem; }
.wp-block-woocommerce-breadcrumbs a { color: var(--ebs-muted); text-decoration: none; }
.wp-block-woocommerce-breadcrumbs a:hover { color: var(--ebs-ink); text-decoration: underline; }

/* ---------- Product: top section ---------- */
.ebs-product-top { gap: clamp(1.5rem, 4vw, 4rem); margin-bottom: var(--wp--preset--spacing--50); align-items: flex-start; }
.ebs-product-summary > * { margin-block: 0 1rem; }
.ebs-product-brand { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ebs-muted); margin-bottom: .35rem !important; }
.ebs-product-brand a { color: inherit; text-decoration: none; }
.ebs-product-brand a:hover { color: var(--ebs-ink); }
.ebs-product-title { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.15; letter-spacing: -.02em; margin-bottom: .75rem !important; }
.ebs-product-summary .wc-block-components-product-price { font-size: 1.625rem; }
.ebs-product-summary .wc-block-components-product-price del { color: var(--ebs-muted); font-weight: 400; font-size: .7em; margin-right: .4em; }
.ebs-product-summary .wc-block-components-product-price ins { text-decoration: none; color: var(--wp--preset--color--alert); }
.ebs-product-summary .wp-block-post-excerpt { color: var(--ebs-muted); font-size: .9375rem; }
.ebs-product-summary .wp-block-post-excerpt__excerpt { margin: 0; }
.ebs-product-summary .wp-block-woocommerce-product-meta { font-size: .8125rem; color: var(--ebs-muted); }

/* Gallery: thumbnails in a column beside the image on wide screens */
.ebs-product-media .wp-block-woocommerce-product-image-gallery { max-width: none; width: 100%; }
.ebs-product-media .woocommerce-product-gallery { position: relative; width: 100% !important; float: none !important; margin: 0; opacity: 1 !important; }
.ebs-product-media .woocommerce-product-gallery .flex-viewport,
.ebs-product-media .woocommerce-product-gallery__wrapper { background: #fff; border-radius: calc(var(--ebs-radius) * 2); overflow: hidden; margin: 0; }
.ebs-product-media .woocommerce-product-gallery .flex-viewport, .ebs-product-media .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper { border: 1px solid var(--ebs-line); }
.ebs-product-media .woocommerce-product-gallery__image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.ebs-product-media .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: .75rem 0 0; padding: 0; }
.ebs-product-media .flex-control-thumbs li { width: 72px !important; float: none !important; margin: 0 !important; }
.ebs-product-media .flex-control-thumbs img { display: block; width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--ebs-line); outline: 2px solid transparent; outline-offset: -2px; border-radius: var(--ebs-radius); cursor: pointer; opacity: 1 !important; }
.ebs-product-media .flex-control-thumbs img.flex-active, .ebs-product-media .flex-control-thumbs img:hover { outline-color: var(--ebs-ink); }
.ebs-product-media .woocommerce-product-gallery__trigger { position: absolute; top: .75rem; right: .75rem; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.ebs-product-media .onsale, .ebs-product-media .wc-block-components-product-sale-badge { position: absolute; top: .75rem; left: .75rem; z-index: 5; background: var(--wp--preset--color--alert); color: #fff; border: 0; border-radius: 3px; padding: .2rem .55rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; min-height: 0; min-width: 0; line-height: 1.5; }
@media (max-width: 999px) {
	.ebs-product-media .flex-control-thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.ebs-product-media .flex-control-thumbs li { flex: 0 0 72px; }
}
@media (min-width: 1000px) {
	.ebs-product-media .woocommerce-product-gallery:has(.flex-control-thumbs) { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .75rem; align-items: start; }
	.ebs-product-media .woocommerce-product-gallery:has(.flex-control-thumbs) .flex-viewport { grid-column: 2; grid-row: 1; }
	.ebs-product-media .woocommerce-product-gallery .flex-control-thumbs { grid-column: 1; grid-row: 1; flex-direction: column; flex-wrap: nowrap; margin: 0; max-height: 620px; overflow-y: auto; scrollbar-width: thin; }
}

/* Variation form */
.ebs-product-summary form.cart { margin: 1.25rem 0 0; }
.ebs-product-summary table.variations { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 .25rem; }
.ebs-product-summary table.variations, .ebs-product-summary table.variations tbody { display: block; }
.ebs-product-summary table.variations tr { display: block; margin-bottom: 1.25rem; }
.ebs-product-summary table.variations th, .ebs-product-summary table.variations td { display: block; position: relative; padding: 0 !important; border: 0; text-align: left; background: none; }
.ebs-product-summary table.variations th.label { line-height: 1.3; height: auto; }
.ebs-product-summary table.variations label { display: block; font-size: .875rem; font-weight: 700; line-height: 1.3; margin: 0 0 .5rem; padding: 0; }
.ebs-product-summary table.variations td.value { line-height: 1.3; }
.ebs-option-current { font-weight: 400; color: var(--ebs-muted); }
.ebs-product-summary table.variations select { width: 100%; max-width: 320px; min-height: 46px; padding: .5rem .75rem; font: inherit; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); background-color: #fff; color: var(--ebs-ink); }
.ebs-has-options .ebs-native-select { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; border: 0 !important; }
.ebs-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.ebs-option { min-width: 48px; min-height: 44px; padding: .4rem .9rem; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--ebs-ink); background: #fff; border: 1px solid #c9c6bb; border-radius: var(--ebs-radius); cursor: pointer; transition: border-color .12s, background-color .12s; }
.ebs-option:hover { border-color: var(--ebs-ink); }
.ebs-option.is-selected { background: var(--ebs-accent); border-color: var(--ebs-ink); box-shadow: inset 0 0 0 1px var(--ebs-ink); }
.ebs-option.is-unavailable { color: #8b8f8c; background: repeating-linear-gradient(135deg, #fff 0 6px, #f1f0ea 6px 7px); border-color: var(--ebs-line); cursor: not-allowed; text-decoration: line-through; }
.ebs-option-swatch { min-width: 44px; width: 44px; padding: 0; border-radius: 50%; background: #fff; position: relative; }
.ebs-option-swatch::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--ebs-swatch); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.ebs-option-swatch.is-selected { background: #fff; border-color: var(--ebs-ink); box-shadow: 0 0 0 1px var(--ebs-ink); }
.ebs-option-swatch.is-unavailable { background: #fff; opacity: .45; }
.ebs-option-swatch.is-unavailable::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; background: var(--ebs-ink); transform: rotate(45deg); }
.ebs-product-summary .reset_variations[style*="hidden"] { display: none !important; }
.ebs-product-summary .reset_variations { display: inline-block; margin-top: .5rem; font-size: .8125rem; color: var(--ebs-muted); }
.ebs-product-summary .woocommerce-variation-price { margin: .25rem 0 .75rem; font-size: 1.25rem; font-weight: 700; }
.ebs-product-summary .woocommerce-variation-availability p, .ebs-product-summary p.stock { margin: 0 0 .9rem; font-size: .875rem; font-weight: 600; }
.ebs-product-summary .stock.in-stock { color: var(--wp--preset--color--positive); }
.ebs-product-summary .stock.in-stock::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: currentColor; }
.ebs-product-summary .stock.out-of-stock { color: var(--wp--preset--color--alert); }
.ebs-product-summary .woocommerce-variation-add-to-cart, .ebs-product-summary form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; }
.ebs-product-summary .quantity { margin: 0; }
.ebs-product-summary .quantity .qty { width: 76px; height: 52px; padding: 0 .5rem; font: inherit; font-weight: 600; text-align: center; border: 1px solid #c9c6bb; border-radius: var(--ebs-radius); background: #fff; color: var(--ebs-ink); }
.ebs-product-summary .single_add_to_cart_button { flex: 1 1 220px; min-height: 52px; margin: 0; padding: 0 1.5rem; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ebs-ink); background: var(--ebs-accent); border: 0; border-radius: var(--ebs-radius); cursor: pointer; transition: background-color .12s; }
.ebs-product-summary .single_add_to_cart_button:hover { background: var(--ebs-accent-strong); }
.ebs-product-summary .single_add_to_cart_button.disabled, .ebs-product-summary .single_add_to_cart_button:disabled { background: #ecebe5; color: #6f7471; cursor: not-allowed; opacity: 1; }

/* ---------- Key facts ---------- */
.ebs-product-facts:empty { display: none; }
.ebs-product-facts .ebc-key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; list-style: none; margin: 0 0 var(--wp--preset--spacing--50); padding: 0; border: 1px solid var(--ebs-line); border-radius: calc(var(--ebs-radius) * 2); background: var(--ebs-surface); overflow: hidden; }
.ebs-product-facts .ebc-fact { margin: 0; padding: 1.1rem 1rem; text-align: center; border-right: 1px solid var(--ebs-line); margin-right: -1px; border-bottom: 1px solid var(--ebs-line); margin-bottom: -1px; }
.ebs-product-facts .ebc-fact-value { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; opacity: 1; }
.ebs-product-facts .ebc-fact-label { display: block; margin-top: .2rem; font-size: .8125rem; color: var(--ebs-muted); opacity: 1; }

/* ---------- Tabs ---------- */
.ebs-tabs { margin-bottom: var(--wp--preset--spacing--60); }
.ebs-tablist { display: none; }
.ebs-tabs.is-enhanced .ebs-tablist { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--ebs-line); margin-bottom: var(--wp--preset--spacing--40); }
.ebs-tablist::-webkit-scrollbar { display: none; }
.ebs-tab { flex: 0 0 auto; min-height: 48px; padding: .9rem 0; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--ebs-muted); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.ebs-tab:hover { color: var(--ebs-ink); }
.ebs-tab[aria-selected="true"] { color: var(--ebs-ink); border-bottom-color: var(--ebs-accent-strong); }
.ebs-tab:focus-visible { box-shadow: none; outline: 2px solid var(--ebs-ink); outline-offset: -4px; }
.ebs-tab-panel { max-width: 920px; margin-bottom: var(--wp--preset--spacing--50); }
.ebs-tab-panel:focus-visible { box-shadow: none; outline: 2px solid var(--ebs-line); outline-offset: 8px; }
.ebs-tab-heading { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 1rem; }
.ebs-tabs.is-enhanced .ebs-tab-heading { border: 0; clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.ebs-tab-panel h2, .ebs-tab-panel h3 { margin: 1.75rem 0 .6rem; }
.ebs-tab-panel > :first-child, .ebs-tab-panel .ebc-specs > :first-child h3 { margin-top: 0; }
.ebs-tab-panel p { margin: 0 0 1rem; }
#ebs-tab-ebc_geometry, #ebs-tab-ebc_specs { max-width: none; }

/* Specification tables (markup from EBIKE Core) */
.ebs-tab-panel .ebc-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 clamp(1.5rem, 4vw, 4rem); }
.ebs-tab-panel .ebc-spec-group { margin: 0 0 2rem; break-inside: avoid; }
.ebs-tab-panel .ebc-spec-group h3 { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ebs-muted); margin: 0 0 .25rem; }
.ebs-tab-panel .ebc-spec-table, .ebs-tab-panel .ebc-geo-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ebs-tab-panel .ebc-spec-table th, .ebs-tab-panel .ebc-spec-table td, .ebs-tab-panel .ebc-geo-table th, .ebs-tab-panel .ebc-geo-table td { padding: .65rem 0; border: 0; border-bottom: 1px solid var(--ebs-line); text-align: left; vertical-align: top; background: none; }
.ebs-tab-panel .ebc-spec-table th { width: 42%; padding-right: 1rem; font-weight: 500; color: var(--ebs-muted); }
.ebs-tab-panel .ebc-spec-table td { font-weight: 500; }
.ebs-tab-panel .ebc-scroll { overflow-x: auto; }
.ebs-tab-panel .ebc-geo-table { min-width: 520px; font-variant-numeric: tabular-nums; }
.ebs-tab-panel .ebc-geo-table th, .ebs-tab-panel .ebc-geo-table td { padding: .65rem .9rem; white-space: nowrap; }
.ebs-tab-panel .ebc-geo-table td, .ebs-tab-panel .ebc-geo-table thead th:not(:first-child) { text-align: right; }
.ebs-tab-panel .ebc-geo-table thead th { font-weight: 700; border-bottom: 2px solid var(--ebs-ink); }
.ebs-tab-panel .ebc-geo-table tbody th { font-weight: 500; color: var(--ebs-muted); padding-left: 0; }
.ebs-tab-panel .ebc-unit, .ebs-tab-panel .ebc-doc-meta { color: var(--ebs-muted); font-size: .875em; font-weight: 400; opacity: 1; }
.ebs-tab-panel .ebc-included, .ebs-tab-panel .ebc-documents { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.ebs-tab-panel .ebc-included li { position: relative; margin: 0; padding: .55rem 0 .55rem 1.75rem; border-bottom: 1px solid var(--ebs-line); }
.ebs-tab-panel .ebc-included li::before { content: ""; position: absolute; left: .2rem; top: 1rem; width: .75rem; height: .4rem; border-left: 2px solid var(--wp--preset--color--positive); border-bottom: 2px solid var(--wp--preset--color--positive); transform: rotate(-45deg); }
.ebs-tab-panel .ebc-documents li { margin: 0; padding: .75rem 0; border-bottom: 1px solid var(--ebs-line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ebs-tab-panel .ebc-documents a { font-weight: 600; }
@media (max-width: 600px) {
	.ebs-tab-panel .ebc-spec-table th, .ebs-tab-panel .ebc-spec-table td { display: block; width: auto; }
	.ebs-tab-panel .ebc-spec-table th { border-bottom: 0; padding-bottom: 0; font-size: .8125rem; }
	.ebs-tab-panel .ebc-spec-table td { padding-top: .15rem; }
}

/* ---------- Related products / product cards ---------- */
.wp-block-woocommerce-related-products > h2, .related.products > h2 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: 1.25rem; }
.wc-block-product, li.product { text-align: left; }
.wc-block-product .wc-block-components-product-image, li.product a img { background: #fff; border: 1px solid var(--ebs-line); border-radius: calc(var(--ebs-radius) * 2); overflow: hidden; }
.wc-block-product .wc-block-components-product-image img, li.product a img { aspect-ratio: 4 / 3; object-fit: contain; }
.wc-block-product .wp-block-post-title, li.product .woocommerce-loop-product__title { font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.wc-block-product .wp-block-post-title a { text-decoration: none; }

/* ---------- Sticky buy bar (small screens) ---------- */
.ebs-sticky-buy { display: none; }
@media (max-width: 781px) {
	.ebs-sticky-buy:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ebs-line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
	.ebs-sticky-price { font-weight: 700; font-size: 1.0625rem; }
	.ebs-sticky-price * { margin: 0; font-size: inherit; }
	.ebs-sticky-btn { flex: 0 1 60%; min-height: 48px; border: 0; cursor: pointer; }
	body:has(.ebs-sticky-buy:not([hidden])) .ebs-footer { padding-bottom: 5rem; }
}

/* ---------- Footer ---------- */
.ebs-footer { background: var(--ebs-ink); color: #fff; padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.ebs-footer a { color: #fff; }
.ebs-footer .wp-block-site-title a { text-decoration: none; }
.ebs-footer .wp-block-site-tagline { color: #b8bcb9; font-size: .875rem; margin-top: .35rem; }
.ebs-footer-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(120px, auto)); gap: .5rem 2.5rem; font-size: .9375rem; }
.ebs-footer-pages a { text-decoration: none; color: #dfe2df; }
.ebs-footer-pages a:hover { color: #fff; text-decoration: underline; }

/* ---------- Notices ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { border-radius: var(--ebs-radius); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Listings: header, filters, product cards ---------- */
.ebs-shop-header { max-width: var(--wp--style--global--wide-size); margin-inline: auto; margin-bottom: 1.75rem; }
.ebs-shop-header .ebs-kicker { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ebs-muted); margin: 0 0 .35rem; font-weight: 600; }
.ebs-shop-title { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0; font-weight: 800; }
.ebs-shop-intro { max-width: 62ch; color: var(--ebs-muted); margin-top: .75rem; }
.ebs-shop-intro p { margin: 0 0 .5rem; }
.ebs-shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.ebs-shop-layout > * { margin-block-start: 0 !important; min-width: 0; }
.ebs-shop-layout > :only-child { grid-column: 1 / -1; }

.ebs-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.ebs-filters-title { font-size: 1rem; margin: 0; font-weight: 700; }
.ebs-filters-close { width: 44px; height: 44px; border: 0; background: none; font-size: 1.75rem; line-height: 1; cursor: pointer; color: var(--ebs-ink); display: none; }
.ebs-filter { border: 0; border-top: 1px solid var(--ebs-line); margin: 0; padding: 1rem 0; min-width: 0; }
.ebs-filter-title { font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .6rem; padding: 0; }
.ebs-filter ul { list-style: none; margin: 0; padding: 0; }
.ebs-filter-options li label, .ebs-filter-links li { display: flex; align-items: center; gap: .6rem; min-height: 36px; font-size: .9375rem; cursor: pointer; }
.ebs-filter-links li { cursor: default; }
.ebs-filter-links a { color: var(--ebs-ink); text-decoration: none; flex: 1 1 auto; padding: .35rem 0; }
.ebs-filter-links a:hover { text-decoration: underline; }
.ebs-filter-links a[aria-current] { font-weight: 700; }
.ebs-filter-name { flex: 1 1 auto; }
.ebs-count { color: var(--ebs-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.ebs-filter-options input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--ebs-ink); flex: 0 0 auto; }
.ebs-filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ebs-filter-chips li label { position: relative; min-height: 40px; min-width: 44px; justify-content: center; padding: 0 .7rem; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); background: #fff; font-weight: 600; font-size: .875rem; gap: 0; }
.ebs-filter-chips input[type=checkbox] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ebs-filter-chips .ebs-count { display: none; }
.ebs-filter-chips li label:has(input:checked) { background: var(--ebs-accent); border-color: var(--ebs-ink); }
.ebs-filter-chips li label:has(input:focus-visible) { box-shadow: var(--ebs-focus); }
.ebs-filter-more { margin-top: .5rem; }
.ebs-filter-more summary { cursor: pointer; font-size: .875rem; text-decoration: underline; min-height: 36px; display: flex; align-items: center; }
.ebs-filter-more[open] summary { margin-bottom: .4rem; }
.ebs-filter-price { display: flex; align-items: center; gap: .5rem; }
.ebs-filter-price label { flex: 1 1 0; min-width: 0; }
.ebs-filter-price input { width: 100%; min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); font: inherit; background: #fff; }
.ebs-filter-actions { display: flex; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--ebs-line); background: var(--wp--preset--color--base); padding-bottom: .75rem; }
.ebs-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.25rem; border: 0; border-radius: var(--ebs-radius); background: var(--ebs-ink); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.ebs-button:hover { background: #000; color: #fff; }
.ebs-filter-clear { font-size: .875rem; color: var(--ebs-ink); }

.ebs-shop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; clear: both; width: 100%; }
.ebs-filters-open { display: none; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--ebs-ink); border-radius: var(--ebs-radius); color: var(--ebs-ink); text-decoration: none; font-weight: 600; background: #fff; }
.ebs-filters-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 999px; background: var(--ebs-accent); font-size: .75rem; }
.ebs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.ebs-chips a { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .75rem; border-radius: 999px; background: var(--ebs-surface); border: 1px solid var(--ebs-line); color: var(--ebs-ink); font-size: .8125rem; text-decoration: none; }
.ebs-chips a:hover { border-color: var(--ebs-ink); }
.ebs-no-results { margin-top: 1rem; }

.ebs-shop .woocommerce-result-count { float: left; margin: 0 0 1.25rem; min-height: 44px; display: flex; align-items: center; color: var(--ebs-muted); font-size: .875rem; }
.ebs-shop .woocommerce-ordering { float: right; margin: 0 0 1.25rem; }
.ebs-shop .woocommerce-ordering select { min-height: 44px; padding: .4rem 2rem .4rem .75rem; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); font: inherit; font-size: .875rem; background-color: #fff; max-width: 100%; }
.ebs-shop ul.products { clear: both; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.ebs-shop ul.products::before, .ebs-shop ul.products::after { content: none; display: none; }
.ebs-shop ul.products li.product.ebs-card { float: none; width: auto; margin: 0; padding: 0; }
.ebs-card-link { display: flex; flex-direction: column; height: 100%; color: var(--ebs-ink); text-decoration: none; border: 1px solid var(--ebs-line); border-radius: calc(var(--ebs-radius) * 1.5); background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.ebs-card-link:hover { border-color: var(--ebs-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.ebs-card-link:focus-visible { box-shadow: var(--ebs-focus); }
.ebs-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--ebs-surface); }
.ebs-shop ul.products li.product .ebs-card-media img { width: 100%; height: 100%; object-fit: contain; margin: 0; padding: .75rem; display: block; mix-blend-mode: multiply; }
.ebs-card-badge { position: absolute; top: .75rem; left: .75rem; padding: .2rem .6rem; border-radius: 999px; background: var(--ebs-accent); font-size: .75rem; font-weight: 700; }
.ebs-card-body { padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1 1 auto; }
.ebs-card-body p { margin: 0; }
.ebs-card-brand { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ebs-muted); font-weight: 600; }
.ebs-card-title { font-family: inherit; font-size: 1rem; line-height: 1.3; font-weight: 600; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ebs-card-facts { font-size: .8125rem; color: var(--ebs-muted); }
.ebs-card-price { font-size: 1.0625rem; font-weight: 700; margin-top: auto !important; padding-top: .5rem; }
.ebs-card-price del { color: var(--ebs-muted); font-weight: 400; font-size: .875rem; margin-right: .35rem; }
.ebs-card-price ins { text-decoration: none; }
.ebs-card-options { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--ebs-muted); min-height: 18px; }
.ebs-card-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); flex: 0 0 auto; }
.ebs-card-sizes { margin-left: auto; }
.ebs-shop .woocommerce-pagination { clear: both; margin-top: 2rem; text-align: center; }
.ebs-shop .woocommerce-pagination ul.page-numbers { display: inline-flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; border: 0; }
.ebs-shop .woocommerce-pagination ul.page-numbers li { border: 0; float: none; }
.ebs-shop .woocommerce-pagination .page-numbers a, .ebs-shop .woocommerce-pagination .page-numbers span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .5rem; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); color: var(--ebs-ink); text-decoration: none; background: #fff; }
.ebs-shop .woocommerce-pagination .page-numbers span.current { background: var(--ebs-ink); color: #fff; border-color: var(--ebs-ink); }
.ebs-shop .woocommerce-info, .ebs-shop .woocommerce-no-products-found { clear: both; }

@media (max-width: 1099px) { .ebs-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
	.ebs-shop-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
	.ebs-filters-js .ebs-filters-open { display: inline-flex; }
	.ebs-filters-js .ebs-filters { position: fixed; inset: 0 auto 0 0; width: min(88vw, 360px); z-index: 100; background: var(--wp--preset--color--base); padding: 1rem 1.25rem 0; overflow-y: auto; transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
	.ebs-filters-js .ebs-filters.is-open { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
	.ebs-filters-js .ebs-filters-close { display: block; }
	.ebs-filters-js .ebs-filter-actions { position: sticky; bottom: 0; }
	.ebs-filters-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .45); }
	.ebs-filters-locked { overflow: hidden; }
}
@media (max-width: 479px) {
	.ebs-shop ul.products { gap: .75rem; }
	.ebs-card-body { padding: .75rem; }
	.ebs-card-title { font-size: .875rem; }
	.ebs-card-facts { display: none; }
	.ebs-shop .woocommerce-result-count { display: none; }
	.ebs-shop .woocommerce-ordering { float: none; }
	.ebs-shop .woocommerce-ordering select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ebs-filters-js .ebs-filters, .ebs-card-link { transition: none; } }
.ebs-filter > legend { float: left; width: 100%; }
.ebs-filter > legend + * { clear: both; }

/* ---------- Homepage and brand directory ---------- */
.ebs-front { padding-top: 0; }
.ebs-home, .ebs-brands { max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.ebs-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: center; padding: clamp(2rem, 5vw, 4rem) 0; }
.ebs-kicker { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ebs-muted); font-weight: 700; margin: 0 0 .75rem; }
.ebs-hero-title { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.05; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.ebs-hero-sub { font-size: 1.125rem; color: var(--ebs-muted); max-width: 46ch; margin: 1.25rem 0 0; }
.ebs-hero-facts { display: block; margin-top: .6rem; color: var(--ebs-ink); font-weight: 600; font-size: .9375rem; }
.ebs-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.ebs-button-accent { background: var(--ebs-accent); color: var(--ebs-ink); }
.ebs-button-accent:hover { background: var(--ebs-accent-strong); color: var(--ebs-ink); }
.ebs-button-ghost { background: transparent; color: var(--ebs-ink); border: 1px solid var(--ebs-ink); }
.ebs-button-ghost:hover { background: var(--ebs-ink); color: #fff; }
.ebs-hero-media { position: relative; display: block; background: var(--ebs-surface); border-radius: calc(var(--ebs-radius) * 2); aspect-ratio: 4 / 3; overflow: hidden; color: var(--ebs-ink); text-decoration: none; }
.ebs-hero-media img { width: 100%; height: 100%; object-fit: contain; padding: 1.5rem 1.5rem 3rem; mix-blend-mode: multiply; display: block; }
.ebs-hero-caption { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1rem; font-size: .8125rem; color: var(--ebs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebs-hero-media:hover .ebs-hero-caption { color: var(--ebs-ink); text-decoration: underline; }
.ebs-section { padding: clamp(1.75rem, 4vw, 3rem) 0; border-top: 1px solid var(--ebs-line); }
.ebs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ebs-section-title { font-family: var(--wp--preset--font-family--heading); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 1.25rem; line-height: 1.15; }
.ebs-section-head .ebs-section-title { margin: 0; }
.ebs-section-link { color: var(--ebs-ink); font-weight: 600; font-size: .9375rem; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.ebs-section-tint { background: var(--ebs-surface); box-shadow: 0 0 0 100vmax var(--ebs-surface); clip-path: inset(0 -100vmax); border-top: 0; }
.ebs-section-tint + .ebs-section { border-top: 0; }
.ebs-cat-tiles, .ebs-brand-strip, .ebs-brand-cards, .ebs-brand-letters { list-style: none; margin: 0; padding: 0; }
.ebs-cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.ebs-cat-tile, .ebs-brand-card { display: flex; flex-direction: column; gap: .2rem; height: 100%; color: var(--ebs-ink); text-decoration: none; }
.ebs-cat-media, .ebs-brand-media { display: block; aspect-ratio: 4 / 3; background: var(--ebs-surface); border-radius: calc(var(--ebs-radius) * 1.5); overflow: hidden; margin-bottom: .5rem; border: 1px solid transparent; transition: border-color .15s ease; }
.ebs-cat-media img, .ebs-brand-media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; mix-blend-mode: multiply; display: block; }
.ebs-cat-tile:hover .ebs-cat-media, .ebs-brand-card:hover .ebs-brand-media { border-color: var(--ebs-ink); }
.ebs-cat-name, .ebs-brand-name { font-weight: 700; font-size: 1.0625rem; }
.ebs-brand-cats { font-size: .8125rem; color: var(--ebs-muted); }
.ebs-shop ul.products.ebs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ebs-brand-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.ebs-brand-strip a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border: 1px solid var(--ebs-line); border-radius: 999px; color: var(--ebs-ink); text-decoration: none; font-weight: 600; background: #fff; }
.ebs-brand-strip a:hover { border-color: var(--ebs-ink); }
.ebs-empty { padding: 2rem 0; color: var(--ebs-muted); }
.ebs-brand-letters { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.5rem; }
.ebs-brand-letters a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--ebs-line); border-radius: var(--ebs-radius); color: var(--ebs-ink); text-decoration: none; font-weight: 700; background: #fff; }
.ebs-brand-letters a:hover { border-color: var(--ebs-ink); }
.ebs-brand-group { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--ebs-line); scroll-margin-top: 110px; }
.ebs-brand-letter { font-family: var(--wp--preset--font-family--heading); font-size: 2rem; margin: 0; line-height: 1; }
.ebs-brand-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.25rem; }
.ebs-footer .ebs-legal { max-width: var(--wp--style--global--wide-size); margin: 1.5rem auto 0; font-size: .8125rem; opacity: .75; }
@media (max-width: 1099px) { .ebs-shop ul.products.ebs-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 781px) {
	.ebs-hero { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.ebs-cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ebs-brand-group { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
	.ebs-brand-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ebs-card-media img, .ebs-cat-media img, .ebs-brand-media img, .ebs-hero-media img { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; max-height: 100%; }

/* ---------- EVOMAG identity ---------- */
:root { --ebs-primary: var(--wp--preset--color--primary); --ebs-secondary: var(--wp--preset--color--secondary); }
/* The mark sits beside the site title. Setting a Site Logo in the editor replaces both. */
.ebs-brand .wp-block-site-title a { display: inline-flex; align-items: center; gap: .5rem; }
.ebs-brand .wp-block-site-title a::before { content: ""; width: 2.1rem; height: 1.85rem; background: url(../brand/evomag-symbol.svg) center / contain no-repeat; flex: 0 0 auto; }
.ebs-footer .wp-block-site-title a { color: #fff; display: inline-flex; align-items: center; gap: .5rem; }
.ebs-footer .wp-block-site-title a::before { content: ""; width: 2.1rem; height: 1.85rem; background: url(../brand/evomag-symbol.svg) center / contain no-repeat; }
.ebs-footer { background: var(--ebs-primary); }
.ebs-button { background: var(--ebs-primary); }
.ebs-button:hover { background: var(--ebs-secondary); }
.ebs-button-accent, .ebs-button-accent:hover { color: var(--ebs-ink); }
.ebs-button-accent { background: var(--ebs-accent); }
.ebs-button-accent:hover { background: var(--ebs-accent-strong); }
.ebs-button-ghost { background: transparent; color: var(--ebs-primary); border-color: var(--ebs-primary); }
.ebs-button-ghost:hover { background: var(--ebs-primary); color: #fff; }
.ebs-kicker { color: var(--ebs-secondary); }
.ebs-hero-title, .ebs-shop-title, .ebs-section-title, .ebs-brand-letter { color: var(--ebs-primary); letter-spacing: -.025em; }
.ebs-hero-title { font-style: italic; font-weight: 900; }
.ebs-filter-options input[type=checkbox] { accent-color: var(--ebs-secondary); }
.ebs-shop .woocommerce-pagination .page-numbers span.current { background: var(--ebs-primary); border-color: var(--ebs-primary); }
.ebs-card-link:hover, .ebs-cat-tile:hover .ebs-cat-media, .ebs-brand-card:hover .ebs-brand-media { border-color: var(--ebs-secondary); }
.ebs-card-badge { background: var(--ebs-accent); color: var(--ebs-ink); }

/* ---------- Listing header: banner image, count ---------- */
.ebs-shop-header.has-banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem; align-items: center; }
.ebs-shop-banner { border-radius: calc(var(--ebs-radius) * 2); overflow: hidden; aspect-ratio: 16 / 7; background: var(--ebs-surface); }
.ebs-shop-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ebs-shop-header.is-brand .ebs-shop-banner { aspect-ratio: 3 / 1; max-width: 260px; justify-self: end; background: transparent; }
.ebs-shop-header.is-brand .ebs-shop-banner img { object-fit: contain; }
.ebs-shop-count { color: var(--ebs-muted); font-size: .9375rem; margin: .5rem 0 0; }
@media (max-width: 781px) { .ebs-shop-header.has-banner { grid-template-columns: minmax(0, 1fr); gap: 1rem; } .ebs-shop-header.is-brand .ebs-shop-banner { justify-self: start; } }

/* ---------- Colour filter ---------- */
.ebs-filter-swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.ebs-filter-swatches li label { position: relative; display: block; width: 34px; height: 34px; min-height: 0; border-radius: 50%; cursor: pointer; padding: 0; }
.ebs-filter-swatches .ebs-swatch { position: absolute; inset: 3px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.ebs-filter-swatches input[type=checkbox] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.ebs-filter-swatches li label:has(input:checked) { box-shadow: 0 0 0 2px var(--ebs-primary); }
.ebs-filter-swatches li label:has(input:focus-visible) { box-shadow: var(--ebs-focus); }
.ebs-filter-swatches .ebs-filter-name, .ebs-filter-swatches .ebs-count { border: 0; clip: rect(1px, 1px, 1px, 1px); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* ---------- 0.5.0: outlined EVOMAG logo. A Site Logo set in the editor replaces it. ---------- */
.ebs-brand .wp-block-site-title a, .ebs-footer .wp-block-site-title a { display: block; width: 188px; height: 38px; background: url(../brand/evomag-primary-outlined.svg) left center / contain no-repeat; font-size: 0; line-height: 0; color: transparent; gap: 0; }
.ebs-brand .wp-block-site-title a::before, .ebs-footer .wp-block-site-title a::before { content: none; }
.ebs-footer .wp-block-site-title a { background-image: url(../brand/evomag-reversed-outlined.svg); width: 208px; height: 42px; }
@media (max-width: 599px) { .ebs-brand .wp-block-site-title a { width: 150px; height: 30px; } }
.ebs-footer-company { max-width: var(--wp--style--global--wide-size); margin: 1.5rem auto 0; font-size: .875rem; }
.ebs-footer-company .ebc-company { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .18); }
.ebs-footer-company .ebc-company-label { display: block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.ebs-footer-company .ebs-legal { margin: 1rem 0 0; }

/* ---------- Colour-family filter: a dot before each name ---------- */
.ebs-filter-families .ebs-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); flex: 0 0 auto; }

/* ---------- Product page: size link, trust strip, size finder ---------- */
.ebs-size-link { margin-left: .75rem; font-size: .8125rem; font-weight: 600; color: var(--ebs-secondary); }
.ebs-product-summary .ebc-trust, .ebs-product-summary .ebc-size { margin-top: 1rem; }
.ebs-product-summary .ebc-size > summary { font-family: var(--wp--preset--font-family--body); }

/* ---------- 0.6.0: product page after the reference layout ---------- */
.ebs-product-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr) minmax(260px, .7fr); gap: 2rem; align-items: start; margin-bottom: var(--wp--preset--spacing--50); }
.ebs-product-top > * { margin-block-start: 0 !important; min-width: 0; }
.ebs-product-media { position: relative; }
.ebs-product-badges { position: absolute; z-index: 6; top: .75rem; left: calc(76px + 1.5rem); margin: 0; display: flex; gap: .5rem; }
.ebs-badge-ebike { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 6px; background: var(--ebs-secondary); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ebs-product-title { font-family: var(--wp--preset--font-family--heading); font-weight: 800; color: var(--ebs-ink); }
.ebs-product-summary .wp-block-post-excerpt { font-size: .875rem; }
.ebs-product-summary .wp-block-post-excerpt__excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ebs-product-summary .single_add_to_cart_button { border-radius: 8px; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.ebs-product-summary .single_add_to_cart_button::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l2.6 12.2a1 1 0 0 0 1 .8h9.3a1 1 0 0 0 1-.8L21 7H6'/%3E%3Ccircle cx='9.5' cy='20' r='1.4'/%3E%3Ccircle cx='17.5' cy='20' r='1.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l2.6 12.2a1 1 0 0 0 1 .8h9.3a1 1 0 0 0 1-.8L21 7H6'/%3E%3Ccircle cx='9.5' cy='20' r='1.4'/%3E%3Ccircle cx='17.5' cy='20' r='1.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.ebs-qty { display: inline-flex; align-items: stretch; border: 1px solid #c9ccd1; border-radius: 8px; overflow: hidden; background: #fff; }
.ebs-product-summary .ebs-qty .qty { width: 46px; height: 50px; border: 0; border-radius: 0; padding: 0; -moz-appearance: textfield; }
.ebs-qty .qty::-webkit-outer-spin-button, .ebs-qty .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ebs-qty-btn { width: 44px; border: 0; background: #fff; font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--ebs-ink); }
.ebs-qty-btn:hover { background: var(--ebs-surface); }
.ebs-option { border-radius: 6px; min-width: 52px; }
.ebs-option.is-selected { background: #fff; border-color: var(--ebs-secondary); box-shadow: inset 0 0 0 1px var(--ebs-secondary); color: var(--ebs-primary); }
.ebs-option-swatch { border-radius: 50%; }
.ebs-option-swatch.is-selected { border-color: var(--ebs-secondary); box-shadow: 0 0 0 2px var(--ebs-secondary); }
.ebs-size-link { display: inline-flex; align-items: center; gap: .4rem; margin: .75rem 0 0; font-size: .875rem; }
.ebs-size-link::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 48 38-38 8 8-38 38z'/%3E%3Cpath d='m36 22 6 6m-14 2 6 6m-14 2 6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 48 38-38 8 8-38 38z'/%3E%3Cpath d='m36 22 6 6m-14 2 6 6m-14 2 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.ebs-product-summary table.variations td.value { display: flex; flex-direction: column; align-items: flex-start; }
.ebs-product-aside .ebc-trust, .ebs-product-aside .ebc-size { margin-top: 0; }
.ebs-product-aside:empty { display: none; }

.ebs-product-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.ebs-product-info > * { margin-block-start: 0 !important; min-width: 0; }
.ebs-product-info .ebs-tabs { display: contents; }
.ebs-product-info .ebs-tablist { grid-column: 1 / -1; }
.ebs-product-info .ebs-tab-panel { grid-column: 1 / -1; grid-row: 2; }
.ebs-product-info > .ebc-size, .ebs-product-info > .ebs-faq-card { margin-bottom: var(--wp--preset--spacing--50); }
.ebs-faq-title { font-size: 1.375rem; margin: 0 0 .9rem; }
.ebs-tab[aria-selected="true"] { color: var(--ebs-secondary); border-bottom-color: var(--ebs-secondary); }
@media (min-width: 1100px) {
	.ebs-product-info.is-first-tab { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
	.ebs-product-info.is-first-tab .ebs-tab-panel { grid-column: 1; }
	.ebs-product-info.is-first-tab > .ebc-size { grid-column: 2; grid-row: 2; }
	.ebs-product-info.is-first-tab > .ebs-faq-card { grid-column: 3; grid-row: 2; }
	.ebs-product-info.is-first-tab:not(:has(> .ebc-size)) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
	.ebs-product-info.is-first-tab:not(:has(> .ebc-size)) > .ebs-faq-card { grid-column: 2; }
	.ebs-product-info:not(.is-first-tab) > .ebc-size, .ebs-product-info:not(.is-first-tab) > .ebs-faq-card { display: none; }
}
@media (max-width: 1099px) {
	.ebs-product-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
	.ebs-product-aside { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
	.ebs-product-aside .ebc-returns { margin-top: 0; }
	.ebs-product-info > .ebc-size, .ebs-product-info > .ebs-faq-card { grid-column: 1 / -1; }
}
@media (max-width: 781px) {
	.ebs-product-top { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.ebs-product-aside { grid-template-columns: minmax(0, 1fr); }
	.ebs-product-badges { left: .75rem; }
}
@media (max-width: 999px) { .ebs-product-badges { left: .75rem; } }
.ebs-product-facts .ebc-key-facts { border-radius: 12px; background: var(--ebs-surface); border: 0; }
.ebs-product-facts .ebc-fact { border-color: rgba(0, 0, 0, .08); border-bottom: 0; }

/* ---------- Header: search field ---------- */
.ebs-tools .wp-block-search { flex: 1 1 260px; max-width: 360px; }
.ebs-tools .wp-block-search__inside-wrapper { display: flex; align-items: center; border: 1px solid var(--ebs-line); border-radius: 8px; padding: 0 .25rem 0 0; background: #fff; }
.ebs-tools .wp-block-search__input { border: 0; background: none; min-height: 42px; padding: 0 .75rem; flex: 1 1 auto; width: 100%; font-size: .875rem; }
.ebs-tools .wp-block-search__button { min-width: 40px; min-height: 40px; order: -1; }
.ebs-header-row { flex-wrap: nowrap; }
.ebs-tools { flex: 0 1 auto; min-width: 0; }
@media (max-width: 899px) { .ebs-tools .wp-block-search { display: none; } }

/* ---------- Homepage hero with photo ---------- */
.ebs-hero.ebs-hero-photo { position: relative; display: block; padding: 0; min-height: clamp(360px, 46vw, 560px); border-radius: 14px; overflow: hidden; margin-top: 1.25rem; isolation: isolate; }
.ebs-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 40%; z-index: -2; }
.ebs-hero-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 38, 28, .78) 0%, rgba(7, 38, 28, .5) 38%, rgba(7, 38, 28, 0) 68%); }
.ebs-hero-photo .ebs-hero-text { padding: clamp(1.5rem, 5vw, 4rem); max-width: 640px; color: #fff; }
.ebs-hero-photo .ebs-hero-title { color: #fff; font-size: clamp(2.75rem, 7vw, 5rem); }
.ebs-hero-photo .ebs-hero-sub { color: #fff; font-size: clamp(1.0625rem, 2vw, 1.5rem); max-width: 22ch; line-height: 1.3; }
.ebs-hero-trail { margin: 0 0 1.5rem; padding-bottom: 1rem; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; position: relative; }
.ebs-hero-trail::after { content: ""; position: absolute; left: 0; bottom: 0; width: 84px; height: 4px; background: var(--ebs-accent); }
.ebs-hero-trail a { color: #fff; text-decoration: none; }
.ebs-hero-trail a:hover { text-decoration: underline; }
.ebs-hero-photo .ebs-button-accent { border-radius: 999px; min-height: 52px; padding: 0 1.75rem; font-size: 1.0625rem; gap: .5rem; }
@media (max-width: 599px) { .ebs-hero-photo::after { background: linear-gradient(180deg, rgba(7, 38, 28, .7) 0%, rgba(7, 38, 28, .45) 100%); } }
.ebs-product-summary table.variations tbody { display: flex; flex-direction: column; }
.ebs-product-summary table.variations tr:has(select[name*="color"]) { order: -1; }
.ebs-product-summary .ebs-product-title { font-size: clamp(1.5rem, 2.1vw, 1.875rem); line-height: 1.15; }
.ebs-product-top, .ebs-product-info { max-width: 100%; }
.ebs-product-summary .single_add_to_cart_button { flex: 1 1 150px; }
.ebs-product-summary .woocommerce-variation-add-to-cart, .ebs-product-summary form.cart:not(.variations_form) { flex-wrap: nowrap; }

/* ---------- 0.7.0 corrections ---------- */
/* Zoom layer: WooCommerce lays a magnified copy over the photo. On photos with a transparent background the
   original showed through it; the layer gets the same solid background as the gallery so only the zoomed photo is seen. */
.ebs-product-media .woocommerce-product-gallery__image { background: #fff; }
.ebs-product-media .woocommerce-product-gallery__image img.zoomImg { background: #fff; aspect-ratio: auto; object-fit: fill; max-width: none; }

/* Logo */
.ebs-brand .wp-block-site-title a { width: 236px; height: 48px; }
.ebs-brand { flex: 0 0 auto; align-items: center; }
.ebs-header-row { align-items: center; gap: 1.5rem; }
@media (max-width: 599px) { .ebs-brand .wp-block-site-title a { width: 168px; height: 34px; } }
.ebs-nav .wp-block-navigation__submenu-container { border: 1px solid var(--ebs-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); padding: .4rem; min-width: 230px !important; background: #fff; }
.ebs-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .6rem .8rem; border-radius: 6px; }
.ebs-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--ebs-surface); }

/* Product page: two columns on top, compact trust strip under the button */
.ebs-product-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); }
.ebs-product-summary .ebc-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 0; margin-top: 1.5rem; border: 1px solid var(--ebs-line); border-radius: 10px; overflow: hidden; }
.ebs-product-summary .ebc-trust-item { flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: .9rem .6rem; border-bottom: 0; border-right: 1px solid var(--ebs-line); margin-right: -1px; }
.ebs-product-summary .ebc-trust-text { align-items: center; font-size: .75rem; }
.ebs-product-summary .ebc-trust-text strong { font-size: .8125rem; }
.ebs-product-summary .ebc-trust .ebc-sep { display: none; }
.ebs-product-summary .ebc-trust-text a { display: block; }
.ebs-product-summary .ebc-returns { margin-top: .75rem; padding: .75rem 1rem; border: 0; background: var(--ebs-surface); font-size: .8125rem; }
.ebs-product-summary .ebc-returns .ebc-icon { width: 26px; height: 26px; }
.ebs-product-summary .ebc-returns .ebc-trust-text br { display: none; }
.ebs-product-summary .ebc-returns .ebc-trust-text > span { display: inline; }
.ebs-product-summary .wp-block-woocommerce-product-meta { margin-top: 1rem; }
.ebs-product-media .woocommerce-product-gallery__image img { aspect-ratio: 4 / 3; }

/* Under the tabs: content on the left, size finder and questions stacked on the right */
.ebs-product-side { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: var(--wp--preset--spacing--50); min-width: 0; }
.ebs-product-side > * { margin: 0 !important; }
.ebs-product-info > .ebs-product-side { grid-column: 1 / -1; }
.ebs-tab-panel { max-width: none; }
.ebs-tab-panel > p, .ebs-tab-panel > ul, .ebs-tab-panel > ol, .ebs-tab-panel > h2, .ebs-tab-panel > h3, .ebs-tab-panel > h4 { max-width: 72ch; }
.ebs-tab-panel h2:first-child { font-size: 1.5rem; }
@media (min-width: 1100px) {
	.ebs-product-info.is-first-tab { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 0 clamp(2rem, 4vw, 4rem); }
	.ebs-product-info.is-first-tab .ebs-tab-panel { grid-column: 1; }
	.ebs-product-info.is-first-tab > .ebs-product-side { grid-column: 2; grid-row: 2; position: sticky; top: 96px; }
	.ebs-product-info.is-first-tab:not(:has(> .ebs-product-side)) { grid-template-columns: minmax(0, 1fr); }
	.ebs-product-info:not(.is-first-tab) > .ebs-product-side { display: none; }
}
@media (max-width: 1099px) { .ebs-product-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
@media (max-width: 781px) { .ebs-product-top { grid-template-columns: minmax(0, 1fr); } }

/* Related products: the shop's card rhythm */
.ebs-product .wp-block-woocommerce-product-collection .wc-block-product-template, .ebs-product .wp-block-woocommerce-related-products ul.products { gap: 1.25rem !important; }
.ebs-product .wc-block-product, .ebs-product .wp-block-woocommerce-related-products li.product { border: 1px solid var(--ebs-line); border-radius: 12px; padding: 1rem; background: #fff; display: flex; flex-direction: column; gap: .4rem; }
.ebs-product .wc-block-product img, .ebs-product .wp-block-woocommerce-related-products li.product img { aspect-ratio: 4 / 3; object-fit: contain; width: 100%; height: auto; }
.ebs-product .wc-block-product .wp-block-button { margin-top: auto; }

/* Homepage tiles and brand cards: the whole bicycle, never cropped */
.ebs-cat-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ebs-cat-media, .ebs-brand-media { aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--ebs-line); }
.ebs-cat-media img, .ebs-brand-media img, .ebs-card-media img { object-fit: contain !important; mix-blend-mode: normal !important; }
.ebs-card-media { background: #fff; border-bottom: 1px solid var(--ebs-line); }
.ebs-brand-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.ebs-brand-strip a { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; min-height: 68px; padding: .7rem 1rem; border-radius: 10px; }
.ebs-brand-strip-name { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 1.0625rem; color: var(--ebs-primary); }
@media (max-width: 1099px) { .ebs-cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .ebs-cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Footer menus */
.ebs-footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem 2.5rem; }
.ebs-footer-heading { font-family: var(--wp--preset--font-family--body); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; opacity: .7; margin: 0 0 .6rem; font-weight: 700; }
.ebs-footer-group ul { list-style: none; margin: 0; padding: 0; }
.ebs-footer-group a { display: inline-flex; align-items: center; min-height: 32px; color: #fff; text-decoration: none; font-size: .9375rem; }
.ebs-footer-group a:hover { text-decoration: underline; }
.ebs-product-summary .ebc-trust:has(> .ebc-trust-item:only-child) .ebc-trust-item { flex-direction: row; text-align: left; justify-content: flex-start; padding: .8rem 1rem; }
.ebs-product-summary .ebc-trust:has(> .ebc-trust-item:only-child) .ebc-trust-text { align-items: flex-start; }
.ebs-product-summary .ebc-returns .ebc-trust-text strong { margin-right: .5rem; }
.ebs-product-summary .ebc-returns .ebc-trust-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; }

/* ---------- 0.7.1: gallery thumbnails ---------- */
.ebs-product-media .woocommerce-product-gallery { position: relative; }
.ebs-product-media .woocommerce-product-gallery__image, .ebs-product-media .flex-control-thumbs img { background: #fff; }
.ebs-product-media .flex-control-thumbs { scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior: contain; }
.ebs-product-media .flex-control-thumbs::-webkit-scrollbar { display: none; }
.ebs-product-media .flex-control-thumbs img { opacity: 1 !important; cursor: pointer; border-radius: 8px; }
.ebs-product-media .flex-control-thumbs img.flex-active { outline: 2px solid var(--ebs-secondary); outline-offset: -2px; border-color: var(--ebs-secondary); }
.ebs-thumb-nav { position: absolute; z-index: 4; width: 32px; height: 32px; border: 1px solid var(--ebs-line); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.ebs-thumb-nav::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ebs-ink); border-bottom: 2px solid var(--ebs-ink); }
.ebs-thumb-nav[hidden] { display: none; }
@media (min-width: 1000px) {
	.ebs-product-media .woocommerce-product-gallery .flex-control-thumbs { max-height: none; height: 0; min-height: 100%; }
	.ebs-product-media .woocommerce-product-gallery:has(.flex-control-thumbs) { align-items: stretch; }
	.ebs-thumb-prev { left: 22px; top: -12px; }
	.ebs-thumb-next { left: 22px; bottom: -12px; }
	.ebs-thumb-prev::before { transform: translate(-50%, -25%) rotate(-135deg); }
	.ebs-thumb-next::before { transform: translate(-50%, -75%) rotate(45deg); }
}
@media (max-width: 999px) {
	.ebs-thumb-prev { left: -6px; bottom: 20px; }
	.ebs-thumb-next { right: -6px; bottom: 20px; }
	.ebs-thumb-prev::before { transform: translate(-25%, -50%) rotate(135deg); }
	.ebs-thumb-next::before { transform: translate(-75%, -50%) rotate(-45deg); }
}
/* Trust strip with four items: two by two in the purchase column */
.ebs-product-summary .ebc-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ebs-product-summary .ebc-trust-item { border-bottom: 1px solid var(--ebs-line); margin-bottom: -1px; }
@media (min-width: 1280px) { .ebs-product-summary .ebc-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ebs-product-media .woocommerce-product-gallery__image a { cursor: zoom-in; display: block; }
.ebs-product-summary .ebc-trust, .ebs-product-summary .ebc-trust { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important; }
