/*
 * Rat's Loot skin "mart": the look of a handheld RPG shop menu. A shop floor with the back wall on top, light
 * panels with a slate line, dark grey text with a pixel shadow, the items as picture cards in a blue framed window,
 * a red frame around the item you point at, orange scroll arrows for the pages and a green description bar along
 * the bottom. (The earlier price-list version is kept as theme-mart.list-version.css in the theme sources.) Font: PixelMplus12 at 24 px (2x).
 */
:root {
	--rl-font: "PixelMplus12", ui-monospace, monospace;
	--rl-fs: 24px; --rl-lh: 32px; --rl-fs-big: 36px; --rl-lh-big: 44px; --rl-weight-h: 700;
	--rl-text: #585850; --rl-dim: #88908c; --rl-accent: #f80000; --rl-link: #2864c0; --rl-rule: #c8d0d0; --rl-head: #585850; --rl-shadow: #c0cccc;
	--rl-badge-ink: #fff;
	--rl-win: url(img/mart-win.png?v=1795440907); --rl-win-slice: 4; --rl-win-w: 4px;
	--rl-list: url(img/mart-list.png?v=1795440907); --rl-list-slice: 18; --rl-list-w: 18px;
	--rl-cur: url(img/mart-cursor.png?v=1795440907); --rl-cur-w: 10px; --rl-cur-h: 20px; --rl-cur-space: 24px; --rl-cur-left: 6px;
	--rl-more: none;
	--rl-i-down: url(img/mart-i-down.png?v=1795440907); --rl-i-account: url(img/mart-i-account.png?v=1795440907); --rl-i-cart: url(img/mart-i-cart.png?v=1795440907);
	--rl-msg-h: 80px; --rl-msg-pic: 64px; --rl-msg-space: 30px; --rl-pick-hover: #d0e4f8;
	--rl-field-bg: #ffffff; --rl-field-ink: #585850; --rl-field-line: #607078; --rl-i-check: url(img/mart-i-check.png?v=1795440907); --rl-i-close: url(img/mart-i-close.png?v=1795440907); --rl-i-menu: url(img/mart-i-menu.png?v=1795440907); --rl-error: #d82020;
	--rl-field-h: 48px; --rl-main-top: 24px; --rl-pad-top: 8px; --rl-gap: 16px;
}
html body { background: #6ba5ef url(img/martc-floor.png?v=1795440907) repeat !important; background-size: 32px 32px !important; image-rendering: pixelated;
	text-shadow: 2px 0 0 var(--rl-shadow), 0 2px 0 var(--rl-shadow), 2px 2px 0 var(--rl-shadow); }
/* the back wall of the shop, behind the header */
.wp-site-blocks::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 94px; background: url(img/mart-wall.png?v=1795440907) repeat-x; background-size: 2px 94px; image-rendering: pixelated; z-index: 0; }
html body header .wp-block-site-title a { font-weight: 700 !important; color: var(--rl-text) !important; }
header.wp-block-template-part > .wp-block-group > .wp-block-group { padding-left: 12px !important; }
html body img, html body input, html body select, html body textarea { text-shadow: none; }

/* ---------- side panels: cart total and item count as two boxes, then the menu ---------- */
.rl-gold { display: flex; flex-direction: column; gap: 12px; }
.rl-gold-row, .rl-menu { border: var(--rl-win-w) solid transparent; border-image: var(--rl-win) var(--rl-win-slice) fill / var(--rl-win-w) stretch; image-rendering: pixelated; box-sizing: border-box; }
.rl-gold-row { padding: 4px 12px; }
.rl-gold-total { display: grid; grid-template-columns: minmax(0, 1fr); }
.rl-gold-total .rl-gold-amount { justify-self: end; }
.rl-gold-label::after { content: ":"; }
.rl-menu { padding: 4px 6px; }
.rl-menu a.rl-on { color: var(--rl-accent) !important; }
.woocommerce-breadcrumb, .woocommerce-breadcrumb a, .woocommerce-result-count { color: var(--rl-dim) !important; }
.woocommerce-breadcrumb a { text-decoration: none !important; }
body.rl-archive main#wp--skip-link--target > h1.wp-block-query-title, .rl-section > h2:first-child { margin: 0 0 4px !important; }
.rl-section > h2:first-child a { color: var(--rl-text) !important; text-decoration: none !important; }

/* ---------- the items: picture cards, three in a row; a red frame around the card you point at ---------- */
:is(.wc-block-product-template, ul.products) { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: 8px !important; row-gap: 12px !important;
	align-items: stretch !important; align-content: start !important; grid-auto-rows: auto !important; grid-template-rows: none !important; height: auto !important; }
:is(.wc-block-product-template, ul.products) > li { display: flex !important; flex-direction: column; height: auto !important; align-self: stretch !important;
	padding: 6px !important; border: 8px solid transparent; }
@media (hover: hover) {
	:is(.wc-block-product-template, ul.products) > li:hover { border-image: url(img/mart-sel.png?v=1795440907) 8 / 8px stretch; image-rendering: pixelated; }
}
:is(.wc-block-product-template, ul.products) > li :is(.wc-block-components-product-image, a > img, a > .rl-thumb) { flex: none; box-shadow: 0 0 0 2px #c8d0d0; }
html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title) { flex: 1 0 auto; margin-top: 10px !important; }
:is(.wc-block-product-template, ul.products) > li :is(.wp-block-woocommerce-product-price, .price) { flex: none; margin: 4px 0 8px !important; text-align: left !important; }
:is(.wc-block-product-template, ul.products) > li :is(.wp-block-woocommerce-product-button, a.button) { flex: none; margin-top: 0 !important; }
:is(.wc-block-product-template, ul.products) > li :is(.wp-block-button__link, a.button) { display: block !important; width: 100% !important; }
html body :is(.price, .wc-block-components-product-price, .woocommerce-Price-amount), html body :is(.price, .wc-block-components-product-price, .woocommerce-Price-amount) :is(span, bdi, ins) { color: var(--rl-text) !important; }
html body del, html body del * { color: var(--rl-dim) !important; }
html body :is(.wc-block-product-template, ul.products) > li :is(.price, .wc-block-components-product-price),
html body :is(.wc-block-product-template, ul.products) > li :is(.price, .wc-block-components-product-price) :is(span, bdi, ins),
html body.single-product .wp-block-woocommerce-product-price :is(div, span, bdi, ins), html body.single-product .summary .price :is(span, bdi, ins) {
	font-size: var(--rl-fs-big) !important; line-height: var(--rl-lh-big) !important; }
html body ul.products li.product-category mark { background: none; color: var(--rl-dim) !important; }
/* a home section shows whole rows only: with three in a row the 4th of 4 and the 7th and 8th of 8 stay away */
@media (min-width: 901px) {
	.rl-section ul.products > li:nth-child(4):nth-last-child(1), .rl-section ul.products > li:nth-child(7):nth-last-child(2), .rl-section ul.products > li:nth-child(8):nth-last-child(1) { display: none !important; }
	.rl-section ul.products > li.product-category:nth-child(4) { display: flex !important; }
	.rl-section ul.products:has(> li.product-category) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* pages of the list: orange scroll arrows, up on top of the list and down below it */
body.rl-archive .wp-block-woocommerce-product-collection { padding-top: 34px; }
.wp-block-query-pagination { flex-direction: column; gap: 4px !important; margin-top: 8px !important; }
.wp-block-query-pagination-previous, .wp-block-query-pagination-next { width: 60px; height: 30px; padding: 0 !important; text-indent: -9999px; overflow: hidden; white-space: nowrap;
	background: url(img/mart-down.png?v=1795440907) no-repeat center / 22px 14px; image-rendering: pixelated; }
.wp-block-query-pagination-next { order: -1; }
.wp-block-query-pagination-previous { position: absolute; top: 2px; left: 50%; margin-left: -30px !important; background-image: url(img/mart-up.png?v=1795440907); }
.wp-block-query-pagination .page-numbers.current { color: var(--rl-accent); }
.wp-block-query-pagination a.page-numbers { color: var(--rl-text) !important; }

/* ---------- buttons: small panels, light blue while chosen ---------- */
html body :is(.wp-element-button, .wp-block-button__link, .button, button.single_add_to_cart_button, .wc-block-components-button, input[type=submit]) {
	background: none !important; color: var(--rl-text) !important; border: 4px solid transparent !important; border-image: url(img/mart-btn.png?v=1795440907) 4 fill / 4px stretch !important;
	padding: 4px 14px !important; image-rendering: pixelated; text-shadow: 2px 0 0 var(--rl-shadow), 0 2px 0 var(--rl-shadow), 2px 2px 0 var(--rl-shadow); }
@media (hover: hover) {
	html body :is(.wp-element-button, .wp-block-button__link, .button, button.single_add_to_cart_button, .wc-block-components-button, input[type=submit]):hover { border-image-source: url(img/mart-btn-on.png?v=1795440907) !important; }
}
html body :is(.wp-element-button, .button, .wc-block-components-button):disabled, html body .button.disabled { color: var(--rl-dim) !important; cursor: default; }

/* ---------- fields ---------- */
html body :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], input[type=url], select, textarea) {
	background-color: #fff !important; color: var(--rl-text) !important; border: 2px solid #607078 !important; padding: 6px 10px; }
::placeholder { color: var(--rl-dim); opacity: 1; }
.rl-currency select { min-height: 44px; height: 44px; padding: 4px 30px 4px 8px !important; }

/* ---------- header menu ---------- */
header .wp-block-navigation__submenu-container, .wp-block-navigation__responsive-container.is-menu-open {
	background: #f8f8f8 !important; color: var(--rl-text) !important; border: 4px solid transparent !important; border-image: url(img/mart-win.png?v=1795440907) 4 fill / 4px stretch !important; image-rendering: pixelated; }

/* ---------- description bar: green, along the bottom of the screen ---------- */
#rl-msg { background: #40b040; border-top: 2px solid #707890; box-shadow: inset 0 2px 0 #b8e898; color: #f8f8f8; text-shadow: 2px 0 0 #1c401c, 0 2px 0 #1c401c, 2px 2px 0 #1c401c; }
.rl-msg-pic { border: 4px solid transparent; border-image: url(img/mart-icon.png?v=1795440907) 4 / 4px stretch; background-color: #f8f8f8; background-clip: padding-box; }
.rl-msg-pic img { background: #f8f8f8; }
.rl-msg-name, .rl-msg-desc { color: #f8f8f8; }

/* ---------- product page: the short description sits in a green box, like an item description ---------- */
.single-product .wp-block-post-excerpt, .single-product .woocommerce-product-details__short-description {
	background: #40b040; border: 2px solid #707890; box-shadow: inset 0 2px 0 #b8e898; padding: 6px 12px 4px; margin: 0 0 16px !important; }
.single-product :is(.wp-block-post-excerpt, .woocommerce-product-details__short-description), .single-product :is(.wp-block-post-excerpt, .woocommerce-product-details__short-description) * {
	color: #f8f8f8 !important; text-shadow: 2px 0 0 #1c401c, 0 2px 0 #1c401c, 2px 2px 0 #1c401c; }
.single-product .woocommerce-tabs ul.tabs li a { color: var(--rl-dim) !important; }
.single-product .woocommerce-tabs ul.tabs li.active a { color: var(--rl-text) !important; font-weight: 700 !important; }
.single-product .woocommerce-tabs ul.tabs { border-bottom: 2px solid var(--rl-rule) !important; padding-bottom: 4px !important; margin-bottom: 16px !important; }
.single-product .stock { color: var(--rl-text) !important; }
.single-product .product_meta, .single-product .wp-block-post-terms, .rl-3d-hint, .rl-info-note, .rl-video figcaption, .rl-figure figcaption { color: var(--rl-dim) !important; }
.single-product .woocommerce-product-gallery { border: 2px solid #607078; }
.quantity input.qty { width: 92px; }

/* ---------- notices and overlays ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
	background: #f8f8f8 !important; color: var(--rl-text) !important; border: 4px solid transparent !important; border-image: url(img/mart-win.png?v=1795440907) 4 fill / 4px stretch !important; border-radius: 0 !important; image-rendering: pixelated; }
.wc-block-components-notice-banner > svg { display: none !important; }
.wc-block-mini-cart__drawer, .wc-block-components-drawer, .wc-block-components-drawer__content { background: #f8f8f8 !important; color: var(--rl-text) !important; }
.wc-block-components-drawer { border-left: 4px solid #607078; }
footer .wp-block-site-title a { color: var(--rl-text) !important; text-decoration: none; font-weight: 700 !important; }

@media (max-width: 900px) {
	body.rl-archive main#wp--skip-link--target::before { top: var(--rl-side-h, 96px); }
	.rl-gold { flex-direction: row; }
	.rl-gold-row { flex: 1 1 0; }
}
@media (max-width: 900px) {
	:is(.wc-block-product-template, ul.products) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: 0 !important; }
}
@media (max-width: 700px) {
	:root { --rl-font: "PixelMplus10", ui-monospace, monospace; --rl-fs: 20px; --rl-lh: 28px; --rl-fs-big: 20px; --rl-lh-big: 28px; --rl-cur-h: 20px; }
	:is(.wc-block-product-template, ul.products) > li { padding: 2px !important; border-width: 6px; }
	html body.single-product .wp-block-woocommerce-product-price :is(div, span, bdi, ins) { font-size: 40px !important; line-height: 48px !important; }
	html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-button__link, a.button) { padding: 4px 6px !important; }
}

/* pull the cents one pixel closer to the full stop */
.rl-dec { margin-right: -0.0834em; }

/* drawer and overlays use the panel colour */
.wc-block-components-drawer, .wc-block-components-drawer__content, .wc-block-mini-cart__drawer .wp-block-woocommerce-mini-cart-contents, .wc-block-mini-cart__template-part,
.wc-block-mini-cart__footer, .wp-block-woocommerce-filled-mini-cart-contents-block, .wp-block-woocommerce-empty-mini-cart-contents-block { background: #f8f8f8 !important; }


/* the description bar shows the description only (the name is in the row you point at), two lines */
.rl-msg-name { display: none; }
.rl-msg-text { height: calc(var(--rl-lh) * 2); }

.rl-gallery { border: 2px solid #607078; }

/* related products on a product page: one full row of three */
@media (min-width: 901px) {
	.single-product .wp-block-woocommerce-product-collection .wc-block-product-template > li:nth-child(n+4) { display: none !important; }
}

/* touch screens: the item you touched last has the red frame */
@media (hover: none) {
	:is(.wc-block-product-template, ul.products) > li.rl-sel { border-image: url(img/mart-sel.png?v=1795440907) 8 / 8px stretch; image-rendering: pixelated; }
}

/* ================= colour variants of the mart look (see rl_mart_variant) ================= */
/* --- "cream": pale yellow list panel in an orange frame, dashed lines, a cursor for the chosen item, blue bar, blue floor --- */
body.rl-mart-cream { --rl-text: #606060; --rl-head: #606060; --rl-dim: #909088; --rl-shadow: #d0d0c8; --rl-accent: #e06830; --rl-rule: #e8dc9c;
	--rl-win: url(img/martc-win.png?v=1795440907); --rl-list: url(img/martc-list.png?v=1795440907); --rl-list-slice: 10; --rl-list-w: 10px; --rl-cur: url(img/martc-cursor.png?v=1795440907);
	background-image: url(img/martc-floor.png?v=1795440907) !important; background-color: #6ba5ef !important; }
body.rl-mart-cream .rl-gold-row, body.rl-mart-cream .rl-menu { border-image-source: url(img/martc-win.png?v=1795440907); }
/* the chosen item gets the cursor in front of its name (its place is always kept free), not a frame */
html body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title) { position: relative; padding-left: 24px !important; }
body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title)::before {
	content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 20px; background: url(img/martc-cursor.png?v=1795440907) no-repeat center / 100% 100%; image-rendering: pixelated; visibility: hidden; }
body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li :is(.wp-block-woocommerce-product-price, .price) { padding-left: 24px; }
@media (hover: hover) {
	body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li:hover { border-image: none; background: #fff3b0; }
	html body.rl-mart-cream :is(.wp-element-button, .wp-block-button__link, .button, button.single_add_to_cart_button, .wc-block-components-button, input[type=submit]):hover { border-image-source: url(img/mart-btn-on.png?v=1795440907) !important; }
	body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li:hover :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title)::before { visibility: visible; }
}
@media (hover: none) {
	body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li.rl-sel { border-image: none; }
	body.rl-mart-cream :is(.wc-block-product-template, ul.products) > li.rl-sel :is(.wp-block-post-title, .woocommerce-loop-product__title)::before { visibility: visible; }
}
body.rl-mart-cream #rl-msg { background: #017bc6; border-top: 4px solid #015a94; box-shadow: inset 0 4px 0 #30a0e0, inset 0 -4px 0 #015a94; text-shadow: 2px 0 0 #505860, 0 2px 0 #505860, 2px 2px 0 #505860; }
body.rl-mart-cream .rl-msg-pic { border: 0; border-image: none; background-color: #fff; box-shadow: 0 0 0 2px #b8dce8; }
body.rl-mart-cream.single-product :is(.wp-block-post-excerpt, .woocommerce-product-details__short-description) { background: #017bc6; border-color: #015a94; box-shadow: inset 0 2px 0 #30a0e0; }
body.rl-mart-cream.single-product :is(.wp-block-post-excerpt, .woocommerce-product-details__short-description) * { text-shadow: 2px 0 0 #505860, 0 2px 0 #505860, 2px 2px 0 #505860; }
html body.rl-mart-cream :is(.wp-element-button, .wp-block-button__link, .button, button.single_add_to_cart_button, .wc-block-components-button, input[type=submit]) { border-image-source: url(img/martc-win.png?v=1795440907) !important; }

/* Computers: cart total and number of items share one window */
@media (min-width: 901px) {
	html body .rl-gold { gap: 0; padding: 4px 12px; border: var(--rl-win-w) solid transparent; border-image: var(--rl-win) var(--rl-win-slice) fill / var(--rl-win-w) stretch; image-rendering: pixelated; box-sizing: border-box; }
	html body .rl-gold .rl-gold-row { border: 0; border-image: none; padding: 0; display: flex; }
	html body.rl-mart-cream .rl-gold { border-image-source: url(img/martc-win.png?v=1795440907); }
}
/* the cart window is one window on every screen size */
html body .rl-gold { display: block; gap: 0; padding: 4px 12px; border: var(--rl-win-w) solid transparent; border-image: var(--rl-win) var(--rl-win-slice) fill / var(--rl-win-w) stretch; image-rendering: pixelated; box-sizing: border-box; }
html body .rl-gold .rl-gold-row { border: 0; border-image: none; padding: 0; display: flex; flex: none; }
html body.rl-mart-cream .rl-gold { border-image-source: url(img/martc-win.png?v=1795440907); }
/* pages of the list: no arrow in the middle above the list; previous, page numbers and next in one row under it */
body.rl-archive .wp-block-woocommerce-product-collection { padding-top: 0; }
html body .wp-block-query-pagination { flex-direction: row; gap: 8px !important; }
html body .wp-block-query-pagination-previous, html body .wp-block-query-pagination-next { position: static; order: 0; width: auto; height: auto; margin: 0 !important; padding: 4px 8px !important; text-indent: 0; overflow: visible;
	background: none; color: var(--rl-text) !important; }
/* computers: four items in a row, like the Dragon Quest look (phones keep two) */
@media (min-width: 901px) {
	html body :is(.wc-block-product-template, ul.products) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 901px) {
	/* four in a row leaves less room per item: the names use the normal text size of the Dragon Quest look */
	html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title),
	html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-post-title, .woocommerce-loop-product__title, .woocommerce-loop-category__title) a { font-size: 20px !important; line-height: 28px !important; }
}
@media (min-width: 901px) {
	html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-button__link, .button, .add_to_cart_button),
	html body :is(.wc-block-product-template, ul.products) > li :is(.wp-block-button__link, .button, .add_to_cart_button) * { font-size: 20px !important; }
}
/* a narrow computer window (under 1100 px) has room for three items in a row, not four */
@media (min-width: 901px) and (max-width: 1099px) {
	html body :is(.wc-block-product-template, ul.products) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
