/* "Vintage" theme — Mac OS 9 "Platinum".
   Pinstriped title bars with close / zoom / windowshade boxes, bevelled push buttons with the thick default ring, popup-menu
   selects, Platinum scrollbars, a menu bar with a clock, Finder-style lists and alert dialogs, on a dithered desktop.
   Only the front window is striped: cards and the sidebar are "inactive" (flat) until you point at them, like the real thing.
   No webfonts, no raster images: CSS + inline SVG only, so it loads instantly and works offline. */

:root {
    --desk-a: #6a79a6;
    --desk-b: #7684b1;
    --plat: #dddddd;
    --plat-lt: #eeeeee;
    --white: #ffffff;
    --shade: #999999;
    --dark: #555555;
    --ink: #000000;
    --hi: #a3afdc;            /* selection highlight (OS 9 lavender-blue), used with black text */
    --link: #1c3f9e;
    --ok: #1b7a32;
    --warn: #b54a00;
    --err: #b3261e;
    --mono: "Monaco", "Menlo", "Andale Mono", "DejaVu Sans Mono", "Courier New", monospace;
    --ui: "Charcoal", "Chicago", "Lucida Grande", "Geneva", "Lucida Sans Unicode", "DejaVu Sans", Verdana, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #a9a9a9 #ececec; }
body {
    margin: 0; color: var(--ink); font: 13px/1.45 var(--ui);
    background-color: var(--desk-a);
    background-image: repeating-conic-gradient(var(--desk-b) 0% 25%, var(--desk-a) 0% 50%);
    background-size: 4px 4px;
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--link); }
a:hover { background: var(--hi); color: #000; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.mono { font-family: var(--mono); }
.muted { color: #555; }
.small { font-size: 11px; }
.sr { position: absolute; left: -9999px; }

/* ---- Scrollbars (Platinum: dithered track, bevelled thumb) ---- */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background-color: #fff; background-image: repeating-conic-gradient(#fff 0% 25%, #d4d4d4 0% 50%); background-size: 2px 2px; border-left: 1px solid #000; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #fff, #d2d2d2 55%, #a8a8a8); border: 1px solid #000; box-shadow: inset 1px 1px 0 #fff; }
::-webkit-scrollbar-corner { background: #ddd; }
::-webkit-scrollbar-button { display: none; }

/* ---- Menu bar ---- */
.menubar {
    background: linear-gradient(#fff 0, #fff 1px, #ececec 1px, #d3d3d3 100%); border-bottom: 1px solid #000; box-shadow: 0 1px 0 rgba(0,0,0,.3);
    position: sticky; top: 0; z-index: 20; font-size: 12px;
}
.menubar-in { max-width: 1120px; margin: 0 auto; padding: 0 10px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-height: 24px; }
.menubar a, .menubar summary { color: var(--ink); text-decoration: none; padding: 3px 9px; display: inline-block; cursor: default; list-style: none; }
.menubar summary::-webkit-details-marker { display: none; }
.menubar a:hover, .menubar summary:hover, .menubar details[open] > summary { background: #000; color: #fff; }
.brand { font-weight: bold; display: flex !important; align-items: center; gap: 7px; padding-left: 0 !important; }
.brand svg { width: 18px; height: 18px; image-rendering: pixelated; }
.menubar .spacer { flex: 1; }
.menu { position: relative; }
.menu-list { position: absolute; top: 100%; left: 0; background: var(--plat); border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0,0,0,.45), inset 1px 1px 0 #fff; min-width: 230px; padding: 2px 0; max-height: 70vh; overflow: auto; }
.menu-list a { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 2px 14px; }
.menu-list hr { border: 0; border-top: 1px solid #888; border-bottom: 1px solid #fff; margin: 3px 0; }
.search { display: flex; gap: 4px; align-items: center; }
.search input { width: 140px; padding: 1px 6px; font-size: 12px; }
.cartlink b { font-family: var(--mono); font-size: 11px; background: #000; color: #fff; padding: 0 6px; margin-left: 4px; border-radius: 8px; }
.clock { padding: 3px 10px 3px 8px; font-size: 12px; white-space: nowrap; cursor: default; }
.menubar a:hover b { background: #fff; color: #000; }

/* ---- Page frame ---- */
.desktop { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 22px 12px 34px; }
.cols { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack > * + * { margin-top: 20px; }
@media (max-width: 820px) { .cols, .cols-2 { grid-template-columns: 1fr; } }

/* ---- Windows ---- */
.win { position: relative; background: var(--plat); border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0,0,0,.4), inset 1px 1px 0 #fff, inset -1px -1px 0 var(--shade); }
.win-title {
    position: relative; margin: 3px 3px 0; height: 20px; display: flex; align-items: center;
    background: repeating-linear-gradient(#fff 0 1px, #c4c4c4 1px 2px);
    border: 1px solid; border-color: #fff #777 #777 #fff; cursor: default;
}
/* close box (left) */
.win-title::before { content: ""; position: absolute; left: 5px; top: 50%; margin-top: -6.5px; width: 13px; height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Crect width='13' height='13' fill='%23000'/%3E%3Crect x='1' y='1' width='11' height='11' fill='%23ddd'/%3E%3Cpath d='M1 1h10v1H2v9H1z' fill='%23fff'/%3E%3Cpath d='M11 2h1v10H2v-1h9z' fill='%23888'/%3E%3C/svg%3E") no-repeat; }
/* zoom + windowshade boxes (right) */
.win-title::after { content: ""; position: absolute; right: 5px; top: 50%; margin-top: -6.5px; width: 32px; height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 13' shape-rendering='crispEdges'%3E%3Crect width='13' height='13' fill='%23000'/%3E%3Crect x='1' y='1' width='11' height='11' fill='%23ddd'/%3E%3Cpath d='M1 1h10v1H2v9H1z' fill='%23fff'/%3E%3Cpath d='M11 2h1v10H2v-1h9z' fill='%23888'/%3E%3Crect x='3.5' y='3.5' width='6' height='6' fill='none' stroke='%23000'/%3E%3Crect x='19' width='13' height='13' fill='%23000'/%3E%3Crect x='20' y='1' width='11' height='11' fill='%23ddd'/%3E%3Cpath d='M20 1h10v1h-9v9h-1z' fill='%23fff'/%3E%3Cpath d='M30 2h1v10H21v-1h9z' fill='%23888'/%3E%3Cpath d='M22 6h7v1h-7z' fill='%23000'/%3E%3C/svg%3E") no-repeat; }
.win-title h2, .win-title h1, .win-title .t {
    /* One fixed-height label for every kind of title, centred, with the window grey behind it so the stripes stop around the text. */
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-sizing: border-box;
    height: 16px; line-height: 16px; margin: 0; padding: 0 12px; background: var(--plat);
    font-size: 12px; font-weight: bold; white-space: nowrap; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; }
.win-body { margin: 2px 3px 3px; padding: 12px; background: var(--plat); }
.win-body.paper { background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; margin: 2px 6px 6px; }
.win-status { border-top: 1px solid #777; box-shadow: 0 -1px 0 #fff; padding: 3px 10px; font-size: 11px; background: var(--plat); display: flex; justify-content: space-between; gap: 10px; margin: 0 3px 3px; }
/* grow box in the bottom-right corner */
.win::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; pointer-events: none;
    background: repeating-linear-gradient(135deg, transparent 0 3px, #888 3px 4px, #fff 4px 5px); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
/* windowshade: click the right-hand box (or double-click the title bar) */
.win.shaded > :not(.win-title) { display: none; }
.win.shaded::after { display: none; }
/* inactive windows (cards, sidebar): flat title, no boxes, grey label — they wake up under the pointer */
.card > .win-title, aside.win > .win-title { background: var(--plat); border-color: #f4f4f4 #aaa #aaa #f4f4f4; }
.card > .win-title::before, .card > .win-title::after, aside.win > .win-title::before, aside.win > .win-title::after { display: none; }
.card > .win-title .t, aside.win > .win-title h2 { color: #6a6a6a; background: transparent; }
.card:hover > .win-title, .card:focus-within > .win-title, aside.win:hover > .win-title { background: repeating-linear-gradient(#fff 0 1px, #c4c4c4 1px 2px); border-color: #fff #777 #777 #fff; }
aside.win:hover > .win-title::before, aside.win:hover > .win-title::after { display: block; }   /* cards only get stripes, so long names keep the full width */
.card > .win-title .t { max-width: calc(100% - 12px); }
.card:hover > .win-title .t, .card:focus-within > .win-title .t, aside.win:hover > .win-title h2 { color: #000; background: var(--plat); }

/* Finder-style info strip under a window's title bar */
.infobar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 3px; padding: 2px 10px; font-size: 11px; color: #222;
    background: linear-gradient(#efefef, #d9d9d9); border: 1px solid; border-color: #fff #777 #777 #fff; }

/* ---- Controls ---- */
.btn, button.btn {
    font: inherit; font-size: 12px; line-height: 1.2; color: var(--ink); text-decoration: none; display: inline-block; cursor: pointer; padding: 4px 14px 5px; min-height: 22px; text-align: center;
    background: linear-gradient(#fdfdfd, #e2e2e2 50%, #cacaca); border: 1px solid #000; border-radius: 6px;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7d7d7d, 1px 1px 0 rgba(0,0,0,.25);
}
.btn:hover { background: linear-gradient(#fff, #ececec 50%, #d4d4d4); color: var(--ink); }
.btn:active { background: linear-gradient(#9a9a9a, #b9b9b9); box-shadow: inset 1px 1px 0 #555, inset -1px -1px 0 #ddd; }
.btn.default { margin: 4px; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7d7d7d, 0 0 0 1px var(--plat), 0 0 0 4px #000; }
.btn[disabled], .btn.off { color: #888; border-color: #777; cursor: not-allowed; box-shadow: none; background: #d4d4d4; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.link { background: none; border: 0; box-shadow: none; text-decoration: underline; color: var(--link); padding: 0; min-height: 0; border-radius: 0; }
.btn.link:active { background: none; box-shadow: none; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], select, textarea {
    font: inherit; font-size: 12px; color: var(--ink); background: #fff; border: 1px solid #000; box-shadow: inset 1px 1px 0 #777, inset 2px 2px 0 #ddd; padding: 3px 6px; border-radius: 0; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #6d7fc0; outline-offset: 1px; }
input[type=number] { width: 4.5em; font-family: var(--mono); }
textarea { width: 100%; min-height: 80px; resize: vertical; }
/* popup-menu select */
select { -webkit-appearance: none; appearance: none; padding-right: 26px; cursor: pointer; border-radius: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14' shape-rendering='crispEdges'%3E%3Cpath d='M5 1 1 6h8zM5 13 1 8h8z' fill='%23000'/%3E%3C/svg%3E") no-repeat right 8px center / 8px 11px,
        linear-gradient(#fdfdfd, #e2e2e2 50%, #cacaca);
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7d7d7d, 1px 1px 0 rgba(0,0,0,.25); }
/* checkboxes + radio buttons */
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin: 0 6px 0 0; vertical-align: -3px; background: #fff; border: 1px solid #000;
    box-shadow: inset 1px 1px 0 #777; flex: none; cursor: pointer; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h2v1h1v1h2V3h1V2h2v2H9v1H8v2h1v1h1v2H8V9H7V8H5v1H4v1H2V8h1V7h1V5H3V4H2z' fill='%23000'/%3E%3C/svg%3E") center/10px no-repeat; }
input[type=radio]:checked { background: radial-gradient(#000 0 3px, #fff 3.5px); }
label { display: block; font-weight: bold; margin-bottom: 2px; }
.field { margin-bottom: 12px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field select { width: 100%; }
.field-err { color: var(--err); font-size: 11px; margin-top: 2px; }
.field-err::before { content: "\26A0\FE0E  "; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 12px; }
@media (max-width: 560px) { .row, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---- Alerts: Platinum dialog boxes with the classic icons ---- */
.alert {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%23000'/%3E%3Ccircle cx='16' cy='16' r='13' fill='%234f6fc4'/%3E%3Cellipse cx='12' cy='10' rx='7' ry='4' fill='%23fff' opacity='.35'/%3E%3Cpath d='M14 13h4v10h-4zM14 8h4v3h-4z' fill='%23fff'/%3E%3C/svg%3E");
    position: relative; background: var(--plat); border: 1px solid #000; box-shadow: 2px 2px 0 rgba(0,0,0,.4), inset 1px 1px 0 #fff, inset -1px -1px 0 #888, inset 0 0 0 4px var(--plat), inset 0 0 0 5px #888;
    padding: 14px 16px 14px 64px; min-height: 58px; margin-bottom: 16px;
}
.alert::before { content: ""; position: absolute; left: 18px; top: 13px; width: 32px; height: 32px; background: var(--icon) center/contain no-repeat; }
.alert.error { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 30 28H2z' fill='%23000'/%3E%3Cpath d='M16 5 27.5 26.5h-23z' fill='%23f6d628'/%3E%3Cpath d='M14.5 11h3v8h-3zM14.5 21h3v3h-3z' fill='%23000'/%3E%3C/svg%3E"); }
.alert.ok { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%23000'/%3E%3Ccircle cx='16' cy='16' r='13' fill='%2330a14e'/%3E%3Cellipse cx='12' cy='10' rx='7' ry='4' fill='%23fff' opacity='.35'/%3E%3Cpath d='M8 16l3-3 4 4 7-8 3 3-10 11z' fill='%23fff'/%3E%3C/svg%3E"); }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.hero h1 { font-size: 1.8rem; }
.hero .mac { width: 128px; height: 128px; image-rendering: pixelated; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } .hero .mac { display: none; } }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* ---- Finder-style list (categories) ---- */
.finder { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; }
.finder li a { display: flex; align-items: center; gap: 8px; padding: 2px 8px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #ececec; }
.finder li a:hover, .finder li a.on { background: var(--hi); color: #000; }
.finder .n { margin-left: auto; font-family: var(--mono); font-size: 11px; opacity: .7; }
.finder li a::before { content: ""; width: 16px; height: 13px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M0 1h6l1 1h9v11H0z'/%3E%3Cpath fill='%23b9c5e6' d='M1 2h5l1 1h8v9H1z'/%3E%3Cpath fill='%23e6ebf8' d='M1 4h14v1H1z'/%3E%3Cpath fill='%238c9bc8' d='M1 11h14v1H1z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---- Product grid + cards ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; }
.card .win-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .pic { display: block; background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; aspect-ratio: 1 / 1; overflow: hidden; }
.card .name { font-weight: bold; text-decoration: none; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .name:hover { background: none; color: var(--link); text-decoration: underline; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 8px; }
.price { font-family: var(--mono); font-weight: bold; font-size: 1.05rem; }
.price s { font-weight: normal; color: #777; margin-right: 6px; font-size: .9em; }
.tag { font-family: var(--mono); font-size: 11px; padding: 0 6px; border: 1px solid #000; background: #fff; display: inline-block; }
.tag.out { background: #000; color: #fff; } .tag.low { background: #ffd9a8; }
.noimg { display: grid; place-items: center; height: 100%; color: #999; font-family: var(--mono); font-size: 12px;
    background: repeating-linear-gradient(45deg, #f2f2f2 0 6px, #fff 6px 12px); }

/* ---- Product page ---- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } }
.buy { background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; padding: 12px; margin: 14px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.buy .price { font-size: 1.5rem; }
.prose h2, .prose h3, .prose h4 { margin: 1em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 .8em; }
.prose table { border-collapse: collapse; margin-bottom: .8em; } .prose td, .prose th { border: 1px solid #999; padding: 3px 8px; }
.crumbs { font-size: 11px; margin-bottom: 12px; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }
.crumbs a { color: #fff; } .crumbs a:hover { background: #fff; color: #000; text-shadow: none; }

/* ---- Tables (cart, orders): Finder list view ---- */
table.t { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #000; }
table.t th { background: linear-gradient(#f4f4f4, #cdcdcd); text-align: left; padding: 2px 8px; border-bottom: 1px solid #000; border-right: 1px solid #888; box-shadow: inset 1px 1px 0 #fff; font-size: 11px; }
table.t td { padding: 6px 8px; border-bottom: 1px solid #e4e4e4; vertical-align: middle; }
table.t tbody tr:hover td { background: #eceffb; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
table.t tfoot td { border-top: 1px solid #000; font-weight: bold; }
.thumb { width: 52px; height: 52px; border: 1px solid #000; background: #fff; box-shadow: inset 1px 1px 0 #999; }
.item { display: flex; gap: 10px; align-items: center; }

/* ---- Order status pills + steps ---- */
.status { font-family: var(--mono); font-size: 11px; text-transform: uppercase; border: 1px solid #000; border-radius: 3px; padding: 0 8px; background: #fff; }
.status.new { background: #fff3b0; } .status.invoiced { background: #cfe4ff; } .status.paid { background: #c8f0c8; }
.status.shipped, .status.completed { background: #c8f0c8; } .status.cancelled { background: #ddd; color: #555; text-decoration: line-through; }
.steps { display: flex; gap: 0; margin: 10px 0 16px; }
.steps div { flex: 1; text-align: center; font-size: 11px; padding: 6px 2px; border: 1px solid #000; margin-left: -1px; background: linear-gradient(#fdfdfd, #dcdcdc); }
.steps div.done { background: var(--hi); }
.steps div.cur { background: #fff3b0; font-weight: bold; }

/* ---- Pager (push buttons) ---- */
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.pager a, .pager span { min-width: 30px; text-align: center; padding: 2px 9px; border: 1px solid #000; border-radius: 6px; background: linear-gradient(#fdfdfd, #e2e2e2 50%, #cacaca);
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7d7d7d; text-decoration: none; color: var(--ink); font-size: 12px; }
.pager span.on { background: linear-gradient(#9a9a9a, #b9b9b9); box-shadow: inset 1px 1px 0 #555; }
.pager a:hover { background: linear-gradient(#fff, #ececec 50%, #d4d4d4); }

/* ---- Footer (Finder-style status strip) ---- */
.statusbar { background: linear-gradient(#efefef, #d6d6d6); border-top: 1px solid #000; box-shadow: inset 0 1px 0 #fff; font-size: 11px; }
.statusbar-in { max-width: 1120px; margin: 0 auto; padding: 5px 12px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.statusbar a { color: var(--ink); }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar form { display: flex; gap: 6px; align-items: center; }
.inline { display: inline; }

/* ---- Nested categories ---- */
.finder li a.d1 { padding-left: 24px; } .finder li a.d2 { padding-left: 40px; } .finder li a.d3 { padding-left: 56px; }
.finder li a.d1::before, .finder li a.d2::before, .finder li a.d3::before { transform: scale(.85); }
.subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; align-items: start; }
.subcats a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 54px; background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; padding: 8px; text-decoration: none; color: var(--ink); }
.subcats a:hover { background: var(--hi); color: #000; }
.subcats img { width: 100%; height: 90px; object-fit: contain; }
.cardh { margin: 0; font-size: inherit; line-height: inherit; }

/* ---- Images can never affect layout or spill out of their box ----
   Percentage heights on <img> inside auto-sized grid/flex boxes are resolved differently by Safari and Firefox (the image
   falls back to its full size and bleeds over whatever is below). So every picture is absolutely positioned inside a
   clipped, explicitly sized frame and fitted with object-fit. */
.gallery { min-width: 0; }
.gallery .main { position: relative; display: block; overflow: hidden; background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; aspect-ratio: 1 / 1; }
.gallery .main img, .gallery .main .noimg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs a { flex: 0 0 64px; width: 64px; height: 64px; position: relative; overflow: hidden; display: block; border: 1px solid #000; background: #fff; box-shadow: inset 1px 1px 0 #999; }
.thumbs a img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }
.thumbs a:hover { background: #fff; }
.thumbs a.on { outline: 2px solid #6d7fc0; outline-offset: 1px; }
.card .pic { position: relative; }
.card .pic img, .card .pic .noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb { position: relative; display: block; overflow: hidden; flex: 0 0 52px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }

/* ---- Product options (add-ons) ---- */
.opts { background: #fff; border: 1px solid; border-color: #777 #fff #fff #777; box-shadow: inset 1px 1px 0 #bbb; padding: 12px; margin: 14px 0 0; }
.opts .field { margin-bottom: 10px; } .opts .field:last-child { margin-bottom: 0; }
.opts select, .opts input[type=text] { width: 100%; max-width: 360px; }
.opts label.check { display: flex; align-items: flex-start; font-weight: normal; margin: 0; }
.opt-line { font-size: 11px; }

/* Orders split by seller */
.order-group { border: 2px solid currentColor; margin: 0 0 14px; padding: 0; background: rgba(255,255,255,.35); }
.order-group > .t { margin: 0; }
.order-group > p { margin: 8px; }
.order-group-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 10px; background: rgba(0,0,0,.12); border-bottom: 2px solid currentColor; }
.order-group-head.seller-line { border: 2px solid currentColor; margin-bottom: 12px; }
.og-num { font-weight: bold; text-transform: uppercase; font-size: .85em; }
.split-note { margin-bottom: 14px; }

/* Recommended products ("goes well with") */
.recs { margin-top: 18px; }
.rec-list { list-style: none; margin: 0 0 12px; padding: 0; }
.rec { display: grid; grid-template-columns: 24px 64px 1fr auto auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px dotted currentColor; }
.rec:last-child { border-bottom: 0; }
.rec-pick input { width: 18px; height: 18px; }
.rec-pic { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #fff; }
.rec-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rec-info a { font-weight: bold; }
.rec-info .small { display: block; }
.rec-price { white-space: nowrap; font-weight: bold; }
.rec-act:empty { display: none; }
@media (max-width: 620px) { .rec { grid-template-columns: 24px 56px 1fr; } .rec-price, .rec-act { grid-column: 3; } .rec-pic { width: 56px; height: 56px; } }

.backorder-note { margin: 10px 0; }
