.catalog-main { min-height: 60vh; }
.catalog-count, .catalog-muted, .catalog-image-empty {
    color: var(--shop-muted);
    font-size: .9rem;
}
.catalog-count { margin-bottom: .2em; font-weight: 650; }
.catalog-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 620px;
    margin-bottom: 18px;
}
.catalog-search input[type="search"] {
    flex: 1 1 170px;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--shop-line);
    border-radius: 9px;
    padding: 8px 12px;
    background: #fff;
    font-size: 1rem;
}

.catalog-categories, .catalog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.catalog-categories { margin-bottom: 12px; }
.catalog-filter-label {
    min-width: 4.8rem;
    color: var(--shop-muted);
    font-size: .86rem;
    font-weight: 700;
}
.catalog-categories a, .catalog-pagination a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 14px;
    border: 1px solid var(--shop-line);
    border-radius: 9px;
    background: #fff;
    font-size: .88rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.catalog-categories a:hover, .catalog-pagination a:hover { background: #f4f5f6; color: var(--shop-blue); }
.catalog-categories a[aria-current] { background: var(--shop-blue); border-color: var(--shop-blue); color: #fff; }
.catalog-pagination { justify-content: center; margin-top: 28px; color: var(--shop-muted); }

.catalog-image {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    min-width: 0;
    background: #edf2fb;
}
.catalog-image img { display: block; width: 100%; height: auto; object-fit: contain; }
.catalog-image-empty { padding: .6em; text-align: center; }
.catalog-category { color: var(--shop-muted); font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.catalog-sale { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 18px; font-size: .92rem; }
.catalog-sale del { color: var(--shop-muted); }
.catalog-sale span { color: #a52e2d; font-weight: 800; }
.catalog-price { color: var(--shop-ink); font-variant-numeric: tabular-nums; font-weight: 800; }
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.catalog-main > .catalog-toolbar { margin-bottom: 18px; }
.catalog-back { display: inline-block; color: var(--shop-blue); font-size: .9rem; font-weight: 700; }
.catalog-back:hover { text-decoration: none; text-underline-offset: 4px; }
.catalog-detail { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); overflow: hidden; }
.catalog-detail > .catalog-image { align-self: start; margin: 0; }
.catalog-detail > .catalog-image:has(.catalog-image-empty) { aspect-ratio: 1; }
.catalog-summary { min-width: 0; padding: clamp(18px, 3.5vw, 39px); }
.catalog-summary h1 { margin: .15em 0 .3em; }
.catalog-summary .catalog-price { margin-top: 18px; font-size: clamp(1.45rem, 3vw, 2rem); }
.catalog-summary .catalog-sale + .catalog-price { margin-top: 3px; }
.catalog-facts { display: grid; gap: 7px; padding-block: 13px; margin: 16px 0; border-block: 1px solid var(--shop-line); font-size: .9rem; }
.catalog-facts div { display: flex; justify-content: space-between; gap: 10px; }
.catalog-facts dt { color: var(--shop-muted); }
.catalog-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.catalog-limit { padding: 9px 12px; border-radius: 8px; background: var(--shop-soft); color: #304c87; font-size: .84rem; }
.catalog-list-limit { margin: 16px 0 20px; }
.catalog-buy { margin-top: 16px; }
.catalog-quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: .9rem; font-weight: 700; }
.catalog-stepper { display: inline-flex; align-items: center; border: 1px solid #acbad0; border-radius: 8px; background: #fff; color: var(--shop-ink); }
.catalog-stepper :is(input, span) { width: 42px; padding: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.catalog-stepper input { min-height: 42px; border: 0; appearance: textfield; }
.catalog-stepper input::-webkit-inner-spin-button { appearance: none; }
.catalog-stepper button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--shop-blue); font-size: 1.15rem; }
.catalog-stepper button:disabled { color: var(--shop-muted); opacity: .45; }
#quantity-summary { padding-top: 10px; border-top: 1px solid var(--shop-line); color: var(--shop-ink); font-weight: 750; }
.catalog-order-limit { margin: 4px 0 8px; }
.catalog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.catalog-actions .catalog-add-to-cart { grid-column: 1 / -1; }
.catalog-actions-member { grid-template-columns: minmax(0, 1fr); }
.catalog-purchase-selection { display: none; }
.catalog-description { margin-top: 24px; padding: clamp(17px, 3.5vw, 37px); overflow-wrap: anywhere; }
.catalog-description h2 { font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; }
.catalog-prose :is(p, ul, ol, blockquote, table, img) { margin-block: .85em; }
.catalog-prose :is(h2, h3, h4, h5, h6) { margin-block: .9em .4em; font-weight: 750; }
.catalog-prose :is(ul, ol) { padding-inline-start: 1.5em; list-style: revert; }
.catalog-prose a { color: var(--shop-blue); text-decoration: underline; }
.catalog-prose img { max-width: 100%; height: auto; }
.catalog-prose table { display: block; max-width: 100%; overflow: auto; }
.catalog-notice, .catalog-empty { padding: 12px 14px; color: #274784; }
.catalog-notice { margin-bottom: 16px; border-radius: 9px; background: var(--shop-soft); }
.catalog-summary > .catalog-notice { margin: 15px 0 0; }
.catalog-empty { padding: 28px 16px; text-align: center; color: var(--shop-muted); }
.catalog-error { background: #ffeded; color: #8f2424; }
.catalog-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}
.catalog-feedback p { margin: 0; font-weight: 650; }
.catalog-feedback a { color: var(--shop-blue); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }

@media (max-width: 480px) {
    .catalog-filter-label { width: 100%; min-width: 0; }
}

@media (max-width: 680px) {
    .catalog-detail { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .catalog-can-buy {
        --catalog-purchase-height: calc(94px + env(safe-area-inset-bottom, 0px));
        scroll-padding-top: 68px;
    }
    .catalog-buy-following {
        scroll-padding-block: 68px calc(var(--catalog-purchase-height) + 12px);
    }
    .catalog-buy-following .catalog-page { padding-bottom: var(--catalog-purchase-height); }
    .catalog-buy-following .catalog-purchase-bar {
        position: fixed;
        inset: auto 0 0;
        z-index: 43;
        padding: 8px max(12px, env(safe-area-inset-right, 0px))
                 calc(9px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
        border-top: 1px solid var(--shop-line);
        background: #fff;
        box-shadow: 0 -3px 16px rgb(21 41 73 / 8%);
    }
    .catalog-purchase-info {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0 10px;
        margin-bottom: 6px;
    }
    .catalog-buy-following .catalog-purchase-selection:not([hidden]) {
        display: inline-flex;
        align-items: baseline;
        gap: 8px;
    }
    .catalog-purchase-selection strong { font-size: 1.05rem; color: var(--shop-ink); font-variant-numeric: tabular-nums; }
    .catalog-purchase-info :is(a,small) { font-size: .78rem; line-height: 1.45; }
    .catalog-purchase-info a {
        display: inline-flex;
        align-items: center;
        gap: .25em;
        min-height: 26px;
        color: var(--shop-blue);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
    .catalog-purchase-bar .catalog-actions { gap: 6px; }
    .catalog-purchase-bar .catalog-actions button {
        padding: 8px 4px;
        min-width: 0;
        min-height: 44px;
        font-size: .875rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
}

.cart-confirm {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(400px, calc(100% - 32px));
    height: fit-content;
    margin: auto;
    padding: 30px 22px 22px;
    border: 1px solid #dce2ec;
    border-radius: 16px;
    background: #fff;
    color: #182337;
    box-shadow: 0 18px 64px #14213b33;
    text-align: center;
}
.cart-confirm::backdrop { background: rgb(16 25 44 / 48%); }
.cart-confirm h2 { margin: 0 0 24px; font-size: 1.18rem; line-height: 1.5; word-break: keep-all; }
.cart-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cart-confirm-actions a { display: grid; place-items: center; min-height: 46px; padding: 4px; border-radius: 8px; font-size: .93rem; font-weight: 700; text-decoration: none; }
.cart-confirm-actions .cart-continue { border: 1px solid #c6cedb; color: #28364c; background: white; }
.cart-confirm-actions .cart-view { color: white; background: var(--site-blue, #0033cc); }
.cart-confirm-actions a:focus-visible { outline: 2px solid #263d78; outline-offset: 3px; }

.catalog-toolbar > .shop-location { width: 100%; margin: 0; padding: 0; }
.catalog-toolbar > .shop-location ol { justify-content: flex-start; }
