/* Motoway Upgrade — supplementary styles (design tokens live in theme.json) */

:root { --mw-radius: 6px; --mw-shadow: 0 6px 24px rgba(14,17,22,.08); }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.mw-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .2s; }
.mw-header.is-stuck { box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.admin-bar .mw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mw-header { top: 46px; } }
.mw-header a { color: inherit; text-decoration: none; }
.mw-header__row { flex-wrap: wrap; }
.mw-header__search { flex: 1 1 320px; max-width: 560px; }
.mw-header__search .wp-block-search__inside-wrapper { background: #fff; border-radius: var(--mw-radius); overflow: hidden; border: 0; padding: 0; }
.mw-header__search input[type="search"] { border: 0; color: var(--wp--preset--color--ink); padding: .7rem .9rem; font-size: .9375rem; min-width: 0; }
.mw-header__search button { background: var(--wp--preset--color--accent); color: #fff; border: 0; border-radius: 0; margin: 0; padding: 0 1rem; }
.mw-header__tools { color: #fff; }
.mw-header__tools svg { fill: currentColor; }
.mw-header__nav { border-top: 1px solid #2a313c; margin-top: .75rem; padding-top: .35rem; }
.mw-header__nav .wp-block-navigation__container { gap: .25rem 1.5rem; }
.mw-header__nav .wp-block-navigation-item__content { padding: .55rem 0; }
.mw-header__nav .wp-block-navigation-item__content:hover,
.mw-header__nav .current-menu-item > a { color: var(--wp--preset--color--accent); }
.mw-header__nav .wp-block-navigation__submenu-container { background: var(--wp--preset--color--steel) !important; color: #fff !important; border: 0; border-radius: var(--mw-radius); min-width: 220px; padding: .4rem 0; box-shadow: var(--mw-shadow); }
.mw-header__nav .wp-block-navigation__submenu-container a { padding: .55rem 1rem; }
.mw-announcement p { margin: 0; }
.mw-announcement a { color: inherit; }
@media (max-width: 781px) {
	.mw-header__row { gap: .75rem !important; }
	.mw-header__search { order: 3; flex-basis: 100%; max-width: none; }
	.mw-header__nav { margin-top: .25rem; }
	.mw-header .wp-block-site-title { font-size: 1.1rem; }
}

/* ---------- Footer ---------- */
.mw-footer a { color: #cfd5dd; text-decoration: none; }
.mw-footer a:hover { color: var(--wp--preset--color--accent); }
.mw-footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.mw-footer h4 { text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Hero / trust ---------- */
.mw-hero { background-size: cover; }
.mw-trust p { margin: 0; }

/* ---------- Product grid & cards ---------- */
.mw-grid .wc-block-product-template, .mw-grid .wp-block-woocommerce-product-template { gap: 1.5rem; }
.mw-card { height: 100%; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: var(--mw-radius); padding: .75rem; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.mw-card:hover { box-shadow: var(--mw-shadow); transform: translateY(-2px); }
.mw-card .wc-block-components-product-image, .mw-card .wc-block-components-product-image img { border-radius: 4px; background: var(--wp--preset--color--surface); }
.mw-card .wc-block-components-product-image img { object-fit: contain; width: 100%; }
.mw-card .wp-block-post-title { margin: .25rem 0 0; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mw-card .wp-block-post-title a { text-decoration: none; }
.mw-card .wc-block-components-product-sku { margin: 0; }
.mw-card .wp-block-woocommerce-product-button { margin-top: auto; padding-top: .5rem; }
.mw-card .wp-block-button__link, .mw-card .wc-block-components-product-button__button { width: 100%; text-align: center; }
.wc-block-components-product-sale-badge { background: var(--wp--preset--color--accent); color: #fff; border: 0; border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: .7rem; }
.mw-shop__toolbar { margin-bottom: 1rem; font-size: .9rem; }
.mw-shop__toolbar select { border: 1px solid var(--wp--preset--color--line); border-radius: var(--mw-radius); padding: .45rem .6rem; background: #fff; }

/* ---------- Single product ---------- */
.mw-product .wp-block-post-title { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.mw-product .wp-block-woocommerce-product-price { color: var(--wp--preset--color--ink); }
.mw-product .wc-block-components-product-price { font-size: 1.6rem; font-weight: 800; }
.mw-product .quantity input { border: 1px solid var(--wp--preset--color--line); border-radius: var(--mw-radius); padding: .65rem; width: 5rem; }
.mw-product .single_add_to_cart_button { width: auto; }
.mw-product .wp-block-woocommerce-product-details .wc-tabs, .mw-product ul.tabs { display: flex; gap: 1.5rem; list-style: none; padding: 0; border-bottom: 1px solid var(--wp--preset--color--line); }
@media (max-width: 781px) {
	.mw-product form.cart { position: sticky; bottom: 0; background: #fff; padding: .75rem 0; z-index: 10; box-shadow: 0 -6px 16px rgba(0,0,0,.08); }
}

/* ---------- WooCommerce basics ---------- */
.woocommerce-breadcrumb, .wc-block-breadcrumbs { color: var(--wp--preset--color--muted); font-size: .875rem; margin-bottom: .75rem; }
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { background: var(--wp--preset--color--accent); color: #fff; border-radius: var(--mw-radius); }
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; }
.woocommerce input.input-text, .woocommerce select, .woocommerce textarea { border: 1px solid var(--wp--preset--color--line); border-radius: var(--mw-radius); padding: .65rem .8rem; }

/* ---------- Page blocks from the plugin ---------- */
.mw-section-title { text-align: center; }
@media (max-width: 600px) { h1.wp-block-heading { word-break: break-word; } }

/* Prevent any overflow on small screens */
.wp-site-blocks, main { max-width: 100%; }
table { max-width: 100%; }
@media (max-width: 600px) { .mw-fitment-table, .wp-block-table { overflow-x: auto; display: block; } }

/* ---------- Mobile polish (v1.0.2) ---------- */
@media (max-width: 600px) {
	.mw-header .wp-block-site-title { font-size: 1rem !important; letter-spacing: .02em; white-space: nowrap; }
	.mw-header .wp-block-site-logo img { max-width: 110px; height: auto; }
	.mw-header__tools { margin-left: auto; }
	.mw-header__nav { border-top: 0; margin-top: 0; padding-top: 0; }
	.mw-hero .wp-block-cover__inner-container p.has-large-font-size { font-size: 1.05rem; }
	.mw-announcement p { font-size: .75rem; }
}
