* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7f8fa;
    color: #111827;
    font-family:
        Inter,
        Arial,
        sans-serif;
}

header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #111827;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
}

.nav a {
    text-decoration: none;
}

.nav-link {
    color: #4b5563;
}

.hero {
    padding: 54px 0 28px;
}

.hero h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.1;
}

.hero p {
    margin: 12px 0 0;
    color: #6b7280;
}

.search-form {
    display: flex;
    align-items: end;
    gap: 12px;
    margin: 26px 0;
}

.search-input {
    flex: 1;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 16px;
    background: #fff;
}

.brand-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
}

.brand-select {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 14px;
}

.search-button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.category-filters {
    margin-top: -18px;
}

.filter {
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.filter.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.result-count {
    margin-bottom: 20px;
    color: #6b7280;
    font-size: 14px;
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
    gap: 22px;
    padding-bottom: 50px;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.image-wrap {
    height: 280px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-link {
    display: block;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.merchant {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
}

h2 a {
    color: #111827;
    text-decoration: none;
}

.meta {
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

.category {
    margin-top: 7px;
    color: #9ca3af;
    font-size: 12px;
}

.price {
    margin-top: 18px;
    font-size: 21px;
    font-weight: 800;
}

.view-button {
    margin-top: auto;
    padding-top: 22px;
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
}

.empty {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 40px;
    border-radius: 16px;
    grid-column: 1 / -1;
}

.disclosure {
    border-top: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    padding: 22px 0;
    font-size: 13px;
    line-height: 1.6;
}

@media (
    max-width: 900px
) {
    .grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (
    max-width: 620px
) {
    .hero h1 {
        font-size: 32px;
    }

    .grid {
        grid-template-columns:
            1fr;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 50px;
}

.page-button,
.page-number {
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.page-number.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
    font-weight: 700;
}

.page-button:hover,
.page-number:hover {
    border-color: #9ca3af;
}

.page-number.active:hover {
    border-color: #111827;
}

.page-ellipsis {
    color: #9ca3af;
    padding: 0 4px;
}
