/* // The page and product menus share the archive's brass thumb and dark track. */
:root {
    --archive-scroll-track: #191713;
    --archive-scroll-thumb: #a78a59;
    --archive-scroll-hover: #d7b77d;
}
* { scrollbar-width: thin; scrollbar-color: var(--archive-scroll-thumb) var(--archive-scroll-track); }
html { scrollbar-width: auto; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar { width: 14px; }
*::-webkit-scrollbar-track { background: var(--archive-scroll-track); }
*::-webkit-scrollbar-thumb { min-height: 36px; border: 3px solid var(--archive-scroll-track); border-radius: 12px; background: var(--archive-scroll-thumb); }
*::-webkit-scrollbar-thumb:hover { background: var(--archive-scroll-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--gold); }
*::-webkit-scrollbar-corner { background: var(--archive-scroll-track); }
*::-webkit-scrollbar-button { display: none; }
@supports selector(::-webkit-scrollbar) {
    html, .archive-select-menu { scrollbar-width: auto; scrollbar-color: auto; }
}

.archive-select { min-width: 0; }
.archive-select-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #5c5345;
    border-radius: 2px;
    background: #29251e;
    color: var(--paper);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}
.archive-select-trigger:hover:not(:disabled), .archive-select-trigger[aria-expanded="true"] { border-color: var(--gold); }
.archive-select-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.material-copy .archive-select-trigger:disabled { background: #25211a; border-color: #443d32; color: #b8ae9e; opacity: .75; cursor: default; }
.archive-select-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; min-width: 0; }
.archive-select-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-select-label small { font-size: 10px; color: #afa18a; }
.archive-select-price { flex-shrink: 0; color: #dac398; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.archive-select-chevron { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.archive-select-trigger[aria-expanded="true"] .archive-select-chevron { transform: rotate(180deg); }

/* // A top-layer menu can scroll without being clipped by the product card. */
.archive-select-menu {
    display: none;
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 5px;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #756247;
    border-radius: 3px;
    background: #211e18;
    color: var(--paper);
    box-shadow: 0 12px 28px #0007;
    font: inherit;
    font-size: 12px;
    color-scheme: dark;
    box-sizing: border-box;
}
.archive-select-menu:popover-open { display: block; }
.archive-select-menu .archive-select-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.archive-select-option-copy { display: grid; gap: 3px; min-width: 0; }
.archive-select-option-copy small { font-size: 10px; color: #afa18a; }
.archive-select-option[aria-selected="true"] { background: #c5a46d18; }
.archive-select-option:hover, .archive-select-option:focus-visible { background: #3a3023; }
.archive-select-option:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
.archive-select-check { grid-column: 3; width: 16px; height: 16px; visibility: hidden; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.archive-select-option[aria-selected="true"] .archive-select-check { visibility: visible; }

select:not([multiple]):not([size]), select[size="1"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c5a46d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 16px !important;
    padding-right: 38px !important;
}

.admin-shell select, .placement-controls select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23625a4d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
details:not(.material-customize):not(.shop-more) > summary::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 12px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(-45deg);
}
details[open]:not(.material-customize):not(.shop-more) > summary::before {
    transform: translateY(-2px) rotate(45deg);
}
summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

input[type="number"] { -webkit-appearance: none; -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.number-stepper { display: inline-flex; align-items: stretch; gap: 4px; min-width: 0; vertical-align: middle; }
.number-stepper > input { min-width: 0; flex: 1; }
.admin-shell .number-stepper { display: flex; width: 100%; }
.number-stepper > button.number-step {
    -webkit-appearance: none;
    appearance: none;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid #635b4e;
    border-radius: 3px;
    background: #24211c;
    color: #dfc393;
    font: 20px/1 sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}
.admin-shell .number-stepper > button.number-step { background: #fffdf7; border-color: #d3ccbd; color: #625a4d; }
.number-stepper > button.number-step:hover { border-color: var(--gold); }
.number-stepper > button.number-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.number-stepper > button.number-step:disabled { opacity: .45; cursor: default; }
.admin-margin-field > span:not(.number-stepper) { right: 100px; }
