/*
 Theme Name:  Unipaser
 Template:    astra
 Version:     1.0.0
 Description: Astra child theme for unipaser.com.
*/

.unipaser-part-details { display: grid; grid-template-columns: max-content 1fr; gap: .25em 1em; margin: 1em 0; }
.unipaser-part-details dt { font-weight: 600; }
.unipaser-part-details dd { margin: 0; }

dialog { max-width: min(90vw, 640px); border: 0; border-radius: 6px; padding: 1.5em; }
dialog::backdrop { background: rgb(0 0 0 / .6); }
dialog img { display: block; max-width: 100%; height: auto; }
#unipaser-lightbox { max-width: 95vw; max-height: 95vh; padding: .5em; }
#unipaser-lightbox img { max-height: 88vh; width: auto; margin: auto; }
#unipaser-quote-close, #unipaser-lightbox-close { float: right; background: none; color: inherit; border: 0; font-size: 1.5em; line-height: 1; padding: 0; cursor: pointer; }

/* Home page */
/* Pages are plain HTML, so these replace what WordPress adds to real blocks. */
.entry-content figure { margin: 0 0 1em; }
.entry-content > .unipaser-home { padding-left: 18px; padding-right: 18px; }

.unipaser-home { max-width: 1140px; margin: 0 auto; }
.unipaser-home-hero { gap: 2.5em; padding-bottom: 4.5em; }
.unipaser-home-hero .wp-block-image { margin: 0; }
.unipaser-home-hero img { display: block; width: 100%; height: auto; }
.unipaser-home-hero .wp-block-column:nth-child(2) { text-align: center; }
.unipaser-home-hero h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.25; margin-bottom: .4em; }
.unipaser-home-motto { color: #a52a2a; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.5em; }
.unipaser-home-hero .wp-block-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .75em; }
.unipaser-home .wp-block-button__link { padding: .7em 1.3em; font-size: 15px; font-weight: 600; line-height: 1.2; color: #fff; border: 1px solid #7f1f1f; border-radius: 8px; background: linear-gradient(#b23434, #962525); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 1px 2px rgb(0 0 0 / .2), 0 3px 8px rgb(0 0 0 / .1); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.unipaser-home .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { padding: .7em 1.3em; color: #333; border: 1px solid #ccc; background: linear-gradient(#fff, #f1f1f1); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(0 0 0 / .1), 0 3px 8px rgb(0 0 0 / .06); }
.unipaser-home .wp-block-button__link:hover { color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 2px 4px rgb(0 0 0 / .2), 0 6px 14px rgb(0 0 0 / .14); }
.unipaser-home .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover { color: #333; }
.unipaser-home .wp-block-button__link:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgb(0 0 0 / .2); }
.unipaser-home .wp-block-button__link:focus-visible { outline: 2px solid #a52a2a; outline-offset: 2px; }
.unipaser-home-lead { max-width: 46em; margin: 0 auto 4.5em; font-size: 1.2rem; line-height: 1.7; text-align: center; }
.entry-content .unipaser-home-cards { gap: 2em; margin-bottom: 1.5em; }
.unipaser-home-cards .wp-block-column, .unipaser-home-note { padding: 2em; border: 1px solid #e8e8e8; border-radius: 10px; background: linear-gradient(#fff, #fafafa); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 18px rgb(0 0 0 / .04); }
.unipaser-home h2 { font-size: 1.25rem; margin-bottom: .75em; }
.unipaser-home-cards p:last-child, .unipaser-home-note p:last-child { margin-bottom: 0; }
.unipaser-home-note { margin-bottom: 3.5em; }
.unipaser-home-note > * { max-width: none; }

@media (max-width: 781px) {
	.unipaser-home-hero { gap: 1em; padding-bottom: 3em; }
	.unipaser-home-hero.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: calc(50% - .5em) !important; }
	.unipaser-home-hero.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(2) { flex-basis: 100% !important; order: -1; margin-bottom: 1em; }
	.unipaser-home-lead { font-size: 1.05rem; text-align: left; margin-bottom: 3em; }
}

/* Mercedes-Benz logo, far right of the header. Change the height here to resize it. */
.ast-header-html-2 { flex: none; }
.ast-header-html-2 p { margin: 0; }
.ast-header-html-2 img { display: block; width: auto; max-width: none; height: 50px; }
.ast-builder-menu-2 .main-header-menu { flex-wrap: nowrap; } /* Keeps the links on one line in narrow desktop windows. */
.ast-builder-menu-2 .menu-link { white-space: nowrap; }

/* Part search */
.unipaser-search { display: flex; gap: .5em; max-width: 34em; margin: 0; }
.unipaser-search input[type="search"], .unipaser-search button { height: 34px; min-height: 0; padding: 0 .75em; font-size: 14px; line-height: 1; }
.unipaser-search-field { position: relative; display: flex; flex: 1; min-width: 12em; }
.unipaser-search input[type="search"] { flex: 1; width: 100%; min-width: 0; margin: 0; padding-right: 2.25em; }
.unipaser-search input[type="search"]::-webkit-search-cancel-button { display: none; } /* Chrome and Safari would add a second X. */
.unipaser-search input.unipaser-search-clear,
.unipaser-search input.unipaser-search-clear:hover,
.unipaser-search input.unipaser-search-clear:focus { position: absolute; top: 0; right: 0; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 3l10 10M13 3L3 13'/%3E%3C/svg%3E") center / 14px no-repeat; border: 0; box-shadow: none; opacity: .55; }
.unipaser-search input.unipaser-search-clear:hover,
.unipaser-search input.unipaser-search-clear:focus-visible { opacity: 1; }
.unipaser-search input:placeholder-shown + .unipaser-search-clear { display: none; }
/* The header box is inside the menu on phones and tablets, so the catalog page shows its own there. */
.unipaser-catalog-search { margin-bottom: 2em; }
@media (min-width: 922px) { .unipaser-catalog-search { display: none; } }

/* Catalog page */
@media (prefers-reduced-motion: no-preference) { html:has(.unipaser-catalog) { scroll-behavior: smooth; } }
.unipaser-catalog { display: grid; grid-template-columns: 17em minmax(0, 1fr); gap: 6em; align-items: start; }
.unipaser-catalog nav { position: sticky; top: calc(2.5em + var(--wp-admin--admin-bar--height, 0px)); max-height: calc(100vh - 3.5em - var(--wp-admin--admin-bar--height, 0px)); overflow-y: auto; }
.unipaser-catalog nav a { display: block; font-size: 14px; line-height: 1.3; padding: .5em .75em; border-left: 3px solid #ddd; border-bottom: 1px solid #e8e8e8; color: inherit; text-decoration: none; }
.unipaser-catalog nav a:hover { color: #a52a2a; }
.unipaser-catalog nav a[aria-current] { border-left-color: #a52a2a; color: #a52a2a; font-weight: 700; }
.unipaser-catalog section { display: flex; align-items: flex-start; gap: 1.5em; padding-bottom: 2em; margin-bottom: 2em; border-bottom: 1px solid #e8e8e8; scroll-margin-top: calc(2.5em + var(--wp-admin--admin-bar--height, 0px)); }
.unipaser-catalog section:last-child { border-bottom: 0; }
.unipaser-catalog section > a { flex: none; cursor: zoom-in; }
.unipaser-catalog section > a img { display: block; width: 200px; height: auto; aspect-ratio: 3 / 2; object-fit: contain; border: 1px solid #e8e8e8; }
.unipaser-no-plate { flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 200px; aspect-ratio: 3 / 2; border: 1px solid #e8e8e8; }
.unipaser-no-plate img { display: block; width: 100%; height: 100%; object-fit: contain; }
.unipaser-catalog h2 { font-size: 1.1em; margin-bottom: .5em; }
.unipaser-catalog ul { margin: 0 0 0 1.25em; }

@media (max-width: 921px) {
	.unipaser-catalog { display: block; }
	.unipaser-catalog section { flex-direction: column; gap: .75em; }
	.unipaser-catalog nav { top: var(--wp-admin--admin-bar--height, 0px); z-index: 10; display: flex; max-height: none; overflow-x: auto; margin-bottom: 1.5em; background: #fff; border-bottom: 1px solid #ddd; }
	.unipaser-catalog nav a { flex: none; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
	.unipaser-catalog nav a[aria-current] { border-bottom-color: #a52a2a; }
	.unipaser-catalog section { scroll-margin-top: calc(5em + var(--wp-admin--admin-bar--height, 0px)); }
}

/* Parts categories */
.woocommerce-products-header__title { color: #a52a2a; font-weight: 400; letter-spacing: .25em; text-transform: uppercase; }
.unipaser-parts-head { display: flex; align-items: flex-start; gap: 2.5em; margin-bottom: 1.5em; }
.unipaser-parts-info { flex: 1; min-width: 0; }
.unipaser-parts-info .woocommerce-breadcrumb { margin-bottom: 1em; }
.unipaser-parts-info .page-title { margin-bottom: .75em; }
.woocommerce-products-header:not(:has(*)) { display: none; }
.unipaser-plate-card { display: block; flex: none; width: min(30%, 300px); overflow: hidden; color: #333; text-decoration: none; cursor: zoom-in; background: #fff; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 3px 8px rgb(0 0 0 / .06); transition: box-shadow .15s, transform .15s; }
.unipaser-plate-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; padding: .5em; box-sizing: border-box; }
.unipaser-plate-cta { display: flex; align-items: center; justify-content: center; gap: .5em; padding: .6em .75em; font-size: 14px; font-weight: 600; line-height: 1.2; color: #fff; background: linear-gradient(#b23434, #962525); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.unipaser-plate-card:hover { color: #333; transform: translateY(-2px); box-shadow: 0 2px 4px rgb(0 0 0 / .15), 0 8px 18px rgb(0 0 0 / .14); }
.unipaser-plate-card:active { transform: translateY(1px); box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.unipaser-plate-card:focus-visible { outline: 2px solid #a52a2a; outline-offset: 2px; }
.unipaser-plate-card.is-empty { cursor: default; box-shadow: none; transform: none; }
.unipaser-plate-card.is-empty .unipaser-plate-cta { font-weight: 400; color: #555; background: #f1f1f1; box-shadow: none; }
.unipaser-parts-sort { margin: 0; }

.unipaser-parts { width: 100%; border-collapse: collapse; font-size: 14px; }
.unipaser-parts th { font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; background: none; border: 0; padding: .5em; }
.unipaser-parts td { padding: .5em; vertical-align: top; border: 0; border-top: 1px solid #999; border-bottom: 1px solid #999; background: #f8f8f8; }
.unipaser-parts thead td { background: none; border: 0; }
.unipaser-parts .part-sku, .unipaser-parts .part-benz, .unipaser-parts .part-price, .unipaser-parts .part-core { white-space: nowrap; }
.unipaser-parts .part-core { color: #a52a2a; }
.unipaser-parts .part-photo img { display: block; width: 80px; max-width: none; height: auto; }
.unipaser-parts .part-cart { text-align: right; vertical-align: bottom; min-width: 9em; }
.unipaser-parts .part-cart .button { font-size: 12px; padding: .5em .75em; line-height: 1.2; white-space: nowrap; }
.unipaser-parts .part-cart a.added_to_cart { display: block; font-size: 12px; margin-top: .25em; }
.unipaser-parts .part-truck { font-size: 12px; text-align: left; min-width: 14em; }
.unipaser-parts .part-out { display: inline-block; font-size: 12px; color: #a52a2a; border: 1px solid #999; border-radius: 6px; padding: .25em .5em; white-space: nowrap; }

@media (max-width: 800px) {
	.unipaser-parts-head { flex-direction: column-reverse; align-items: stretch; gap: 1em; }
	.unipaser-plate-card { width: 100%; }
	.unipaser-parts thead { display: none; }
	.unipaser-parts, .unipaser-parts tbody, .unipaser-parts tr, .unipaser-parts td { display: block; }
	.unipaser-parts tr { border: 1px solid #999; margin-bottom: 1em; background: #f8f8f8; }
	.unipaser-parts td { display: flex; justify-content: space-between; gap: 1em; border: 0; padding: .25em .75em; text-align: right; }
	.unipaser-parts td:empty { display: none; }
	.unipaser-parts td[data-label]::before { content: attr(data-label); font-weight: 700; text-align: left; }
	.unipaser-parts .part-cart { display: block; padding-bottom: .75em; }
}

/* Stock Nr. pages, the children of the Unimogs page */
.parent-pageid-92 .entry-content { max-width: 650px; margin-left: auto; margin-right: auto; }
.parent-pageid-92 .entry-content img { width: 100%; }

/* Truck under the card icons. It's in the Astra footer HTML element. Multiply hides the JPEG's white background. */
.unipaser-footer-mog { display: block; width: auto; height: 85px; margin: .75em auto 0; mix-blend-mode: multiply; }
@media (max-width: 921px) { .unipaser-footer-mog { display: none; } } /* Columns stack here, so it would only add height. */
