@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --catalog-bg: #f5f5f7;
    --catalog-ink: #1d1d1f;
    --catalog-muted: #6e6e73;
    --catalog-red: #b51f2a;
    --catalog-panel: #ffffff;
    --catalog-border: rgba(0, 0, 0, 0.08);
    --catalog-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

body.catalog-page {
    min-height: 100vh;
    color: var(--catalog-ink);
    background: var(--catalog-bg);
    font-family: Inter, Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.catalog-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 68px;
    background: rgba(18, 18, 20, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.catalog-logo {
    display: block;
    width: min(340px, 86vw);
    height: 100%;
    margin: 0 auto;
    background: url('../images/logo_header.png') center / contain no-repeat;
}

.catalog-main {
    padding-bottom: 48px;
}

.catalog-toolbar {
    color: var(--catalog-ink);
    background: transparent;
}

.catalog-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0 18px;
}

.catalog-kicker {
    margin: 0 0 4px;
    color: var(--catalog-red);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.catalog-toolbar h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 800;
    letter-spacing: 0;
}

.catalog-intro {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--catalog-muted);
}

.catalog-panel {
    margin-top: 24px;
    padding: 18px;
    background: var(--catalog-panel);
    border: 1px solid var(--catalog-border);
    border-radius: 24px;
    box-shadow: var(--catalog-shadow);
}

.catalog-subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.catalog-root-teasers {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 220px));
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.catalog-root-teaser {
    display: flex;
    min-height: 236px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 22px;
    text-align: center;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 750;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.045);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.catalog-root-teaser:hover {
    color: #1d1d1f;
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.13);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.catalog-root-teaser.is-active {
    color: #ffffff;
    background: #1d1d1f;
    border-color: #1d1d1f;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.catalog-root-teaser-media {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.08)),
        #e9e9ed;
    border-radius: 18px;
    overflow: hidden;
}

.catalog-root-teaser-media::before {
    content: "";
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    box-shadow:
        12px 10px 0 rgba(0, 0, 0, 0.04),
        -10px -8px 0 rgba(255, 255, 255, 0.72);
    opacity: 0.8;
}

.catalog-root-teaser-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-root-teaser-label {
    display: block;
    padding-bottom: 4px;
}

.catalog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-top: 0;
    padding-top: 14px;
    color: var(--catalog-muted);
    border-top: 1px solid var(--catalog-border);
    color: var(--catalog-muted);
    font-size: 0.92rem;
}

.catalog-crumb {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    color: #424245;
    background: rgba(0, 0, 0, 0.045);
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.catalog-crumb:hover {
    color: #1d1d1f;
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.catalog-crumb.is-current {
    color: #ffffff;
    background: #1d1d1f;
}

.catalog-crumb-home {
    width: 32px;
    padding: 0;
}

.catalog-crumb-home svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.catalog-crumb-separator {
    color: rgba(0, 0, 0, 0.28);
    font-size: 0.8rem;
}

.catalog-subcategory-list {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--catalog-border);
}

.catalog-subcategory-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 12px;
    color: #4f6074;
    background: #ffffff;
    border: 1px solid rgba(79, 96, 116, 0.28);
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.catalog-subcategory-pill:hover {
    color: #1d1d1f;
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.catalog-count {
    margin-top: 16px;
    color: var(--catalog-muted);
    font-size: 0.95rem;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.catalog-card {
    display: flex;
    min-height: 348px;
    flex-direction: column;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--catalog-border);
    border-radius: 26px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.055);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.catalog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}

.catalog-card-media {
    position: relative;
    display: grid;
    min-height: 216px;
    place-items: center;
    margin-bottom: 12px;
    background: #f8f8fa;
    border-radius: 22px;
    overflow: hidden;
}

.catalog-image-button {
    display: grid;
    width: 100%;
    min-height: 216px;
    place-items: center;
    padding: 14px;
    background: transparent;
    border: 0;
    cursor: zoom-in;
}

.catalog-image-button:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.24);
    outline-offset: -6px;
    border-radius: 22px;
}

.catalog-product-image {
    width: auto;
    height: auto;
    max-height: 188px;
    border-radius: 18px;
    object-fit: contain;
    overflow: hidden;
}

.availability-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.availability-dot.is-available {
    background: #198754;
}

.availability-dot.is-missing {
    background: #dc3545;
}

.catalog-card-body {
    flex: 1;
    text-align: center;
}

.catalog-ref {
    margin: 0 0 8px;
    font-size: 0.98rem;
    font-weight: 500;
}

.catalog-status {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.catalog-contact-button {
    align-self: center;
    min-width: 142px;
    max-width: 100%;
    min-height: 38px;
    padding: 8px 18px;
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.catalog-contact-button:hover {
    color: #ffffff;
    background: #1d1d1f;
    border-color: #1d1d1f;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
}

.catalog-contact-button:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.25);
    outline-offset: 3px;
}

.catalog-modal-button {
    min-height: 38px;
    padding: 8px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.catalog-modal-button:hover {
    transform: translateY(-1px);
}

.catalog-modal-button:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.25);
    outline-offset: 3px;
}

.catalog-modal-button-muted {
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.catalog-modal-button-muted:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.catalog-modal-button-primary {
    color: #ffffff;
    background: #1d1d1f;
    border: 1px solid #1d1d1f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.catalog-modal-button-primary:hover {
    background: #000000;
    border-color: #000000;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.catalog-modal-button-primary:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.image-modal-content {
    background: rgba(255, 255, 255, 0.96);
}

.image-modal-body {
    display: grid;
    min-height: min(68vh, 720px);
    place-items: center;
    background: #f5f5f7;
    border-radius: 0 0 24px 24px;
}

#image-modal-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 72vh;
    border-radius: 20px;
    cursor: zoom-out;
    object-fit: contain;
}

#image-modal-img:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.25);
    outline-offset: 6px;
}

@media (max-width: 640px) {
    .catalog-toolbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalog-panel {
        margin-top: 16px;
        border-radius: 22px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-root-teasers {
        grid-template-columns: 1fr;
    }
}
