.ofac-catalog {
    --ofac-columns: 4;
    --ofac-primary: #2f3d4a;
    --ofac-accent: #9a7a36;
    --ofac-surface: #f5f4ef;
    --ofac-card: #ffffff;
    color: #27313a;
    background: var(--ofac-surface);
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid rgba(47, 61, 74, 0.12);
    font-family: inherit;
}

.ofac-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) repeat(6, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 22px;
}

.ofac-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: var(--ofac-primary);
}

.ofac-field input,
.ofac-field select {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid rgba(47, 61, 74, 0.24);
    border-radius: 2px;
    background: #fff;
    color: #27313a;
    font: inherit;
    font-size: 0.92rem;
}

.ofac-field input:focus,
.ofac-field select:focus,
.ofac-reset:focus,
.ofac-button:focus,
.ofac-page-button:focus {
    outline: 2px solid var(--ofac-accent);
    outline-offset: 2px;
}

.ofac-reset {
    min-height: 43px;
    padding: 9px 16px;
    border: 1px solid var(--ofac-primary);
    background: transparent;
    color: var(--ofac-primary);
    cursor: pointer;
    font-weight: 700;
}

.ofac-reset:hover {
    background: var(--ofac-primary);
    color: #fff;
}

.ofac-summary {
    min-height: 1.4em;
    margin: 0 0 14px;
    color: #5b6570;
    font-size: 0.9rem;
}

.ofac-grid {
    display: grid;
    grid-template-columns: repeat(var(--ofac-columns), minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 28px);
}

.ofac-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--ofac-card);
    border: 1px solid rgba(47, 61, 74, 0.11);
    box-shadow: 0 8px 24px rgba(47, 61, 74, 0.07);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ofac-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(47, 61, 74, 0.12);
}

.ofac-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 10px;
    overflow: hidden;
    background: #e9e7e0;
    text-decoration: none;
}

.ofac-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ofac-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(47, 61, 74, 0.45);
    border: 1px solid rgba(47, 61, 74, 0.12);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
}

.ofac-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    pointer-events: none;
}

.ofac-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ofac-sale-badge {
    background: var(--ofac-accent);
    color: #fff;
}

.ofac-stock-badge {
    background: var(--ofac-primary);
    color: #fff;
}

.ofac-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 17px 17px 19px;
}

.ofac-artist-name {
    margin-bottom: 5px;
    color: var(--ofac-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-decoration: none;
    text-transform: uppercase;
}

.ofac-product-title {
    margin: 0 0 7px;
    color: #202a33;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 1.15vw, 1.16rem);
    line-height: 1.32;
}

.ofac-product-title a {
    color: inherit;
    text-decoration: none;
}

.ofac-product-title a:hover,
.ofac-artist-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ofac-category-name {
    margin-bottom: 9px;
    color: #69737d;
    font-size: 0.82rem;
}

.ofac-price {
    margin-top: auto;
    padding-top: 7px;
    color: #202a33;
    font-size: 0.96rem;
    font-weight: 700;
}

.ofac-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 14px;
    padding: 9px 14px;
    background: var(--ofac-primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.ofac-button:hover {
    background: var(--ofac-accent);
    color: #fff;
}

.ofac-card.is-unavailable .ofac-card-media img {
    filter: saturate(0.55);
    opacity: 0.8;
}

.ofac-message {
    grid-column: 1 / -1;
    padding: 42px 16px;
    text-align: center;
    color: #5b6570;
}

.ofac-error {
    color: #9f2f2f;
}

.ofac-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 26px;
}

.ofac-page-button {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid rgba(47, 61, 74, 0.28);
    background: #fff;
    color: var(--ofac-primary);
    cursor: pointer;
    font-weight: 700;
}

.ofac-page-button:hover:not(:disabled),
.ofac-page-button.is-current {
    border-color: var(--ofac-primary);
    background: var(--ofac-primary);
    color: #fff;
}

.ofac-page-button:disabled {
    opacity: 0.42;
    cursor: default;
}

@media (max-width: 1180px) {
    .ofac-filters {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
}

@media (max-width: 900px) {
    .ofac-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ofac-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ofac-catalog {
        padding: 10px;
    }

    .ofac-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .ofac-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .ofac-card {
        box-shadow: 0 4px 12px rgba(47, 61, 74, 0.07);
    }

    .ofac-card-media {
        aspect-ratio: 4 / 5;
        padding: 4px;
    }

    .ofac-badges {
        top: 6px;
        left: 6px;
        right: 6px;
        gap: 3px;
    }

    .ofac-badge {
        min-height: 18px;
        padding: 2px 5px;
        font-size: 0.52rem;
    }

    .ofac-card-body {
        padding: 8px 7px 9px;
    }

    .ofac-artist-name {
        margin-bottom: 3px;
        font-size: 0.58rem;
        line-height: 1.15;
        letter-spacing: 0.025em;
    }

    .ofac-product-title {
        display: -webkit-box;
        margin-bottom: 4px;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.15;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .ofac-category-name {
        margin-bottom: 4px;
        font-size: 0.6rem;
        line-height: 1.15;
    }

    .ofac-price {
        padding-top: 4px;
        font-size: 0.68rem;
        line-height: 1.15;
    }

    .ofac-button {
        width: 100%;
        min-height: 30px;
        margin-top: 7px;
        padding: 5px 4px;
        font-size: 0.62rem;
        text-align: center;
    }
}
