dialog.product-catalog {
    --catalog-surface: #fff;
    --catalog-text: #50465c;
    --catalog-title: #302638;
    --catalog-border: #8054d5;
    --catalog-button-bg: #8054d5;
    --catalog-button-text: #fff;
    padding: 0;
    border: 1px solid var(--catalog-border);
    border-radius: 22px;
    width: min(960px, calc(100vw - 48px));
    max-width: none;
    height: min(850px, 90dvh);
    max-height: 90dvh;
    margin: auto;
    background: var(--catalog-surface);
    color: var(--catalog-text);
    box-shadow: 0 25px 100px #0005;
    text-align: left;
    font-family: inherit;
    overflow: hidden;
}
dialog.product-catalog::backdrop {
    background: #0009;
}
.product-catalog-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.product-catalog-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--catalog-border);
    background: var(--catalog-surface);
}
.product-catalog-header h2 {
    font-size: 22px;
    margin: 0;
    color: var(--catalog-title);
    overflow-wrap: anywhere;
    min-width: 0;
}
.product-catalog-header button,
.product-catalog-filters button,
.product-catalog-contact {
    background: var(--catalog-button-bg);
    color: var(--catalog-button-text);
    border: 1px solid var(--catalog-border);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font: inherit;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
}
.product-catalog-header button {
    flex-shrink: 0;
    min-height: 44px;
}
.product-catalog-scroll {
    overflow: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
    padding: 24px;
}
.product-catalog-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: inherit;
}
.product-catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}
.product-catalog-filters button {
    background: transparent;
    color: inherit;
}
.product-catalog-filters button[aria-pressed="true"] {
    background: var(--catalog-button-bg);
    color: var(--catalog-button-text);
    box-shadow: inset 0 0 0 2px var(--catalog-border);
}
.product-catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.product-catalog-item {
    border: 1px solid color-mix(in srgb, var(--catalog-text) 20%, transparent);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-catalog-item[hidden],
.product-catalog-no-results[hidden] {
    display: none !important;
}
.product-catalog-item > img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: color-mix(in srgb, var(--catalog-text) 5%, transparent);
}
.product-catalog-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.product-catalog-item h3 {
    color: var(--catalog-title);
    font-size: 20px;
    line-height: 1.4;
    margin: 0;
    overflow-wrap: anywhere;
}
.product-catalog-item p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}
.product-catalog-price {
    font-size: 21px;
    color: var(--catalog-title);
}
.product-catalog-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    text-align: center;
    text-decoration: none;
}
.product-catalog-contact:hover {
    color: var(--catalog-button-text);
    opacity: 0.85;
}
.product-catalog :focus-visible {
    outline: 3px solid var(--catalog-border);
    outline-offset: 3px;
}
@media (max-width: 600px) {
    dialog.product-catalog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        max-width: 100%;
        border: 0;
        border-radius: 0;
    }
    .product-catalog-header {
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top));
    }
    .product-catalog-header h2 {
        font-size: 19px;
    }
    .product-catalog-scroll {
        padding: 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    .product-catalog-grid {
        grid-template-columns: 1fr;
    }
    .product-catalog-item > img {
        height: 230px;
    }
}

.product-gallery {
    background: color-mix(in srgb, var(--catalog-text) 5%, transparent);
}
.product-gallery-main {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
}
.product-gallery-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 8px;
    font-size: 13px;
}
.product-gallery-navigation button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--catalog-border);
    border-radius: 12px;
    background: var(--catalog-button-bg);
    color: var(--catalog-button-text);
    font-size: 26px;
    cursor: pointer;
}
.product-gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
    justify-content: center;
}
.product-gallery-thumbs button {
    padding: 2px;
    flex: 1;
    min-width: 0;
    max-width: 64px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}
.product-gallery-thumbs button[aria-pressed="true"] {
    border-color: var(--catalog-border);
}
.product-gallery-thumbs img {
    width: 100%;
    height: 44px;
    object-fit: contain;
}
