* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: #f9fafb;
    color: #111827;
    -webkit-font-smoothing: antialiased
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto
}

a {
    color: inherit
}

#site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #030712;
    color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .3)
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    color: #030712;
    display: grid;
    place-items: center
}

.header-inner nav {
    display: flex;
    gap: 20px
}

.header-inner nav a {
    text-decoration: none;
    color: #cbd5e1;
    font-size: .9rem
}

.header-inner nav a:hover {
    color: #fff
}

#hero {
    background: #030712;
    color: #fff;
    padding: 80px 0 72px;
    text-align: center;
    position: relative;
    overflow: hidden
}

#hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 0);
    background-size: 40px 40px
}

.hero-inner {
    position: relative
}

.hero-badge {
    display: inline-flex;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase
}

.hero-inner h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.05;
    margin: 20px 0 16px;
    font-weight: 900
}

.hero-inner>p {
    color: #9ca3af;
    max-width: 650px;
    margin: 0 auto 34px;
    line-height: 1.7
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    color: #9ca3af;
    font-size: .85rem
}

.trust-badges span::first-letter {
    color: var(--accent)
}

.main-content {
    padding: 54px 0 72px
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px
}

.section-heading h2 {
    font-size: 1.8rem;
    margin: 0 0 7px
}

.section-heading p {
    margin: 0;
    color: #6b7280
}

.search-wrap {
    position: relative;
    width: min(100%, 390px)
}

.search-wrap input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 12px 42px 12px 17px;
    font: inherit;
    outline: none;
    background: #fff
}

.search-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent)
}

#clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer
}

#toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px
}

#cat-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.cat-btn {
    border: 0;
    border-radius: 999px;
    padding: 7px 15px;
    background: #e5e7eb;
    color: #4b5563;
    font-weight: 700;
    cursor: pointer
}

.cat-btn.active {
    background: #111827;
    color: #fff
}

#sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 24px
}

.product-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    transition: .25s
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .12)
}

.card-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    /* background: #f3f4f6; */
    overflow: hidden
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .4s
}

.product-card:hover img {
    transform: scale(1.035)
}

.badge-product {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800
}

.badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc2626;
    color: #fff;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800
}

.card-body {
    padding: 18px 19px 20px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.card-category {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent-dark);
    font-weight: 800;
    margin-bottom: 6px
}

.card-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 7px
}

.card-title a {
    text-decoration: none
}

.merchant {
    color: #9ca3af;
    font-size: .78rem;
    margin: 0 0 9px
}

.card-desc {
    color: #6b7280;
    font-size: .84rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 16px
}

.card-footer-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #f0f1f3;
    padding-top: 14px
}

.price {
    font-size: 1.35rem;
    font-weight: 900
}

.original-price {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: .78rem;
    margin-left: 4px
}

.button,
.btn-deal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    padding: 10px 15px;
    cursor: pointer
}

.button:hover,
.btn-deal:hover {
    background: var(--accent-hover)
}

.state-box {
    text-align: center;
    padding: 70px 20px;
    color: #6b7280
}

.state-box h1 {
    color: #111827
}

.state-box button {
    display: block;
    margin: 14px auto;
    border: 0;
    background: none;
    color: var(--accent-dark);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline
}

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

.pagination button {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer
}

.pagination button.active {
    background: #111827;
    color: #fff
}

.pagination button:disabled {
    opacity: .45;
    cursor: not-allowed
}

#result-count {
    font-size: .86rem;
    color: #6b7280;
    margin-bottom: 16px
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: .85rem;
    margin-bottom: 28px
}

.breadcrumbs a {
    color: var(--accent-dark)
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 1.15fr;
    gap: 54px;
    background: #fff;
    border: 1px solid #eceff2;
    border-radius: 22px;
    padding: 34px
}

.product-detail-image {
    background: #f5f6f7;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.product-detail h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin: 10px 0 8px
}

.detail-price {
    font-size: 2rem;
    font-weight: 900;
    margin: 22px 0
}

.detail-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #4b5563
}

.deal-button {
    font-size: 1rem;
    padding: 14px 22px;
    margin-top: 10px
}

.small-print {
    color: #9ca3af;
    font-size: .75rem;
    line-height: 1.5;
    margin-top: 16px
}

.prose {
    max-width: 760px;
    line-height: 1.8
}

.prose h1 {
    font-size: 2.4rem
}

.prose h2 {
    margin-top: 34px
}

#site-footer {
    background: #030712;
    color: #6b7280;
    padding: 46px 0 22px
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px
}

.footer-grid strong {
    color: #fff
}

.footer-grid p {
    font-size: .8rem;
    line-height: 1.65
}

.copyright {
    text-align: center;
    border-top: 1px solid #1f2937;
    margin-top: 22px;
    padding-top: 20px;
    font-size: .75rem
}

@media(max-width:760px) {
    #hero {
        padding: 58px 0 52px
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column
    }

    .search-wrap {
        width: 100%
    }

    .product-detail {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 28px
    }

    .footer-grid {
        grid-template-columns: 1fr
    }

    .header-inner nav {
        gap: 12px
    }

    .main-content {
        padding-top: 36px
    }
}