/* mi Shop (EXT:mi_shop): catalogue, cart and one-page checkout.
   Square surfaces and the shared colour tokens of template.css; nothing here sets a colour of its own.

   Layout by width:
     above 1150px   category column, items two per row
     901–1150px     category column, items one per row
     601–900px      category drop-down, compact items two per row, cart bar at the lower edge
     up to 600px    category drop-down, compact items one per row, cart bar at the lower edge */
.mi-shop { padding-bottom: 35px; color: var(--ink); }
.mi-shop *, .mi-shop *::before, .mi-shop *::after { box-sizing: border-box; }
.mi-shop [hidden] { display: none !important; }
.mi-shop :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mi-shop-testmode, .mi-shop-messages, .mi-shop > .mi-notice { margin-bottom: 20px; }
/* The checkout's "already a customer? log in" notice above its first step. */
.mi-shop-checkout > .mi-notice { margin-bottom: 28px; }
.mi-shop-messages > * + * { margin-top: 8px; }
.mi-shop-muted { margin: 6px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mi-shop-status { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The header's Shop button. With an empty cart it is the plain button with its bag icon. Once the cart
   holds something (shop.js adds .has-cart), it becomes a group: "Shop" without the icon leads to the shop,
   the cart symbol beside it to the cart, with the number of cart lines at its corner. */
.shop-trigger-wrap { display: inline-flex; gap: 1px; }
.header-actions .shop-trigger-wrap a.shop-trigger-cart[hidden] { display: none; }
.shop-trigger-wrap.has-cart .shop-trigger-shop { border-radius: 4px 0 0 4px; }
.shop-trigger-wrap.has-cart .shop-trigger-shop > svg { display: none; }
.shop-trigger-wrap .shop-trigger-cart { position: relative; border-radius: 0 4px 4px 0; }
.shop-trigger-wrap .shop-trigger:focus-visible { position: relative; z-index: 2; }
.shop-trigger-count { position: absolute; z-index: 1; right: -6px; bottom: -9px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid var(--surface); border-radius: 12px; background: var(--ink); color: var(--surface); font: 700 12px/1 "DM Sans", sans-serif; pointer-events: none; }
.shop-trigger-count[hidden] { display: none; }
/* On phones the header's buttons are 44 px squares showing the icon only. In the group the word is the
   control, so it comes back and gets air on both sides. */
@media (max-width: 767px) {
	.header-actions .shop-trigger-wrap.has-cart a.shop-trigger-shop { width: auto; padding: 0 12px; }
	.header-actions .shop-trigger-wrap.has-cart a.shop-trigger-shop > span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
/* Keeps the count at the cart's corner clear of the account button beside it, where the header has the room. */
@media (min-width: 360px) and (max-width: 767px) {
	.header-actions .shop-trigger-wrap.has-cart { margin-right: 6px; }
}
/* Below 400 px the header has no room for both halves: the cart half stands alone, the shop stays in the menu. */
@media (max-width: 399px) {
	.header-actions .shop-trigger-wrap.has-cart a.shop-trigger-shop { display: none; }
	.header-actions .shop-trigger-wrap.has-cart a.shop-trigger-cart { border-radius: 4px; }
}
/* An item put into the cart flies from its cover to the header's cart button (shop.js), which then nudges its count. */
.mi-shop-flyer { position: fixed; z-index: 1000; margin: 0; object-fit: contain; pointer-events: none; }
.shop-trigger-count.is-updated { animation: mi-shop-count-pop .45s ease-out; }
@keyframes mi-shop-count-pop { 40% { transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) {
	.shop-trigger-count.is-updated { animation: none; }
}

/* Page heading of cart and checkout */
.mi-shop-heading { display: flex; align-items: center; justify-content: space-between; gap: 35px; padding: 6px 0 29px; border-bottom: 1px solid var(--line); }
.mi-shop-heading--plain { margin-bottom: 26px; }
.mi-shop h1 { margin: 10px 0 12px; font: 700 clamp(30px, 4.6vw, 54px)/1.06 Manrope, sans-serif; letter-spacing: -.06em; overflow-wrap: anywhere; }
.mi-shop-intro { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.mi-shop-intro a { color: var(--link-ink); }

/* Search over the shop's catalogue */
.mi-shop-search { position: relative; display: flex; margin-bottom: 28px; border: 1px solid var(--control-line); background: var(--surface); }
.mi-shop-search:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mi-shop-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mi-shop-search svg { position: absolute; top: 50%; left: 16px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
/* The longer selector outranks the site's form system, which sets the padding of every field. */
.mi-pagepackage .mi-shop .mi-shop-search input[type="search"], .mi-shop .mi-shop-search input[type="search"] { flex: 1 1 auto; min-height: 52px; padding: 10px 12px 10px 48px; border: 0; background: transparent; font-size: 16px; }
.mi-shop .mi-shop-search input[type="search"]:focus-visible { outline: 0; }
.mi-shop-search button { flex: 0 0 auto; min-width: 104px; padding: 0 18px; border: 0; border-radius: 0; background: var(--accent-fill); color: var(--accent-on); font: 700 14px "DM Sans", sans-serif; cursor: pointer; }
.mi-shop-search button:hover { background: var(--accent-fill-hover); }
.mi-shop-empty { padding: 24px; border: 1px solid var(--line); background: var(--surface); line-height: 1.6; }
.mi-shop-empty p { margin: 0 0 16px; }
.mi-shop-empty p:last-child { margin: 0; }
.mi-shop-empty--cart { display: grid; justify-items: center; gap: 4px; max-width: 560px; margin: 8px auto 0; padding: 40px 24px; text-align: center; }
.mi-shop-empty--cart svg { margin-bottom: 8px; color: var(--muted); }
.mi-shop-empty--cart h2 { margin: 0 0 4px; font: 700 22px/1.3 Manrope, sans-serif; letter-spacing: -.035em; }
.mi-shop-empty--cart p { color: var(--muted); }
.mi-shop-empty--cart .mi-shop-button { width: auto; min-width: 200px; }

/* Catalogue: category menu beside the item list */
.mi-shop-browse { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 40px; }
.mi-shop-sidebar { position: sticky; top: 150px; }
.mi-shop-sidebar h2 { margin: 0 0 12px; color: var(--muted); font: 700 13px "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.mi-shop-category-links { margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mi-shop-category-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 12px 10px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; color: var(--ink); font-size: 15px; text-decoration: none; }
.mi-shop-category-links a:hover { background: var(--surface); color: var(--link-ink); }
.mi-shop-category-links a[aria-current="page"] { border-left-color: var(--accent); background: var(--surface); font-weight: 700; }
.mi-shop-sidebar-count { color: var(--muted); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.mi-shop-sidebar-cart { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 14px; border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); font: 700 14px "DM Sans", sans-serif; text-decoration: none; }
.mi-shop-sidebar-cart:hover { border-color: var(--accent); color: var(--link-ink); }
.mi-shop-sidebar-cart svg { flex: 0 0 auto; }
.mi-shop-sidebar-cart--checkout { margin-top: 8px; border-color: var(--accent-fill); background: var(--accent-fill); color: var(--accent-on); }
.mi-shop-sidebar-cart--checkout:hover { border-color: var(--accent-fill-hover); background: var(--accent-fill-hover); color: var(--accent-on); }
/* The same categories as a drop-down; shown instead of the column on phones and tablets. */
.mi-shop-picker { display: none; border: 1px solid var(--control-line); background: var(--surface); }
.mi-shop-picker summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 14px; cursor: pointer; list-style: none; }
.mi-shop-picker summary::-webkit-details-marker { display: none; }
.mi-shop-picker summary span { color: var(--muted); font-size: 13px; }
.mi-shop-picker summary strong { flex: 1 1 auto; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.mi-shop-picker summary svg { flex: 0 0 auto; transition: transform .15s ease; }
.mi-shop-picker[open] summary svg { transform: rotate(180deg); }
.mi-shop-picker nav { max-height: 60vh; padding: 0 14px 6px; overflow-y: auto; overscroll-behavior: contain; }
.mi-shop-picker .mi-shop-category-links { margin-bottom: 4px; }
.mi-shop-results { min-width: 0; }
.mi-shop-results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 18px; }
.mi-shop-results-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; }
.mi-shop-count { margin: 0; color: var(--muted); font-size: 13px; }
/* The category's description below its items, boxed like the item cards: same surface, border, square corners and inner padding. */
.mi-shop-about { display: flex; align-items: flex-start; gap: 24px; margin-top: 40px; padding: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); line-height: 1.65; }
.mi-shop-about img { flex: 0 0 auto; width: 112px; height: auto; }
.mi-shop-about h2 { margin: 0 0 8px; color: var(--ink); font: 700 20px/1.3 Manrope, sans-serif; letter-spacing: -.035em; }
.mi-shop-about a { color: var(--link-ink); }
.mi-shop-back { margin: -12px 0 8px; }

/* Buttons */
.mi-shop-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 49px; padding: 12px 15px; border: 1px solid var(--accent-fill); border-radius: 0; background: var(--accent-fill); color: var(--accent-on); font: 700 14px "DM Sans", sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.mi-shop-button:hover { border-color: var(--accent-fill-hover); background: var(--accent-fill-hover); }
.mi-shop-button--secondary { width: auto; display: inline-flex; border-color: var(--control-line); background: var(--surface); color: var(--ink); }
.mi-shop-button--secondary:hover { border-color: var(--accent); background: var(--surface); }
.mi-shop-button svg { flex: 0 0 auto; margin-right: 10px; }
/* An item that cannot be ordered: the order button's place and size, greyed and inert, at full text contrast. */
.mi-shop-button--unavailable:disabled, .mi-shop-button--unavailable:disabled:hover { border-color: var(--line); background: var(--surface-soft); color: var(--muted); cursor: not-allowed; }
.mi-shop-button--danger { color: var(--error-ink); }
.mi-shop-button--danger:hover { border-color: var(--error-ink); background: var(--error-surface); }
/* The question before the cart is emptied: the site's dialog, square like the shop's boxes. */
.mi-shop-confirm { width: min(480px, calc(100vw - 34px)); box-sizing: border-box; border-radius: 0; }
.mi-shop-confirm h2 { margin: 0 0 12px; color: var(--ink); font: 700 24px/1.2 Manrope, sans-serif; letter-spacing: -.04em; }
.mi-shop-confirm p { margin: 0; color: var(--muted); line-height: 1.65; }
.mi-shop-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mi-shop-confirm .mi-shop-confirm-actions .mi-shop-button { flex: 1 1 0; width: auto; margin: 0; justify-content: center; }
@media (max-width: 480px) {
	.mi-shop-confirm .mi-shop-confirm-actions .mi-shop-button { flex-basis: 100%; }
}
.mi-shop-button.is-added { border-color: var(--ink); background: var(--ink); color: var(--surface); }
/* On an item's button: how many of it the cart already holds (filled by shop.js). */
.mi-shop-in-cart { display: inline-grid; flex: 0 0 auto; place-items: center; min-width: 22px; height: 22px; margin-left: 10px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--surface); font: 700 12px/1 "DM Sans", sans-serif; }
.mi-shop-button.is-added .mi-shop-in-cart { background: var(--surface); color: var(--ink); }
.mi-shop-text-button { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 0; border: 0; background: transparent; color: var(--ink); font: 600 13px "DM Sans", sans-serif; text-decoration: underline; white-space: nowrap; cursor: pointer; }
.mi-shop-text-button:hover { color: var(--link-ink); }
.mi-shop-actions { display: flex; flex-wrap: wrap; gap: 12px; max-width: 520px; }
.mi-shop-actions .mi-shop-button { flex: 1 1 200px; width: auto; }

/* Item cards: a landscape box of about 16:10 with the portrait cover left and the item's details right. */
.mi-shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mi-shop-card { display: grid; grid-template: "cover body" 1fr "cover buy" auto / minmax(0, 38%) minmax(0, 1fr); min-width: 0; min-height: 290px; border: 1px solid var(--line); background: var(--surface); }
.mi-shop-card-cover { grid-area: cover; display: grid; place-items: center; padding: 16px; background: var(--surface-soft); }
.mi-shop-card-cover img { display: block; width: 100%; height: auto; max-height: 258px; aspect-ratio: 210 / 297; object-fit: contain; }
.mi-shop-card-cover .mi-shop-image-placeholder { width: 100%; height: auto; margin: 0; aspect-ratio: 210 / 297; background: var(--surface); }
.mi-shop-card-body { grid-area: body; display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 8px; }
.mi-shop-card h2 { margin: 8px 0; font: 700 19px/1.3 Manrope, sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
.mi-shop-card h2 a { color: var(--ink); text-decoration: none; }
.mi-shop-card h2 a:hover { color: var(--link-ink); }
.mi-shop-card .mi-shop-teaser { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.mi-shop-card-price { margin-top: auto; }
.mi-shop-card-buy { grid-area: buy; padding: 0 20px 20px; }
.mi-shop-card-buy .mi-shop-button { width: 100%; }
.mi-shop-image-placeholder { display: grid; place-items: center; width: 100%; height: 200px; background: var(--surface-soft); }
.mi-shop .mi-shop-image-placeholder img, #main-content .mi-shop .mi-shop-image-placeholder img { width: 46%; max-width: 110px; height: auto; max-height: none; margin: 0; aspect-ratio: auto; background: transparent; }
.mi-shop-teaser { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.mi-shop-price { margin: 12px 0 0; font: 700 23px/1.4 Manrope, sans-serif; letter-spacing: -.04em; }
/* The site's paragraph size would win over a single class, hence the longer selector. */
.mi-shop .mi-shop-price-note, #main-content .mi-shop .mi-shop-price-note { margin: 2px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mi-shop-edition-prices { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline; margin: 12px 0 0; }
.mi-shop-edition-prices dt { color: var(--muted); font-size: 13px; }
.mi-shop-edition-prices dd { margin: 0; font: 700 19px/1.4 Manrope, sans-serif; letter-spacing: -.04em; }
.mi-shop-price-unit { margin-left: 6px; color: var(--muted); font: 400 14px "DM Sans", sans-serif; letter-spacing: 0; }

.mi-shop-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.mi-shop-pagination ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mi-shop-pagination :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.mi-shop-pagination [aria-current="page"] { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--accent-on); font-weight: 700; }
.mi-shop-pagination [aria-disabled="true"] { color: var(--muted); opacity: .6; }
.mi-shop-pagination a:hover { border-color: var(--accent); color: var(--link-ink); }

/* Item detail: one box with the cover and the order form on top and the description below. */
.mi-shop-detail { padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.mi-shop-detail-top { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; gap: 36px; }
.mi-shop-gallery, .mi-shop-detail-copy { min-width: 0; }
.mi-shop-detail h1 { margin: 8px 0 10px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.045em; }
/* The site sizes content images by their own width; the cover keeps to its column here. */
.mi-shop .mi-shop-main-image, #main-content .mi-shop .mi-shop-main-image { display: block; width: 100%; height: auto; max-height: 460px; margin: 0; background: var(--surface-soft); object-fit: contain; }
.mi-shop-gallery .mi-shop-image-placeholder { height: auto; aspect-ratio: 210 / 297; }
.mi-shop-thumbnails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.mi-shop .mi-shop-thumbnails img, #main-content .mi-shop .mi-shop-thumbnails img { display: block; width: 100%; height: 76px; margin: 0; background: var(--surface-soft); object-fit: contain; }
.mi-shop-detail .mi-shop-teaser { font-size: 16px; }
.mi-shop-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mi-shop-tags li { padding: 5px 8px; border: 1px solid var(--line); font-size: 12px; }
.mi-shop-description { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.mi-shop-description > * { max-width: 760px; }
.mi-shop-description h2, .mi-shop-summary h2, .mi-shop-delivery h2 { margin: 0 0 12px; font: 700 20px/1.3 Manrope, sans-serif; letter-spacing: -.035em; }
.mi-shop .mi-shop-description p, #main-content .mi-shop .mi-shop-description p { margin: 0 0 12px; font-size: 15px; line-height: 1.7; }
.mi-shop-description :is(ul, ol) { margin: 0 0 12px; padding-left: 22px; }
.mi-shop-description li { margin-bottom: 4px; }
.mi-shop-description a { color: var(--link-ink); }

/* Form controls */
.mi-shop-field { display: grid; gap: 7px; min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.mi-shop-field > label, .mi-shop-field > legend { padding: 0; font-size: 14px; font-weight: 700; }
.mi-shop-optional { color: var(--muted); font-weight: 400; }
.mi-shop :is(input:not([type="checkbox"], [type="radio"]), select) { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--control-line); border-radius: 0; background: var(--surface); color: var(--ink); font: 400 15px "DM Sans", sans-serif; }
.mi-shop .has-error :is(input, select), .mi-shop [aria-invalid="true"] { border-color: var(--error-ink); }
.mi-shop .mi-form-error, #main-content .mi-shop .mi-form-error { margin: 0; font-size: 13px; line-height: 1.5; }
.mi-shop-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 400; line-height: 1.5; }
.mi-shop-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.mi-shop-check a { color: var(--link-ink); }
.mi-shop-order-form { margin: 20px 0; padding-top: 20px; border-top: 1px solid var(--line); }
/* A choice between two options as cards in one row; the radio button itself is only visually hidden. */
.mi-shop-choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mi-shop-choice-card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 12px; border: 1px solid var(--control-line); background: var(--surface); text-align: center; cursor: pointer; }
.mi-shop-choice-card input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.mi-shop-choice-card svg { color: var(--muted); }
.mi-shop-choice-card:has(input:checked) svg { color: var(--link-ink); }
.mi-shop-choice-card strong { font-size: 15px; }
.mi-shop-choice-card span { color: var(--muted); font-size: 13px; }
.mi-shop-choice-card:hover { border-color: var(--accent); }
.mi-shop-choice-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mi-shop-choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Item page: quantity, order button and removal in one row. */
.mi-shop-buy-row { display: flex; align-items: stretch; gap: 10px; }
.mi-shop-buy-row .mi-shop-stepper { flex: 0 0 auto; height: 49px; }
.mi-shop-buy-row .mi-shop-button { flex: 1 1 auto; width: auto; min-width: 0; }
.mi-pagepackage .mi-shop .mi-shop-buy-row .mi-shop-remove, .mi-shop .mi-shop-buy-row .mi-shop-remove { flex: 0 0 auto; width: 49px; height: 49px; border-color: var(--line); background: var(--surface); }
.mi-shop-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.mi-shop-field-row--postcode { grid-template-columns: minmax(0, 150px) minmax(0, 1fr); }

/* Cart and checkout: content beside the order summary */
.mi-shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: start; gap: 24px; }
.mi-shop-lines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mi-shop-line { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mi-shop-line-image { width: 80px; height: 80px; margin: 0; background: var(--surface-soft); object-fit: contain; }
.mi-shop-line h2 { margin: 0 0 4px; font: 700 17px/1.35 Manrope, sans-serif; letter-spacing: -.03em; overflow-wrap: anywhere; }
.mi-shop-line h2 a { color: var(--ink); text-decoration: none; }
.mi-shop-line h2 a:hover { color: var(--link-ink); }
.mi-shop-line-options { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mi-shop-line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.mi-shop-line-total { display: grid; justify-items: end; gap: 2px; margin: 0 0 0 auto; white-space: nowrap; }
.mi-shop-line-total strong { font: 700 17px Manrope, sans-serif; }
.mi-shop-line-total span { color: var(--muted); font-size: 12px; line-height: 1.4; }
/* Quantity: minus, number, plus as one control. Each button posts the new quantity, so it works without script. */
.mi-shop-stepper { display: inline-flex; height: 44px; border: 1px solid var(--control-line); background: var(--surface); }
/* The longer selector outranks the site's button padding, which pushed the icons off centre. */
.mi-pagepackage .mi-shop .mi-shop-stepper button, .mi-shop .mi-shop-stepper button { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 0; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); line-height: 0; cursor: pointer; }
.mi-shop-stepper button svg { display: block; flex: 0 0 auto; }
.mi-shop-stepper button:hover:not(:disabled) { background: var(--surface-soft); color: var(--link-ink); }
.mi-shop-stepper button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.mi-pagepackage .mi-shop .mi-shop-stepper input[type="number"], .mi-shop .mi-shop-stepper input { width: 46px; min-height: 0; height: 100%; padding: 0 2px; border: 0; border-inline: 1px solid var(--line); font-weight: 700; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.mi-shop-stepper input::-webkit-outer-spin-button, .mi-shop-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.mi-shop-stepper .mi-shop-stepper-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mi-pagepackage .mi-shop .mi-shop-remove, .mi-shop .mi-shop-remove { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 0; height: 44px; min-height: 0; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--error-ink); line-height: 0; cursor: pointer; }
.mi-shop-remove svg { display: block; flex: 0 0 auto; }
.mi-pagepackage .mi-shop .mi-shop-remove:hover, .mi-shop .mi-shop-remove:hover { border-color: var(--error-ink); background: var(--error-surface); }
.mi-shop-aside { display: grid; gap: 12px; min-width: 0; }
.mi-shop-cart-actions { display: grid; gap: 8px; }
.mi-shop-cart-actions .mi-shop-button { width: 100%; }
.mi-shop-summary { min-width: 0; padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.mi-shop-summary--wide { max-width: 640px; margin-bottom: 24px; }
.mi-shop-summary-lines { margin: 0 0 12px; padding: 0; list-style: none; font-size: 14px; }
.mi-shop-summary-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.mi-shop-summary-lines .mi-shop-line-options { grid-column: 1 / -1; }
.mi-shop-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 0 0 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.mi-shop-totals--narrow { max-width: 420px; margin-bottom: 24px; }
.mi-shop-totals dd { margin: 0; text-align: right; white-space: nowrap; }
.mi-shop-totals-sum { padding-top: 8px; border-top: 1px solid var(--line); font: 700 18px Manrope, sans-serif; }

.mi-shop-checkout fieldset { min-width: 0; margin: 0 0 28px; padding: 0; border: 0; }
.mi-shop-checkout legend { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 18px; padding: 0 0 12px; border-bottom: 1px solid var(--line); font: 700 21px/1.3 Manrope, sans-serif; letter-spacing: -.035em; }
.mi-shop-checkout legend span { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; background: var(--surface-soft); color: var(--link-ink); font: 800 13px "DM Sans", sans-serif; letter-spacing: 0; }
.mi-shop-delivery { margin: 8px 0 0; padding: 16px; background: var(--surface-soft); }
.mi-shop-payment { padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.mi-shop-payment:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mi-shop-payment span { color: var(--muted); }
.mi-shop-payment strong { color: var(--ink); }

/* The bar at the lower edge of phones and tablets: the cart and the checkout stay one tap away.
   It sticks to the viewport while the shop is on screen and leaves with it, so it never covers the footer. */
.mi-shop-cartbar { display: none; }

@media (max-width: 1150px) {
	.mi-shop-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1050px) {
	.mi-shop-detail-top { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px; }
	.mi-shop-layout { grid-template-columns: minmax(0, 1fr); }
	/* What is being ordered comes before the form that orders it. */
	.mi-shop-checkout + .mi-shop-summary { order: -1; }
}
@media (max-width: 900px) {
	.mi-shop-browse { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.mi-shop-sidebar { display: none; }
	.mi-shop-picker { display: block; }
	.mi-shop-search { margin-bottom: 12px; }
	.mi-shop-heading { padding-bottom: 20px; }
	.mi-shop-heading--plain { margin-bottom: 20px; }
	.mi-shop-back { margin-top: 0; }
	/* 16px keeps phones from zooming into a focused field. */
	.mi-shop :is(input:not([type="checkbox"], [type="radio"]), select) { font-size: 16px; }

	/* Compact cards: a small cover, the essentials, and a button as wide as the card. */
	.mi-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.mi-shop-card { grid-template: "cover body" 1fr "buy buy" auto / 104px minmax(0, 1fr); min-height: 0; }
	.mi-shop-card-cover { align-self: start; padding: 12px 0 12px 12px; background: transparent; }
	.mi-shop-card-cover img { max-height: none; background: var(--surface-soft); }
	.mi-shop-card-body { padding: 12px 14px 4px; }
	.mi-shop-card h2 { margin: 4px 0 6px; font-size: 16px; }
	.mi-shop-card .mi-shop-teaser { margin-bottom: 4px; font-size: 13px; -webkit-line-clamp: 2; line-clamp: 2; }
	.mi-shop-card .mi-shop-price { margin-top: 6px; }
	.mi-shop .mi-shop-card .mi-shop-price-note, #main-content .mi-shop .mi-shop-card .mi-shop-price-note { margin-bottom: 8px; }
	.mi-shop-card-buy { padding: 0 12px 12px; }
	.mi-shop-card-buy .mi-shop-button { min-height: 46px; }
	.mi-shop-about { padding: 14px; }

	.mi-shop-cartbar { position: sticky; z-index: 5; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border: 1px solid var(--line); background: var(--surface); }
	.mi-shop-cartbar .mi-shop-button { flex: 0 0 auto; width: auto; min-width: 132px; }
	.mi-shop-cartbar-cart { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
	.mi-shop-cartbar-cart svg { flex: 0 0 auto; }
	.mi-shop-cartbar p { display: grid; margin: 0; font-size: 13px; line-height: 1.3; }
	.mi-shop-cartbar p span { color: var(--muted); }
	.mi-shop-cartbar p strong { font: 700 18px Manrope, sans-serif; }
}
@media (max-width: 767px) {
	.mi-shop-detail { padding: 16px; }
	/* On a phone the cover is a compact picture above the form, not a full screen of its own. */
	.mi-shop-detail-top { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.mi-shop-gallery { display: grid; justify-items: center; }
	.mi-shop .mi-shop-main-image, #main-content .mi-shop .mi-shop-main-image { width: auto; max-width: 100%; max-height: 240px; }
	.mi-shop-thumbnails { width: 100%; }
	.mi-shop-description { margin-top: 20px; padding-top: 20px; }
}
@media (max-width: 600px) {
	.mi-shop-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.mi-shop-intro { font-size: 16px; }
	.mi-shop-search button { min-width: 0; padding: 0 14px; }
	/* On phones the image sits above the text, so the text gets the full width of the box. */
	.mi-shop-about { flex-direction: column; gap: 12px; }
	.mi-shop-about img { width: 96px; }
	.mi-shop-field-row:not(.mi-shop-field-row--postcode) { grid-template-columns: minmax(0, 1fr); }
	.mi-shop-field-row--postcode { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); }
	.mi-shop-line { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
	.mi-shop-line-image { width: 64px; height: 64px; }
	.mi-shop-summary { padding: 14px; }
	.mi-shop-checkout legend { font-size: 19px; }
}
