/* Regular pages and WooCommerce screens (templates/site-page.php). Builds on product-story.css:
   black, Apple-style type, logo red. WooCommerce's own layout CSS stays loaded; this only re-colours
   and tidies it for the dark shell. */

.site-main { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); min-height: 60vh; }

/* Type */
.site-body h1, .site-body .page-title, .site-body .product_title { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; margin: 0 0 24px; }
.site-body h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; letter-spacing: -.01em; margin: 48px 0 14px; }
.site-body h3 { font-size: 21px; line-height: 1.25; margin: 32px 0 10px; }
.site-body h4 { font-size: 17px; margin: 24px 0 8px; }
.site-body p, .site-body li { color: rgba(245,245,247,.86); }
.site-body p { margin: 0 0 18px; }
.site-body ul, .site-body ol { padding-left: 1.3em; margin: 0 0 22px; }
.site-body li { margin: 0 0 8px; }
.site-body li::marker { color: var(--muted); }
.site-body strong { color: var(--text); }
.site-body a:not(.button):not(.wp-block-button__link) { color: var(--accent-text); text-decoration: underline; text-decoration-color: rgba(255,77,64,.4); text-underline-offset: 3px; }
.site-body a:not(.button):hover { text-decoration-color: currentColor; }
.site-body hr, .site-body .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.site-body blockquote, .site-body .wp-block-quote { margin: 0 0 24px; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.site-body blockquote p { color: inherit; }
.site-body figure { margin: 28px 0; }
.site-body figure img, .site-body .wp-block-image img { border-radius: 14px; height: auto; }
.site-body figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.site-body code { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.site-body iframe { max-width: 100%; border: 0; }
.site-body .wp-block-embed { margin: 28px 0; }
.site-body .wp-block-embed__wrapper iframe { border-radius: 14px; }

/* Tables (also Woo's shop_table) */
.site-body table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 15px; }
.site-body th, .site-body td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.site-body th { color: var(--muted); font-weight: 600; }

/* Forms */
.site-body label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.site-body input[type="text"], .site-body input[type="email"], .site-body input[type="tel"], .site-body input[type="password"],
.site-body input[type="number"], .site-body input[type="search"], .site-body input[type="url"], .site-body textarea, .site-body select {
	width: 100%; min-height: 46px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--text);
	background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.site-body select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.site-body textarea { min-height: 120px; }
.site-body input:focus, .site-body textarea:focus, .site-body select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(248,0,0,.25); }
.site-body input[type="checkbox"], .site-body input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.site-body ::placeholder { color: #6e6e73; }

/* Buttons: one red pill everywhere (block buttons, Woo buttons, form submits) */
.site-body .button, .site-body button[type="submit"], .site-body input[type="submit"], .site-body .wp-block-button__link,
.site .site-body a.button, .site .site-body button.button, .site .site-body input.button, .site .site-body #respond input#submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 22px;
	background: var(--accent); color: #fff; border: 0; border-radius: 980px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: filter .15s;
}
.site-body .button:hover, .site-body button[type="submit"]:hover, .site-body .wp-block-button__link:hover,
.site .site-body a.button:hover, .site .site-body button.button:hover { background: var(--accent); color: #fff; filter: brightness(1.12); }
.site .site-body button.button:disabled, .site .site-body button.button:disabled[disabled] { background: #3a3a3e; color: var(--muted); padding: 10px 22px; opacity: 1; }
/* Secondary actions (update cart, apply coupon): outline instead of solid red */
.site .site-body button[name="update_cart"], .site .site-body button[name="apply_coupon"] { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* WooCommerce notices */
.site .site-body .woocommerce-message, .site .site-body .woocommerce-info, .site .site-body .woocommerce-error,
.site .site-body .woocommerce-message, .site .site-body .woocommerce-info, .site .site-body .woocommerce-error {
	background: var(--panel); color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 14px 18px 14px 48px; margin: 0 0 24px; list-style: none;
}
.site .site-body .woocommerce-message::before, .site .site-body .woocommerce-info::before, .site .site-body .woocommerce-error::before { color: var(--accent); top: 14px; left: 18px; }
.site .site-body .woocommerce-message .button, .site .site-body .woocommerce-info .button { float: right; min-height: 34px; padding: 6px 16px; font-size: 14px; margin-left: 12px; }
.site .site-body .woocommerce-error li { margin: 0; }

/* Breadcrumb, result count, sorting */
.site .site-body .woocommerce-breadcrumb { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.site .site-body .woocommerce-breadcrumb a { color: var(--muted); text-decoration: none; }
.site .site-body .woocommerce-result-count { color: var(--muted); font-size: 14px; margin: 12px 0 24px; }
.site .site-body .woocommerce-ordering { margin: 0 0 24px; }
.site .site-body .woocommerce-ordering select { min-height: 40px; width: auto; font-size: 14px; }
.site-body .term-description, .site-body .page-description { color: var(--muted); max-width: 680px; }

/* Shop grid: product cards */
.site .site-body ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0 0 40px; padding: 0; }
.site .site-body ul.products::before, .site .site-body ul.products::after { display: none; }
.site .site-body ul.products li.product { float: none; width: auto; margin: 0; padding: 0 0 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.site .site-body ul.products li.product a img { margin: 0 0 16px; aspect-ratio: 1; object-fit: cover; background: #fff; border-radius: 0; }
.site .site-body ul.products li.product a { text-decoration: none; color: inherit; }
/* Animated cards (impulse_shop_clip): the whole tall render, centred on black in the same square as the photos */
.site .site-body ul.products li.product .shop-clip { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #000; margin: 0 0 16px; }
.site .site-body ul.products li.product .woocommerce-loop-product__title { font-size: 17px; font-weight: 600; padding: 0 18px; margin: 0 0 6px; color: var(--text); }
.site .site-body ul.products li.product .price { display: block; padding: 0 18px; color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.site .site-body ul.products li.product .star-rating { margin: 0 18px 8px; }
.site .site-body ul.products li.product .button { margin: auto 18px 0; align-self: flex-start; min-height: 38px; padding: 8px 18px; font-size: 14px; }
.site .site-body ul.products li.product .added_to_cart { padding: 8px 18px 0; font-size: 14px; }
.site .site-body span.onsale { background: var(--accent); min-height: 0; min-width: 0; line-height: 1; padding: 6px 10px; border-radius: 980px; font-size: 13px; top: 12px; left: 12px; right: auto; margin: 0; }
.site .site-body .star-rating, .site .site-body .star-rating::before { color: var(--accent); }

/* Pagination */
.site .site-body nav.woocommerce-pagination ul { border: 0; }
.site .site-body nav.woocommerce-pagination ul li { border: 0; }
.site .site-body nav.woocommerce-pagination ul li a, .site .site-body nav.woocommerce-pagination ul li span { color: var(--text); border-radius: 8px; padding: 8px 12px; }
.site .site-body nav.woocommerce-pagination ul li span.current { background: var(--accent); color: #fff; }

/* Single product (products without a story page, e.g. O-rings, keychains) */
.site .site-body div.product div.images img { border-radius: 18px; background: #fff; }
.site .site-body div.product div.images .flex-control-thumbs li img { border-radius: 8px; opacity: .6; }
.site .site-body div.product div.images .flex-control-thumbs li img.flex-active { opacity: 1; }
.site .site-body div.product p.price, .site .site-body div.product span.price { color: var(--text); font-size: 22px; font-weight: 600; }
.site .site-body div.product .woocommerce-product-details__short-description { color: rgba(245,245,247,.86); }
.site .site-body div.product form.cart { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.site .site-body div.product form.cart::before, .site .site-body div.product form.cart::after { display: none; }
.site .site-body div.product form.cart .button { float: none; }
.site .site-body div.product form.cart table.variations { margin: 0 0 8px; width: 100%; }
.site .site-body div.product form.cart .variations th, .site .site-body div.product form.cart .variations td { display: block; padding: 4px 0; border: 0; }
.site .site-body div.product form.cart .reset_variations { font-size: 14px; }
.site .site-body .quantity .qty { width: 72px; min-height: 44px; text-align: center; }
.site .site-body .product_meta { color: var(--muted); font-size: 14px; }
.site .site-body .product_meta > span { display: block; margin: 0 0 4px; }
.site .site-body div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 40px 0 20px; border-bottom: 1px solid var(--line); }
.site .site-body div.product .woocommerce-tabs ul.tabs::before { display: none; }
.site .site-body div.product .woocommerce-tabs ul.tabs li { background: none; border: 0; border-radius: 0; margin: 0 18px 0 0; padding: 0; }
.site .site-body div.product .woocommerce-tabs ul.tabs li::before, .site .site-body div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.site .site-body div.product .woocommerce-tabs ul.tabs li a { color: var(--muted); padding: 10px 0; text-decoration: none; font-weight: 500; }
.site .site-body div.product .woocommerce-tabs ul.tabs li.active a { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.site .site-body div.product .woocommerce-tabs .panel h2:first-child { display: none; }
/* Woo's tab panels share the .panel class with the story cards; undo the card look here. */
.site .site-body div.product .woocommerce-tabs .panel { background: none; border: 0; border-radius: 0; padding: 0; }
.site .site-body .related > h2, .site .site-body .upsells > h2 { font-size: 24px; margin-top: 56px; }
.site .site-body #reviews #comments ol.commentlist li .comment-text { border-color: var(--line); border-radius: 12px; }
.site .site-body #reviews #comments ol.commentlist li img.avatar { background: var(--panel); border-color: var(--line); }

/* Cart */
.site .site-body table.shop_table { border: 1px solid var(--line); border-radius: 18px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--panel); }
.site .site-body table.shop_table th, .site .site-body table.shop_table td { border-top: 1px solid var(--line); border-bottom: 0; padding: 14px 16px; }
.site .site-body table.shop_table thead th, .site .site-body table.shop_table tr:first-child > * { border-top: 0; }
.site .site-body table.cart img { width: 64px; border-radius: 10px; background: #fff; }
.site .site-body table.cart td.product-name a { color: var(--text); text-decoration: none; font-weight: 600; }
.site .site-body table.cart td.actions .coupon .input-text { width: 180px; min-height: 44px; margin-right: 8px; border-color: var(--line); padding: 10px 14px; }
.site .site-body a.remove { color: var(--muted) !important; font-weight: 400; }
.site .site-body a.remove:hover { background: var(--accent); color: #fff !important; }
.site .site-body .cart-collaterals .cart_totals h2, .site .site-body .cross-sells > h2 { font-size: 24px; margin-top: 8px; }
.site .site-body .wc-proceed-to-checkout a.checkout-button { display: flex; width: 100%; font-size: 17px; min-height: 52px; margin-bottom: 0; }
.site .site-body ul#shipping_method li label { display: inline; color: var(--text); font-size: 15px; }
.site .site-body .woocommerce-shipping-destination, .site .site-body .shipping-calculator-button { color: var(--muted); font-size: 14px; }
.site .site-body .cart-empty { font-size: 18px; }

/* Checkout */
/* Woo's own field rules are more specific than the generic ones above */
.site .site-body form .form-row .input-text, .site .site-body form .form-row select, .site .site-body form .form-row textarea,
.site .site-body .quantity .qty, .site .site-body table.cart td.actions .coupon .input-text {
	background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; min-height: 46px; padding: 10px 14px; font-size: 16px; line-height: 1.4;
}
.site .site-body form .form-row .input-text:focus, .site .site-body form .form-row textarea:focus { border-color: var(--accent); }
.site .site-body form .form-row { padding: 0; margin: 0 0 16px; }
.site .site-body form .form-row label { line-height: 1.4; }
.site .site-body form .form-row .required { color: var(--accent-text); text-decoration: none; }
.site .site-body form .form-row.woocommerce-invalid input.input-text, .site .site-body form .form-row.woocommerce-invalid select { border-color: var(--accent); }
.site .site-body form .form-row.woocommerce-validated input.input-text { border-color: var(--line); }
.site .site-body .woocommerce-checkout h3, .site .site-body #order_review_heading { font-size: 22px; margin: 8px 0 18px; }
.site .site-body .woocommerce-form-coupon-toggle .woocommerce-info, .site .site-body .woocommerce-form-login-toggle .woocommerce-info { padding-left: 48px; }
/* Coupon toggle: a full-width row you can tap anywhere, with an obvious "Add code" button */
.site .site-body .woocommerce-form-coupon-toggle .woocommerce-info { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 12px 10px 18px; border-top: 1px solid var(--line); font-size: 16px; }
.site .site-body .woocommerce-form-coupon-toggle .woocommerce-info::before, .site .site-body .woocommerce-form-coupon-toggle .woocommerce-info::after { display: none; }
.site .site-body .woocommerce-form-coupon-toggle a.showcoupon { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 980px; color: var(--text); text-decoration: none; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(245,245,247,.35); }
.site .site-body .woocommerce-form-coupon-toggle a.showcoupon::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.site .site-body .woocommerce-form-coupon-toggle .woocommerce-info:hover a.showcoupon { box-shadow: inset 0 0 0 1px var(--text); }
/* The coupon form once opened: big field + Apply button side by side, stacked on phones */
.site .site-body form.checkout_coupon .form-row-first { float: left; width: calc(100% - 172px); margin: 0; }
.site .site-body form.checkout_coupon .form-row-last { float: right; width: 160px; margin: 0; }
.site .site-body form.checkout_coupon .input-text { min-height: 50px; font-size: 17px; }
.site .site-body form.checkout_coupon button[name="apply_coupon"] { width: 100%; min-height: 50px; background: var(--accent); color: #fff; box-shadow: none; }
.site .site-body form.checkout_coupon, .site .site-body form.login, .site .site-body form.register { border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 0 0 24px; }
.site .site-body #payment { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; color: var(--text); }
.site .site-body #payment ul.payment_methods { border-bottom-color: var(--line); padding: 18px; }
.site .site-body #payment ul.payment_methods li { color: var(--text); }
.site .site-body #payment ul.payment_methods li label { display: inline; color: var(--text); font-size: 16px; }
.site .site-body #payment div.payment_box { background: #1c1c20; color: rgba(245,245,247,.86); border-radius: 12px; }
.site .site-body #payment div.payment_box::before { border-bottom-color: #1c1c20; }
.site .site-body #payment div.payment_box p:last-child { margin: 0; }
.site .site-body #payment div.form-row { padding: 18px; }
.site .site-body #payment #place_order { width: 100%; float: none; min-height: 54px; font-size: 18px; }
.site .site-body .woocommerce-privacy-policy-text p, .site .site-body .woocommerce-terms-and-conditions-wrapper p { font-size: 13px; color: var(--muted); }
.site .site-body table.woocommerce-checkout-review-order-table .product-name { color: var(--text); }
.site .site-body .order-total .amount { font-size: 20px; color: var(--text); }
/* Payment buttons and card fields come from WooPayments/PayPal in their own iframes (WooPayments themes its card field from these inputs): only give them room. */
.site-body .wcpay-payment-request-wrapper, .site-body #wcpay-express-checkout-element, .site-body .wc-block-components-express-payment, .site-body #ppc-button-ppcp-gateway, .site-body .ppc-button-wrapper { margin: 0 0 16px; }

/* Select2 (country/state pickers on checkout) */
.site .select2-container--default .select2-selection--single { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; height: 46px; }
.site .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 44px; padding: 0 36px 0 14px; }
.site .site-body .select2-container .select2-selection--single { height: 46px; margin: 0; }
.site .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
.site .select2-dropdown { background: var(--panel); border-color: var(--line); color: var(--text); }
.site .select2-search--dropdown .select2-search__field { background: #000; color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.site .select2-container--default .select2-results__option--highlighted[aria-selected], .site .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--accent); }
.site .select2-container--default .select2-results__option[aria-selected="true"], .site .select2-container--default .select2-results__option[data-selected="true"] { background: #2a2a2e; color: var(--text); }

/* My account */
.woocommerce-account .site-body .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0 0 32px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.woocommerce-account .site-body .woocommerce-MyAccount-navigation li { margin: 0; border-top: 1px solid var(--line); }
.woocommerce-account .site-body .woocommerce-MyAccount-navigation li:first-child { border-top: 0; }
.woocommerce-account .site-body .woocommerce-MyAccount-navigation li a { display: block; padding: 12px 18px; color: var(--muted); text-decoration: none; }
.woocommerce-account .site-body .woocommerce-MyAccount-navigation li.is-active a { color: var(--text); background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.site .site-body .woocommerce-customer-details address { border-color: var(--line); border-radius: 12px; padding: 16px; color: rgba(245,245,247,.86); }
.site .site-body ul.order_details { padding: 0; }
.site .site-body ul.order_details li { border-color: var(--line); color: var(--muted); }
.site .site-body ul.order_details li strong { color: var(--text); }

/* Simulator page: the iframe runs full width */
.page-moto-tester-sim .site-page > h1 { font-size: clamp(26px, 3.5vw, 36px); }
.page-moto-tester-sim .site-body iframe { border-radius: 14px; }

@media (max-width: 768px) {
	/* Woo's small-screen cart turns rows into stacked cards */
	.site .site-body table.shop_table_responsive tr, .site .site-body table.shop_table_responsive tr { border-top: 1px solid var(--line); }
	.site .site-body table.shop_table_responsive tr:first-child { border-top: 0; }
	.site .site-body table.shop_table_responsive tr td, .site .site-body table.shop_table_responsive tr td { border-top: 0; padding: 8px 16px; }
	.site .site-body table.shop_table_responsive tr:nth-child(2n) td { background: transparent; }
	.site .site-body table.cart td.actions .coupon { display: flex; flex-wrap: wrap; gap: 10px; }
	.site .site-body table.cart td.actions .coupon .input-text { flex: 1 1 100%; width: 100%; min-width: 0; min-height: 50px; margin: 0; font-size: 17px; }
	.site .site-body table.shop_table_responsive { table-layout: fixed; }
	.site .site-body form.checkout_coupon .form-row-first, .site .site-body form.checkout_coupon .form-row-last { float: none; width: 100%; }
	.site .site-body form.checkout_coupon .form-row-first { margin: 0 0 10px; }
	/* Phones: coupon field, Apply and Update cart each get a full-width row */
	.site .site-body table.cart td.actions > .button { width: 100%; margin: 10px 0 0; }
	.site .site-body table.cart td.actions .coupon { float: none; width: 100%; padding: 0; }
	.site .site-body table.cart td.actions .coupon button[name="apply_coupon"] { flex: 1 1 100%; width: 100%; margin: 0; min-height: 50px; }
	.site .site-body ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.site .site-body ul.products li.product .woocommerce-loop-product__title { font-size: 15px; padding: 0 12px; }
	.site .site-body ul.products li.product .price { padding: 0 12px; font-size: 14px; }
	.site .site-body ul.products li.product .button { margin: auto 12px 0; padding: 8px 14px; font-size: 13px; }
}
