/* Theme Name: coupons
Version: 1.1
Author: Qi
*/

/* VARIABLES & RESET */
:root {
    --homepage-brand-main: #6c5ce7;
    --homepage-brand-secondary: #a29bfe;
    --homepage-accent: #fd79a8;
    --homepage-bg-dark: #2d3436;
    --homepage-text-main: #2d3436;
    --homepage-text-muted: #636e72;
    --homepage-success: #55efc4;
    --homepage-info: #00cec9;
    --homepage-danger: #ff7675;
    --homepage-card-bg: #ffffff;
    --homepage-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --homepage-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PURE CSS SEARCH ICON */
.homepage .icon-search {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid currentColor;
    border-radius: 50%;
    position: relative;
    transform: rotate(-45deg);
}

.homepage .icon-search::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 6px;
    width: 3px;
    height: 10px;
    background: currentColor;
}

/* ANIMATIONS */
@keyframes homepage-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes homepage-slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* HERO SECTION */
.homepage .hero {
    background: var(--homepage-bg-dark);
    padding: 100px 5% 150px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.homepage .hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top right, #f8fafc 50%, transparent 50%);
}

.homepage .hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--homepage-brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: homepage-slideIn 0.8s ease-out;
}

.homepage .hero-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* HERO SEARCH BAR */
.homepage .search-bar {
    max-width: 700px;
    margin: 2rem auto;
    position: relative;
    transition: var(--homepage-transition);
    display: flex;
    align-items: center;
}

.homepage .search-bar.active {
    transform: scale(1.02);
}

.homepage .search-bar input {
    width: 100%;
    padding: 1.5rem 100px 1.5rem 2rem;
    border-radius: 99px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 0 0 5px rgba(108, 92, 231, 0.2);
    outline: none;
}

.homepage .hero-search-btn {
    position: absolute;
    right: 10px;
    background: var(--homepage-brand-main);
    color: white;
    border: none;
    width: 80px;
    height: calc(100% - 20px);
    border-radius: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--homepage-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.homepage .hero-search-btn:hover {
    background: var(--homepage-accent);
    transform: scale(1.05);
}

.homepage .trending-tags {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--homepage-brand-secondary);
    line-height: 2.2;
}

.homepage .trending-tags a{
    color: inherit;
}

.homepage .tag {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--homepage-transition);
    display: inline-block;
}

.homepage .tag:hover {
    background: var(--homepage-brand-main);
    color: white;
}

/* BRAND CAROUSEL */
.homepage .brand-strip {
    background: white;
    padding: 2.5rem 0;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    box-shadow: var(--homepage-shadow-lg);
}

.homepage .brand-track {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.homepage .brand-logo-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.homepage .brand-logo {
    filter: grayscale(1);
    opacity: 0.6;
    transition: var(--homepage-transition);
    max-height: 40px;
    object-fit: cover;
}

.homepage .brand-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

/* CATEGORIES SECTION */
.homepage .category-section {
    background: #fff;
    padding: 4rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.homepage .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.homepage .cat-card {
    text-align: center;
    padding: 25px 15px;
    border-radius: 20px;
    background: #f8fafc;
    transition: var(--homepage-transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--homepage-text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.homepage .cat-card:hover {
    background: var(--homepage-brand-secondary);
    color: white;
    transform: translateY(-5px);
}

.homepage .cat-card svg {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    transition: var(--homepage-transition);
}
.homepage .cat-card:hover svg {
    transform: scale(1.1);
    /* 悬停时图标颜色会自动随文字变为白色，因为设置了 fill="currentColor" */
}

/* MAIN CONTENT */
.homepage .container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 20px;
}
.homepage .container .verification-status{
    font-size: 0.85rem;
    color: #719677;
    font-weight: 500;
    display: inline-block;
}

.homepage .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 10px;
}

.homepage .section-header a {
    color: var(--homepage-brand-main);
    font-weight: 600;
    text-decoration: none;
}

.homepage h2 {
    font-size: 2.2rem;
    color: var(--homepage-bg-dark);
    position: relative;
}

/* GRID SYSTEM */
.homepage .coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.homepage .coupon-card {
    background: var(--homepage-card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    position: relative;
    transition: var(--homepage-transition);
    display: flex;
    flex-direction: column;
}

.homepage .coupon-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--homepage-shadow-lg);
    border-color: var(--homepage-brand-main);
}

.homepage .coupon-card p{
    flex-grow: 1;
}

.homepage .badge {
    background: var(--homepage-success);
    color: #064e3b;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 10px;
}

.homepage .badge.verified { background: #e0f2fe; color: #0369a1; }
.homepage .badge.flash { background: var(--homepage-danger); color: white; }
.homepage .badge.deal { background: #fef3c7; color: #92400e; }

.homepage .card-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.homepage .store-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
}

.homepage .store-link:hover h3 {
    color: var(--homepage-brand-main);
}

.homepage .store-link h3{
    font-size: 16px;
}

.homepage .store-icon {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.homepage .store-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.homepage .discount-amt {
    font-size: 2rem;
    font-weight: 800;
    color: var(--homepage-brand-main);
    display: block;
}

.homepage .card-meta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    font-size: 0.85rem;
    color: var(--homepage-text-muted);
}

/* BUTTON VARIATIONS */
.homepage .btn-claim {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1rem;
    border-radius: 12px;
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--homepage-transition);
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
}

.homepage .btn-claim::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
}

.homepage .btn-code {
    background: var(--homepage-bg-dark);
}
.homepage .btn-code:hover {
    background: var(--homepage-brand-main);
}

.homepage .btn-direct {
    background: var(--homepage-info);
}
.homepage .btn-direct:hover {
    background: #00cec9;
}

.homepage .btn-claim:hover::after {
    animation: homepage-shine 0.6s;
}

.homepage .btn-claim.copied {
    background-color: var(--homepage-success) !important;
    color: #000 !important;
    letter-spacing: 2px;
}

/* NEWSLETTER BANNER */
.homepage .promo-banner {
    max-width: 1200px;
    margin: 4rem auto;
    background: linear-gradient(135deg, var(--homepage-brand-main), var(--homepage-info));
    border-radius: 30px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
}
.homepage .promo-banner .front-cf-turnstile{
    margin-top: 10px;
}

.homepage .promo-content h2 { display: block; font-size: 2.5rem; margin-bottom: 10px; color: #fff; }
.homepage .promo-content p { font-size: 1.1rem; opacity: 0.9; }

.homepage .promo-form {
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 15px;
    width: 400px;
}

.homepage .promo-form input {
    border: none;
    padding: 10px 15px;
    flex: 1;
    border-radius: 10px;
    outline: none;
}

.homepage .promo-form button {
    background: var(--homepage-bg-dark);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* FEATURES SECTION */
.homepage .features-bar {
    background: var(--homepage-brand-main);
    color: white;
    padding: 4rem 5%;
    margin: 4rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    text-align: center;
    gap: 40px;
}

.homepage .feature-item i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--homepage-success);
}

.homepage .feature-item strong {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.homepage .feature-item p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* FEATURED STORES */
.homepage .store-showcase {
    background: #f1f5f9;
    padding: 5rem 0;
}

.homepage .store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 20px;
}

.homepage .store-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--homepage-text-main);
    transition: var(--homepage-transition);
    border: 1px solid transparent;
}

.homepage .store-card:hover {
    transform: scale(1.03);
    border-color: var(--homepage-brand-main);
    box-shadow: var(--homepage-shadow-lg);
}

.homepage .store-thumb {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.homepage .store-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.homepage .store-info h4 { font-size: 1.2rem; margin-bottom: 5px; }
.homepage .store-info p { font-size: 0.85rem; color: var(--homepage-text-muted); }

/* SAVING GUIDES */
.homepage .guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.homepage .guide-article {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: var(--homepage-transition);
}

.homepage .guide-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--homepage-shadow-lg);
}

.homepage .guide-img {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.homepage .guide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.homepage .guide-body {
    padding: 25px;
}

.homepage .guide-tag {
    color: var(--homepage-brand-main);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.homepage .guide-body h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
}
.homepage .guide-body h3 a{
    text-decoration: inherit;
    color: inherit;
}

.homepage .guide-body p {
    color: var(--homepage-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.homepage .btn-read {
    text-decoration: none;
    font-weight: 600;
    color: var(--homepage-text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--homepage-transition);
}

.homepage .btn-read:hover {
    color: var(--homepage-brand-main);
    gap: 12px;
}

@media (max-width: 768px) {
    .homepage .hero {
        padding: 60px 5% 100px;
    }

    .homepage .search-bar input {
        padding: 1rem 70px 1rem 1.5rem;
        font-size: 1rem;
    }

    .homepage .hero-search-btn {
        width: 60px;
    }

    .homepage .trending-tags {
        margin-top: 1.5rem;
        line-height: 2.8;
    }

    .homepage .tag {
        margin-bottom: 8px;
    }

    .homepage .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .homepage .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: unset;
    }

    .homepage .store-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }

    .homepage .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .homepage .section-header a {
        align-self: flex-end;
        margin-top: 5px;
    }

    .homepage .section-header h2 {
        font-size: 1.8rem;
    }

    .homepage .promo-banner {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
        gap: 30px;
    }

    .homepage .promo-form {
        width: 100%;
    }
    .homepage .promo-form input{
        padding-left: 5px;
        padding-right: unset;
    }

    .homepage .coupon-grid {
        grid-template-columns: 1fr;
    }
}