﻿:root {
    --primary: #ff5a1f;
    --text: #222;
    --muted: #6d6d73;
    --line: #e8e8eb;
    --surface: #f7f7f8;
    --white: #fff;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 8px 26px rgba(0, 0, 0, .08);
}


.page-container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

/* Main */
main {
    padding: 24px 0 56px;
}
.section {
    margin-top: 15px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 26px;
    letter-spacing: -.5px;
}

.section-title a {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

button{
    padding: 0;
    margin-right: 0;
    line-height: 0em;
}
button:hover{
    background: rgba(0, 0, 0, .92);
}

/* Hero carousel */
.hero {
    position: relative;
}

.hero-viewport {
    overflow: hidden;
    max-height: 314px;
}

.hero-track {
    display: flex;
    transition: transform .72s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 314px;
    overflow: hidden;
    background: #ddd;
}

.hero-slide img {
    width: 100%;
    height: 314px;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .67), rgba(0, 0, 0, .08) 62%, transparent);
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 7%;
    width: min(470px, 72%);
    color: var(--white);
    transform: translateY(-50%);
}

.hero-content h1 {
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.06;
    letter-spacing: -1.5px;
    margin-bottom: 2px;
    color: #fff;
}
a:active, a:focus, a:hover, a:visited{
    color: #666;
    -webkit-transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.hero-content p {
    font-size: clamp(17px, 2vw, 24px);
    margin-bottom: 24px;
}

.hero-content .hero-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    color: var(--text);
    background: var(--white);
    font-weight: 700;
    transition: transform .25s ease;
}

.hero-content .hero-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 0;
    font-weight: bold;
    font-size: 30px;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, .92);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(.88);
    transition:
            opacity .45s ease,
            visibility .45s ease,
            transform .45s ease,
            left .45s ease,
            right .45s ease;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero:hover .hero-arrow {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.hero:hover .hero-prev {
    left: -24px;
}

.hero:hover .hero-next {
    right: -24px;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 14px;
}

.hero-dot {
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: #d5d5da;
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
}

.hero-dot.active {
    width: 18px;
    background: #333;
}

/* Featured */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.featured-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #ddd;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition: transform .3s ease, box-shadow .3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.featured-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform .55s ease;
}

.featured-card:hover img {
    transform: scale(1.04);
}

.featured-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .66), transparent 68%);
}

.featured-copy {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: var(--white);
}

.featured-copy h3 {
    font-size: 20px;
    margin-bottom: 4px;
    color: #fff;
}

/* Brand cards */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.brand-card {
    min-width: 0;
    padding: 0;
    position: relative;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.brand-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--shadow);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 196px;
    margin-bottom: 2px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-badge {
    display: inline-block;
    margin-bottom: 7px;
    padding: 3px 8px;
    position: absolute;
    left: 0px;
    top: 0px;
    border-radius: 999px;
    color: #a33b00;
    background: #fff0e7;
    font-size: 11px;
    font-weight: 700;
}

.brand-card h3 {
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 15px;
    padding-left: 5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cashback {
    font-size: 14px;
    padding-left: 5px;
    font-weight: 800;
    color: #2d2828;
}

.old-rate {
    color: #9a9aa1;
    font-size: 12px;
    text-decoration: line-through;
}


@media (max-width: 1024px) {
    .brand-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {


    .featured-grid {
        grid-template-columns: 1fr;
    }

    .brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-slide,
    .hero-slide img {
        height: 310px;
        min-height: 310px;
    }

    .hero-arrow {
        display: none;
    }

}

@media (max-width: 480px) {
    .page-container {
        width: min(100% - 22px, 1200px);
    }
    .hero-content {
        left: 24px;
        width: calc(100% - 48px);
    }
    .hero-slide,
    .hero-slide img {
        height: 280px;
        min-height: 280px;
    }
    .section-title h2 {
        font-size: 22px;
    }
}

.all-brand-item span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:700}
.all-brand-item strong{flex:0 0 auto;color:var(--primary);font-size:13px}
.explore-brand-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px 18px;
}

.explore-brand-card {
    min-width: 0;
    color: var(--text);
}

.explore-brand-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #f1f1f3;
}

.explore-brand-media > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.explore-brand-card:hover .explore-brand-media > img {
    transform: scale(1.035);
}

.explore-brand-logo {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    max-width: calc(100% - 24px);
    height: 62px;
    padding: 0 12px;
    border-radius: 12px;
    color: #111;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .13);
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    line-height: 1.05;
}

.explore-brand-badge {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    padding: 4px 10px;
    border-radius: 10px 0 8px 0;
    color: #fff;
    background: #635bff;
    font-size: 12px;
    font-weight: 800;
}

.explore-brand-name {
    overflow: hidden;
    color: #5e6270;
    font-size: 15px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.explore-brand-rate {
    margin-top: 2px;
    color: #111;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.explore-brand-meta {
    margin-top: 1px;
    color: #646873;
    font-size: 13px;
    line-height: 1.3;
}

.explore-brand-meta span {
    text-decoration: line-through;
}

@media (max-width: 1200px) {
    .explore-brand-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .explore-brand-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 14px;
    }

    .explore-brand-logo {
        min-width: 62px;
        height: 52px;
        right: 9px;
        bottom: 9px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .explore-brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .explore-brand-name {
        font-size: 14px;
    }

    .explore-brand-rate {
        font-size: 15px;
    }
}


.brand-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 72px;
    color: #676b75;
    font-size: 14px;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e4e4e8;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: brandSpin .75s linear infinite;
}

.brand-load-end {
    display: none;
    padding: 28px 0 10px;
    color: #888b94;
    font-size: 14px;
    text-align: center;
}

.brand-load-sentinel {
    width: 100%;
    height: 2px;
}

.explore-brand-card.is-entering {
    opacity: 0;
    transform: translateY(18px);
}

.explore-brand-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .45s ease, transform .45s ease;
}

@keyframes brandSpin {
    to {
        transform: rotate(360deg);
    }
}

.brand-loading {
    display: none;
    min-height: 92px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: #666a74;
    font-size: 14px;
}

.brand-loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 20px;
}

.brand-loading-dots i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    animation: brandLoadingBounce 1.1s ease-in-out infinite;
}

.brand-loading-dots i:nth-child(2) {
    animation-delay: .14s;
}

.brand-loading-dots i:nth-child(3) {
    animation-delay: .28s;
}

@keyframes brandLoadingBounce {
    0%, 60%, 100% {
        opacity: .35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}