@import url('https://fonts.bunny.net/css?family=instrument-sans:400,500,600');

/* ==========================================================================
   Application stylesheet
   This project has no Node/Vite build step, so this file is served directly
   from public/ and is the single place where CSS lives.
   The site is light mode only: there are deliberately no prefers-color-scheme
   rules here.
   ========================================================================== */

/* ==========================================================================
   Base
   ========================================================================== */

:root {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

    /* Opt out of the browser's dark mode for form controls and scrollbars. */
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    /* Reserves the scrollbar's width on every page, so pages whose content
       is short enough not to need one don't shift a few pixels wider than
       pages that do. */
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    line-height: 1.5;
}

h1,
h2,
h3,
p {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   Public site: header, sidebar, and page content
   ========================================================================== */

.site-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fdfdfc;
    color: #1b1b18;
    -webkit-font-smoothing: antialiased;
}

.site {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* Header ------------------------------------------------------------------ */

.site-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-header__images {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

.site-header__logo,
.site-header__photo {
    height: auto;
    max-width: 100%;
    border-radius: 0.375rem;
}

.site-header__logo {
    width: 388px;
    flex: 0 1 auto;
}

.site-header__photo {
    width: 667px;
    flex: 1 1 320px;
    min-width: 0;
    object-fit: cover;
}

/* Primary navigation ------------------------------------------------------ */

.site-nav {
    border-top: 1px solid #e3e3e0;
    border-bottom: 1px solid #e3e3e0;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0.625rem 0;
    list-style: none;
}

.site-nav__link {
    display: inline-block;
    padding: 0.25rem 0;
    color: #1b1b18;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    border-bottom-color: #1b1b18;
}

.site-nav__link[aria-current='page'] {
    border-bottom-color: #1b1b18;
}

/* Layout ------------------------------------------------------------------ */

.site-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem;
    flex: 1 1 auto;
}

.site-content {
    flex: 1 1 22rem;
    min-width: 0;
}

/* Sidebar -----------------------------------------------------------------
   Below 48em the category list collapses behind a toggle. The disclosure is
   pure CSS (a hidden checkbox driving a sibling panel) because the project has
   no build step and no JavaScript. Above 48em the checkbox and its chevron are
   hidden and the panel is always visible. */

.site-sidebar {
    flex: 0 1 15rem;
    min-width: 12rem;
    padding: 1.25rem;
    border: 1px solid #e3e3e0;
    border-radius: 0.5rem;
    background: #fff;
}

/* Visually hidden, but still focusable so the toggle works from the keyboard. */
.site-sidebar__toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.site-sidebar__title {
    font-size: 1rem;
    font-weight: 600;
}

.site-sidebar__toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
}

.site-sidebar__toggle-label::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #706f6c;
    border-bottom: 2px solid #706f6c;
    transform: translateY(-0.125rem) rotate(45deg);
    transition: transform 150ms ease;
}

.site-sidebar__toggle:checked ~ .site-sidebar__title .site-sidebar__toggle-label::after {
    transform: translateY(0.125rem) rotate(225deg);
}

.site-sidebar__toggle:focus-visible ~ .site-sidebar__title .site-sidebar__toggle-label {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.site-sidebar__panel {
    padding-top: 0.75rem;
}

.site-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-sidebar__link {
    color: #a07146;
    font-size: 0.9375rem;
    text-decoration: none;
}

.site-sidebar__link:hover,
.site-sidebar__link:focus-visible {
    text-decoration: underline;
}

.site-sidebar__link--active {
    font-weight: 600;
    text-decoration: underline;
}

.site-sidebar__empty {
    margin: 0;
    font-size: 0.9375rem;
    color: #706f6c;
}

@media (max-width: 47.99em) {
    .site-sidebar {
        flex: 1 1 100%;
    }

    .site-sidebar__toggle:not(:checked) ~ .site-sidebar__panel {
        display: none;
    }
}

@media (min-width: 48em) {
    .site-sidebar__toggle {
        display: none;
    }

    .site-sidebar__toggle-label {
        cursor: default;
    }

    .site-sidebar__toggle-label::after {
        content: none;
    }
}

/* Carousel -----------------------------------------------------------------
   The base markup is a horizontal scroll-snap strip, so it is swipeable and
   usable with no JavaScript at all. public/js/app.js adds the arrows, dots and
   autoplay, and marks the root with .carousel--enhanced. */

.carousel {
    position: relative;
    /* The slide images are 700px wide, so never stretch beyond their native size. */
    max-width: 700px;
    margin-bottom: 1.5rem;
}

.carousel__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.carousel__viewport:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.carousel--enhanced .carousel__viewport {
    scrollbar-width: none;
}

.carousel--enhanced .carousel__viewport::-webkit-scrollbar {
    display: none;
}

.carousel__track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.carousel__slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.carousel__image {
    width: 100%;
    aspect-ratio: 700 / 400;
    object-fit: cover;
}

.carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.carousel__arrow,
.carousel__play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e3e3e0;
    border-radius: 50%;
    background: #fff;
    color: #1b1b18;
    line-height: 1;
    cursor: pointer;
}

.carousel__arrow {
    font-size: 1.25rem;
}

.carousel__arrow:hover,
.carousel__play:hover {
    border-color: #1b1b18;
}

.carousel__arrow:focus-visible,
.carousel__play:focus-visible,
.carousel__dot:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

/* Pause glyph, swapped for a play triangle when the slideshow is stopped. */
.carousel__play::before {
    content: '';
    width: 0.5rem;
    height: 0.625rem;
    border-left: 3px solid currentcolor;
    border-right: 3px solid currentcolor;
}

.carousel--paused .carousel__play::before {
    width: 0;
    height: 0;
    border-left: 0.625rem solid currentcolor;
    border-right: 0;
    border-top: 0.375rem solid transparent;
    border-bottom: 0.375rem solid transparent;
    transform: translateX(0.125rem);
}

.carousel__dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel__dot {
    width: 0.625rem;
    height: 0.625rem;
    padding: 0;
    border: 1px solid #a3a29e;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.carousel__dot.is-active {
    border-color: #1b1b18;
    background: #1b1b18;
}

@media (prefers-reduced-motion: no-preference) {
    .carousel__viewport {
        scroll-behavior: smooth;
    }
}

/* Content ----------------------------------------------------------------- */

.page-title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.page-intro {
    margin: 0;
    max-width: 60ch;
    color: #706f6c;
}

.page-status {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    max-width: 34rem;
    border: 1px solid #c6e0c6;
    border-radius: 0.375rem;
    background: #f1f8f1;
    color: #2f5d2f;
}

/* Enquiry form -------------------------------------------------------------
   Shared by the contact page and the footer "Email us" dialog. */

.enquiry-form {
    margin-top: 1.5rem;
    max-width: 34rem;
}

.enquiry-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 0 1rem;
}

.enquiry-form__field label {
    font-size: 0.875rem;
    font-weight: 600;
}

.enquiry-form__field input,
.enquiry-form__field textarea {
    padding: 0.5rem 0.625rem;
    width: 100%;
    border: 1px solid #d4d4d1;
    border-radius: 0.375rem;
    background: #fff;
    color: #1b1b18;
}

.enquiry-form__field textarea {
    resize: vertical;
}

.enquiry-form__field input:focus-visible,
.enquiry-form__field textarea:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 1px;
}

.enquiry-form__field [aria-invalid='true'] {
    border-color: #b3261e;
}

.enquiry-form__error {
    font-size: 0.8125rem;
    color: #b3261e;
}

.enquiry-form__alert {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #f0c9c6;
    border-radius: 0.375rem;
    background: #fdf3f2;
    color: #b3261e;
}

/* The honeypot must stay in the layout for bots, but away from people. */
.enquiry-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.enquiry-form__actions {
    margin: 0;
}

.enquiry-form__submit {
    padding: 0.5rem 1.25rem;
    border: 1px solid #1b1b18;
    border-radius: 0.375rem;
    background: #1b1b18;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.enquiry-form__submit:hover {
    background: #000;
}

.enquiry-form__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.enquiry-form__submit:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

/* Enquiry dialog ---------------------------------------------------------- */

.enquiry-dialog {
    padding: 0;
    width: min(34rem, calc(100vw - 2rem));
    border: 1px solid #e3e3e0;
    border-radius: 0.5rem;
    background: #fff;
    color: #1b1b18;
}

.enquiry-dialog::backdrop {
    background: rgb(27 27 24 / 55%);
}

.enquiry-dialog__inner {
    padding: 1.25rem 1.5rem 1.5rem;
}

.enquiry-dialog__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.enquiry-dialog__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.enquiry-dialog__close {
    padding: 0 0.25rem;
    border: 0;
    background: none;
    color: #706f6c;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.enquiry-dialog__close:hover {
    color: #1b1b18;
}

.enquiry-dialog__close:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.enquiry-dialog .enquiry-form {
    margin-top: 1rem;
}

.enquiry-dialog__done {
    margin: 1.5rem 0 0;
    color: #2f5d2f;
}

.enquiry-dialog__done:focus-visible {
    outline: none;
}

/* Search form ------------------------------------------------------------- */

.search-form {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin: 1.25rem 0 1.5rem;
    max-width: 34rem;
}

.search-form__label {
    font-size: 0.875rem;
    font-weight: 600;
}

.search-form__row {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.625rem;
    border: 1px solid #d4d4d1;
    border-radius: 0.375rem;
    background: #fff;
    color: #1b1b18;
}

.search-form input:focus-visible,
.search-form__submit:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.search-form__submit {
    flex: 0 0 auto;
    padding: 0.5rem 1.25rem;
    border: 1px solid #1b1b18;
    border-radius: 0.375rem;
    background: #1b1b18;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.search-form__submit:hover {
    background: #000;
}

.search-form__error {
    color: #8a2b2b;
    font-size: 0.875rem;
}

/* Stock listing ------------------------------------------------------------
   Three columns like the old stock page: supporting thumbnails, the main
   photograph, then the written details. */

.stock-list {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.stock-item + .stock-item {
    margin-top: 1.5rem;
    border-top: 1px solid #e3e3e0;
    padding-top: 1.5rem;
}

.stock-item__inner {
    display: grid;
    grid-template-columns: 6.25rem 15.625rem minmax(0, 1fr);
    grid-template-areas: 'thumbs main detail';
    gap: 1.25rem;
    align-items: start;
}

.stock-item__thumbs {
    grid-area: thumbs;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stock-item__main {
    grid-area: main;
}

.stock-item__detail {
    grid-area: detail;
}

/* Photographs vary in shape, so each sits in a fixed box and is contained
   rather than cropped. That keeps rows aligned down the page. */
.stock-item__shot {
    display: block;
    border: 1px solid #e3e3e0;
    background: #fff;
}

.stock-item__shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stock-item__shot--main img {
    height: 15.625rem;
}

.stock-item__shot--thumb img {
    height: 6.25rem;
}

.stock-item__shot:hover {
    border-color: #b8b8b4;
}

.stock-item__shot:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.stock-item__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    font-style: italic;
    color: #a07146;
}

.stock-item__status {
    display: inline-block;
    margin: 0.5rem 0 0;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stock-item__status--reserved {
    background: #fdf1dc;
    color: #7a5312;
}

.stock-item__status--sold {
    background: #f6e0e0;
    color: #8a2b2b;
}

.stock-item__description {
    margin: 0.75rem 0 0;
    max-width: 60ch;
    color: #55554f;
}

.stock-item__spec {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.25rem 0.75rem;
    margin: 1rem 0 0;
    font-size: 0.9375rem;
}

.stock-item__spec dt {
    color: #706f6c;
}

.stock-item__spec dt::after {
    content: ':';
}

.stock-item__spec dd {
    margin: 0;
}

.stock-item__price {
    font-weight: 600;
}

.stock-item__actions {
    margin: 1rem 0 0;
    font-size: 0.9375rem;
}

/* Pager ------------------------------------------------------------------- */

.stock-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-top: 1.5rem;
}

.stock-list + .stock-pager {
    margin-top: 1.5rem;
    border-top: 1px solid #e3e3e0;
    padding-top: 1rem;
}

.stock-pager__count {
    margin: 0;
    color: #706f6c;
    font-size: 0.9375rem;
}

.stock-pager__links {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.stock-pager__link {
    color: #1b1b18;
    font-size: 0.9375rem;
}

@media (max-width: 47.99em) {
    .stock-item__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'main' 'thumbs' 'detail';
    }

    .stock-item__thumbs {
        flex-direction: row;
    }

    .stock-item__shot--thumb {
        flex: 0 0 6.25rem;
    }
}

/* Lightbox ---------------------------------------------------------------- */

.lightbox {
    padding: 0;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    border: 0;
    border-radius: 0.5rem;
    background: #fff;
    color: #1b1b18;
    overflow: visible;
}

.lightbox::backdrop {
    background: rgb(27 27 24 / 78%);
}

.lightbox__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
}

.lightbox__figure {
    margin: 0;
    min-width: 0;
}

.lightbox__image {
    max-width: min(60rem, calc(100vw - 9rem));
    max-height: calc(100vh - 8rem);
    width: auto;
    height: auto;
    margin: 0 auto;
}

.lightbox__caption {
    margin-top: 0.5rem;
    color: #706f6c;
    font-size: 0.875rem;
    text-align: center;
}

.lightbox__nav {
    flex: 0 0 auto;
    padding: 0 0.5rem;
    border: 0;
    background: none;
    color: #706f6c;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__nav:hover {
    color: #1b1b18;
}

/* The buttons are hidden for single-image items, which the display above
   would otherwise override. */
.lightbox__nav[hidden] {
    display: none;
}

.lightbox__close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e3e3e0;
    border-radius: 50%;
    background: #fff;
    color: #706f6c;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__close:hover {
    color: #1b1b18;
}

.lightbox__nav:focus-visible,
.lightbox__close:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

/* About page -------------------------------------------------------------- */

.about {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem;
}

.about__text {
    flex: 1 1 16rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    max-width: 44ch;
}

.about__gallery {
    flex: 1 1 18rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 0.5rem;
}

.about__photo-link {
    display: block;
    border-radius: 0.25rem;
    overflow: hidden;
}

.about__photo-link--wide {
    grid-column: 1 / -1;
}

.about__photo-link:focus-visible {
    outline: 2px solid #1b1b18;
    outline-offset: 2px;
}

.about__photo {
    width: 100%;
    transition: opacity 150ms ease;
}

.about__photo-link:hover .about__photo {
    opacity: 0.85;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid #e3e3e0;
    background: #f6f5f3;
    font-size: 0.875rem;
    color: #706f6c;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.75rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.site-footer__heading {
    margin: 0 0 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1b1b18;
}

.site-footer__address {
    font-style: normal;
    line-height: 1.7;
}

.site-footer__line {
    margin: 0 0 0.375rem;
}

.site-footer__link {
    color: #1b1b18;
    text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    text-decoration: underline;
}

.site-footer__hours {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 0.25rem 1rem;
    margin: 0;
}

.site-footer__hours dt {
    color: #1b1b18;
}

.site-footer__hours dd {
    margin: 0;
}

.site-footer__note {
    margin: 0.625rem 0 0;
    max-width: 30ch;
}

.site-footer__bar {
    border-top: 1px solid #e3e3e0;
}

.site-footer__bar p {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    font-size: 0.8125rem;
}

/* ==========================================================================
   Admin area
   ========================================================================== */

.admin-body {
    min-height: 100vh;
    background: #f9fafb;
    color: #111827;
    -webkit-font-smoothing: antialiased;
}

.admin-center {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.admin-card {
    width: 100%;
    max-width: 24rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.admin-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-input {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
}

.admin-input:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 1px;
}

.admin-error {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #dc2626;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.admin-button {
    border: 0;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    background: #111827;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-button:hover {
    background: #374151;
}

.admin-button--block {
    width: 100%;
}

.admin-button--quiet {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    text-decoration: none;
    /* Keeps the link the same height as the buttons beside it. */
    display: inline-flex;
    align-items: center;
}

.admin-button--quiet:hover {
    background: #f3f4f6;
    color: #111827;
}

a.admin-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.admin-flash {
    margin: 0;
    padding: 0.875rem 1rem;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    background: #f0fdf4;
    font-size: 0.875rem;
    font-weight: 500;
    color: #166534;
}

.admin-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding: 1.5rem;
}

.admin-page-header {
    display: flex;
    flex-direction: column;
    /* Matches .admin-shell's own gap, so the space below the tabs is the
       same whether the next element is the actions box or the page's
       main content. */
    gap: 1.5rem;
}

.admin-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #d1d5db;
}

.admin-tab {
    padding: 0.625rem 1rem;
    border-bottom: 3px solid transparent;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.admin-tab:hover {
    border-bottom-color: #9ca3af;
    color: #111827;
}

.admin-tab--active,
.admin-tab--active:hover {
    border-bottom-color: #a07146;
    color: #111827;
}

.admin-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

/* Print-oriented pages (checklist, item labels) skip the tabs and sign-out
   entirely and use this stripped-down header instead: just a heading and a
   "Back to..." action, visible on screen but never printed. */
.admin-print-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-panel {
    padding: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.admin-note {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Dashboard summary -------------------------------------------------------- */

.admin-panel__title {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.admin-panel__head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.admin-panel__head .admin-panel__title {
    margin: 0;
}

.admin-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.admin-stat__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
}

.admin-stat__value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    /* Keeps the columns of figures aligned as the numbers change. */
    font-variant-numeric: tabular-nums;
}

.admin-stat__meta {
    font-size: 0.8125rem;
    color: #6b7280;
}

.admin-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem 1.5rem;
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

.admin-figures dt {
    color: #6b7280;
}

.admin-figures dd {
    margin: 0.125rem 0 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.admin-warning {
    margin: 1.25rem 0 0;
    padding: 0.75rem 1rem;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    background: #fffbeb;
    font-size: 0.875rem;
    color: #92400e;
}

/* Featured item ------------------------------------------------------------ */

.admin-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.admin-item__image {
    flex: 0 0 auto;
    width: 4.5rem;
    height: 4.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    /* Stock photographs vary in shape, so fit rather than crop. */
    object-fit: contain;
}

.admin-item__body {
    min-width: 0;
}

.admin-item__title {
    margin: 0;
    font-weight: 600;
}

.admin-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-item__price {
    font-weight: 600;
    color: #111827;
}

.admin-item + .admin-note {
    margin-top: 1rem;
}

.admin-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-badge--available {
    background: #dcfce7;
    color: #166534;
}

.admin-badge--reserved {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge--sold {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge--inactive {
    background: #e5e7eb;
    color: #374151;
}

/* Category table ----------------------------------------------------------- */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.admin-table thead th {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
}

.admin-table tbody th {
    font-weight: 500;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.admin-table__number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.admin-table tfoot th,
.admin-table tfoot td {
    border-bottom: 0;
    border-top: 2px solid #e5e7eb;
    font-weight: 600;
}

.admin-table a {
    color: inherit;
}

.admin-table a:hover {
    color: #111827;
}

.admin-table + .admin-note {
    margin-top: 1rem;
}

/* Item form ---------------------------------------------------------------- */

.admin-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
}

.admin-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.admin-fieldset {
    margin: 0;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.admin-fieldset legend {
    padding: 0 0.375rem;
}

.admin-hint {
    margin: 0 0 0.875rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.admin-hint--warn {
    margin: 0.875rem 0 0;
    color: #92400e;
}

textarea.admin-input {
    resize: vertical;
    /* Inputs inherit the body font; textareas do not without being told. */
    font-family: inherit;
    line-height: 1.5;
}

select.admin-input {
    /* Safari renders selects at a different height from text inputs. */
    height: 2.375rem;
}

.admin-input--file {
    padding: 0.4375rem 0.5rem;
    font-size: 0.8125rem;
}

.admin-input--file::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.3125rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #f9fafb;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.admin-input--file::file-selector-button:hover {
    background: #f3f4f6;
}

.admin-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

/* Stacked rather than a row: side by side, a long filename and the button
   cluster compete for the same line and one ends up over the other. */
.admin-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
    cursor: grab;
}

.admin-preview:active {
    cursor: grabbing;
}

/* The picture the catalogue leads with, so it reads differently. */
.admin-preview:first-child {
    border-color: #9ca3af;
    background: #fff;
}

.admin-preview--dragging {
    opacity: 0.5;
}

.admin-preview--over {
    border-color: #111827;
    /* Inset rather than a wider border, so nothing shifts as it highlights. */
    box-shadow: inset 0 0 0 1px #111827;
}

.admin-preview__body {
    min-width: 0;
    flex: 1 1 auto;
}

/* Pushed to the foot of the tile so the buttons line up across a row
   whether or not a filename has wrapped onto a second line. */
.admin-preview__controls {
    display: flex;
    flex: 0 0 auto;
    gap: 0.25rem;
    margin-top: auto;
    padding-top: 0.125rem;
}

.admin-preview__move {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #374151;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}

.admin-preview__move:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111827;
}

.admin-preview__move:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 1px;
}

.admin-preview__move:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Removing is the one control here that cannot be undone, so it is set apart
   from the arrows rather than sitting in the row as another identical box. */
.admin-preview__move--remove {
    margin-left: 0.25rem;
    font-size: 1.125rem;
}

.admin-preview__move--remove:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.admin-preview__move--remove:focus-visible {
    outline-color: #b91c1c;
}

.admin-hint--reorder {
    margin: 0.875rem 0 0;
}

.admin-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
}

.admin-preview__image {
    flex: 0 0 auto;
    width: 100%;
    height: 9rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #fff;
    object-fit: contain;
}

.admin-preview__name {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Filenames have no spaces to break at, so without this one long name sets
   the width of every tile in the row. */
.admin-preview__meta {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.admin-preview__note {
    grid-column: 1 / -1;
    font-size: 0.8125rem;
    color: #92400e;
}

/* Stock list
   ------------------------------------------------------------------------ */

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-filters__field {
    flex: 1 1 10rem;
    min-width: 0;
}

.admin-filters__field--wide {
    flex: 2 1 16rem;
}

.admin-filters__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

/* Equal-width grid: every field in a row shares the same width. */
.admin-filters--grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 1rem;
}

.admin-filters--grid .admin-filters__field--wide {
    grid-column: span 2;
}

.admin-filters--grid .admin-input {
    width: 100%;
}

.admin-filters--grid .admin-filters__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

@media (max-width: 64em) {
    .admin-filters--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 40em) {
    .admin-filters--grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-filters--grid .admin-filters__field--wide {
        grid-column: auto;
    }
}

.admin-button--small {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
}

.admin-button--danger {
    border: 1px solid #fca5a5;
    background: #fff;
    color: #b91c1c;
}

.admin-button--danger:hover {
    background: #fef2f2;
    color: #7f1d1d;
}

/* The stock table carries more columns than the summary tables. On a narrow
   screen it scrolls sideways inside its own wrapper rather than pushing the
   whole page wide. */
.admin-table-scroll {
    overflow-x: auto;
}

.admin-table--stock {
    min-width: 46rem;
}

.admin-table--stock th,
.admin-table--stock td {
    vertical-align: middle;
}

/* Only the short columns resist wrapping; letting a long title do so is what
   made the table wider than the page. */
.admin-table--stock .admin-table__number,
.admin-table--stock .admin-table__actions {
    white-space: nowrap;
}

.admin-table__thumb {
    width: 4.5rem;
    min-width: 4.5rem;
}

.admin-table__select {
    width: 2.5rem;
    text-align: center !important;
}

.admin-table__select input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    vertical-align: middle;
}

.admin-button:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.admin-thumb {
    display: block;
    width: 3rem;
    height: 3rem;
    max-width: none;
    border-radius: 0.375rem;
    object-fit: cover;
    background: #f3f4f6;
}

.admin-thumb--empty {
    border: 1px dashed #d1d5db;
}

.admin-table__sub {
    display: block;
    margin-top: 0.125rem;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 400;
}

/* Not a flex container: making a <td> one drops its table-cell behaviour, so
   the buttons stop sitting on the row's baseline. */
.admin-table__actions {
    text-align: right;
}

.admin-table__actions .admin-button + .admin-button {
    margin-left: 0.375rem;
}

/* Narrower than the stock table: four short columns and no thumbnail. */
.admin-table--categories {
    min-width: 32rem;
}

.admin-table--categories .admin-table__number,
.admin-table--categories .admin-table__actions {
    white-space: nowrap;
}

/* A span, not a disabled button, so the reason stays readable and reachable
   by pointer hover rather than being skipped over entirely. */
.admin-button--disabled,
.admin-button--disabled:hover {
    border-color: #e5e7eb;
    background: #fff;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Printable item checklist
   ------------------------------------------------------------------------ */

.admin-shell--checklist {
    max-width: 72rem;
}

.admin-checklist__heading {
    display: none;
}

.admin-checklist__table {
    table-layout: fixed;
}

.admin-checklist__table th,
.admin-checklist__table td {
    vertical-align: middle;
}

.admin-checklist__table th:nth-child(1) {
    width: 4rem;
}

.admin-checklist__table th:nth-child(2) {
    width: 5rem;
}

.admin-checklist__table th:nth-child(4) {
    width: 10rem;
}

.admin-checklist__table th:nth-child(5) {
    width: 7rem;
}

.admin-checklist__table th:nth-child(6) {
    width: 7rem;
}

.admin-checklist__check {
    text-align: center !important;
}

.admin-checklist__box {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #111827;
    vertical-align: middle;
}

@media print {
    @page checklist {
        size: landscape;
        margin: 10mm;
    }

    .admin-body {
        background: #fff;
    }

    .admin-shell--checklist {
        display: block;
        max-width: none;
        min-height: 0;
        padding: 0;
        page: checklist;
    }

    .admin-print-header {
        display: none;
    }

    .admin-checklist {
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .admin-checklist__heading {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.4rem;
        font-size: 9pt;
    }

    .admin-checklist__table {
        font-size: 8pt;
    }

    .admin-checklist__table thead {
        display: table-header-group;
    }

    .admin-checklist__table tr {
        break-inside: avoid;
    }

    .admin-checklist__table th,
    .admin-checklist__table td {
        padding: 2.5mm 2mm;
        border-color: #777;
    }

    .admin-checklist__table tbody tr:hover {
        background: transparent;
    }

    .admin-checklist__box {
        width: 4mm;
        height: 4mm;
        border-color: #000;
    }
}

/* Printable invoice
   ------------------------------------------------------------------------ */

.item-invoice-page {
    min-height: 100vh;
    margin: 0;
    padding: 1.5rem 1rem;
    background: #e5e7eb;
}

.item-invoice-screen-header {
    min-height: 0;
    margin-bottom: 2rem;
    padding: 0;
}

.item-invoice-pages {
    display: flex;
    justify-content: center;
}

.item-invoice {
    display: flex;
    flex-direction: column;
    width: min(100%, 52.5rem);
    min-height: min(74.2rem, 140vh);
    padding: 12mm;
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.15);
}

.item-invoice__masthead {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
}

.item-invoice__logo {
    width: 45%;
    max-width: 18rem;
    height: auto;
}

.item-invoice__address {
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
    font-style: normal;
    line-height: 1.5;
    text-align: right;
}

.item-invoice__address strong {
    font-weight: 600;
}

.item-invoice__contact {
    margin-top: 0.4rem;
}

.item-invoice__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 1.75rem 0 0;
    font-size: 0.8125rem;
    text-align: center;
}

.item-invoice__meta div {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
}

.item-invoice__meta dt {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.item-invoice__meta dd {
    margin: 0;
}

.item-invoice__table {
    width: 100%;
    margin-top: 1.5rem;
    border-collapse: collapse;
}

.item-invoice__table th,
.item-invoice__table td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #111827;
    font-size: 0.875rem;
    text-align: left;
}

.item-invoice__table thead th {
    background: #e5e7eb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.item-invoice__price {
    width: 22%;
    text-align: right !important;
}

.item-invoice__totals {
    width: 100%;
    border-collapse: collapse;
}

.item-invoice__totals th,
.item-invoice__totals td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #111827;
    border-top: 0;
    font-size: 0.875rem;
    font-style: italic;
    font-weight: 700;
    text-align: left;
}

.item-invoice__totals td {
    width: 22%;
    font-style: normal;
    font-weight: 400;
    text-align: right;
}

/* The spacer keeps the totals on the same column grid as the item table above,
   so the two tables share the vertical border in front of the price column. */
.item-invoice__totals td.item-invoice__totals-spacer {
    width: 56%;
    padding: 0;
    border: 0;
}

.item-invoice__discount-rate {
    font-style: normal;
    font-weight: 400;
}

.item-invoice__grand-total td {
    font-weight: 700;
}

.item-invoice__bacs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    align-items: baseline;
    margin-top: auto;
    padding-top: 2rem;
    font-size: 0.8125rem;
}

.item-invoice__bacs strong {
    flex-basis: 100%;
    font-style: italic;
}

.item-invoice__bacs em {
    font-weight: 600;
}

@media print {
    @page invoice {
        size: A4 portrait;
        margin: 12mm;
    }

    .item-invoice-page {
        min-height: 0;
        padding: 0;
        background: #fff;
    }

    .item-invoice-screen-header {
        display: none;
    }

    .item-invoice {
        width: auto;
        min-height: 0;
        height: 273mm;
        padding: 0;
        box-shadow: none;
        page: invoice;
    }

    .item-invoice__table tr {
        break-inside: avoid;
    }
}

/* Invoice options
   ------------------------------------------------------------------------ */

.admin-invoice-picked {
    max-height: 12rem;
    margin: 0 0 1rem;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    font-size: 0.875rem;
}

.admin-invoice-picked li {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.admin-invoice-options__field {
    margin-bottom: 1rem;
}

.admin-invoice-options__field .admin-input {
    max-width: 8rem;
}

.admin-invoice-options__check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #111827;
}

.admin-invoice-options__statuses {
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
}

.admin-invoice-options__statuses .admin-invoice-options__check:last-child {
    margin-bottom: 0;
}

/* Delete confirmation
   ------------------------------------------------------------------------ */

.admin-confirm__item {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.admin-confirm__warning {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #b91c1c;
}

.admin-confirm__actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 40em) {
    .admin-filters__field,
    .admin-filters__field--wide {
        flex-basis: 100%;
    }
}
