/* ========================================
   CHERRYTREE BRIEF INDEX - MODERN REDESIGN
   ======================================== */

/* --- Root Variables (Color Palette - Forest Green) --- */
:root {
    --ct-primary-gradient: linear-gradient(135deg, #4A9F40 0%, #1E7B3C 100%);
    --ct-primary-start: #4A9F40;
    --ct-primary-end: #1E7B3C;
    --ct-primary-rgb: 74, 159, 64;
    --ct-secondary-color: #FF6B6B;
    --ct-success-color: #10B981;
    --ct-text-primary: #111827;
    --ct-text-secondary: #4B5563;
    --ct-text-muted: #9CA3AF;
    --ct-bg-light: #F3F4F6;
    --ct-border-light: #E5E7EB;
    --ct-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ct-card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === HERO SECTION === */
.hero-section {
    background: var(--ct-primary-gradient);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    margin-top: 1.5rem; /* Spacing from header */
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-cta {
    display: inline-block;
    background: white;
    color: var(--ct-primary-start);
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: var(--ct-primary-end);
}

@media (min-width: 768px) {
    .hero-section {
        padding: 4rem 3rem;
        text-align: left;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-content {
        max-width: 60%;
    }
}

/* === STATS SECTION === */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--ct-card-shadow);
    border: 1px solid var(--ct-border-light);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ct-card-shadow-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.icon-campaigns { background: linear-gradient(135deg, #6366F1, #8B5CF6); }
.stat-icon.icon-users { background: linear-gradient(135deg, #10B981, #34D399); }
.stat-icon.icon-brands { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.stat-icon.icon-reviews { background: linear-gradient(135deg, #EF4444, #F87171); }

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ct-text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--ct-text-muted);
    font-weight: 500;
}

/* === CATEGORY SECTION (Refined) === */
.category-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.25rem;
    padding: 1rem 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.category-scroll-container::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .category-scroll-container {
        justify-content: center;
    }
}

.category-item {
    flex: 0 0 auto;
    width: 85px;
    text-decoration: none;
}

.category-card {
    background-color: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.05);
}

.category-icon-box {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.6rem;
    color: white !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.category-icon-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0));
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}

.category-icon-box i {
    font-size: 1.85rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
    position: relative;
    z-index: 2;
}

.category-label {
    font-weight: 600;
    color: var(--ct-text-secondary);
    font-size: 0.85rem;
    letter-spacing: -0.3px;
    margin-bottom: 0;
    white-space: nowrap;
}

/* Category Gradient Classes */
.cat-bg-food { background: linear-gradient(135deg, #FF9F43 0%, #FF512F 100%); }
.cat-bg-life { background: linear-gradient(135deg, #FFC107 0%, #FF8C00 100%); }
.cat-bg-beauty { background: linear-gradient(135deg, #FF9A9E 0%, #F6416C 100%); }
.cat-bg-travel { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.cat-bg-digital { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.cat-bg-culture { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.cat-bg-living { background: linear-gradient(135deg, #fda085 0%, #f6d365 100%); }
.cat-bg-community { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }

/* === SECTION HEADERS === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ct-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title .emoji {
    font-size: 1.1em;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ct-text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--ct-border-light);
    transition: all 0.2s ease;
}

.section-link:hover {
    background: var(--ct-bg-light);
    color: var(--ct-primary-start);
    border-color: var(--ct-primary-start);
}

/* === SWIPER OVERFLOW FIX === */
.swiper-theme-container {
    padding: 10px 0;
    /* 좌우로 넘치지 않도록 처리 */
    overflow-x: clip;
}

.swiper-theme-container .swiper {
    overflow: visible;
}

.swiper-theme-container .swiper-wrapper {
    padding: 5px 0;
}

/* === BRIEF CARD (Refined) === */
.brief-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--ct-border-light);
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ct-card-shadow);
}

.brief-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ct-card-shadow-hover);
    border-color: transparent;
}

.brief-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #f1f1f1;
    overflow: hidden;
}

.brief-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.brief-card:hover .brief-thumb {
    transform: scale(1.08);
}

.brief-badge-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.d-day-badge {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.d-day-badge.bg-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
}

.platform-badge {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.brief-content {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.brief-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ct-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9rem;
}

.brief-meta {
    font-size: 0.8rem;
    color: var(--ct-text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brief-price-box {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ct-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brief-price {
    font-weight: 800;
    color: var(--ct-primary-start);
    font-size: 1rem;
}

/* === PROMO BANNER (Refined) === */
.promo-banner {
    background: var(--ct-primary-gradient);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 40px rgba(255, 107, 107, 0.3);
}

.promo-banner-content {
    position: relative;
    z-index: 2;
    max-width: 65%;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.promo-banner::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.promo-banner-img {
    position: absolute;
    bottom: 0;
    right: 3%;
    height: 115%;
    z-index: 1;
    transform: rotate(-8deg) translateY(15px);
    transition: transform 0.4s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

.promo-banner:hover .promo-banner-img {
    transform: rotate(0deg) translateY(0);
}

/* === GUIDE CARDS === */
.guide-card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    box-shadow: var(--ct-card-shadow);
    transition: all 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ct-card-shadow-hover);
}

.guide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.guide-card:hover .guide-img {
    transform: scale(1.08);
}

.guide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 2rem 1.25rem 1rem;
    z-index: 2;
}

.guide-title {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

/* === UTILITY === */
.mt-section {
    margin-top: 2.5rem;
}

.mb-section {
    margin-bottom: 2.5rem;
}

/* === PRODUCT SWITCHER === */
.product-switcher-btn {
    transition: all 0.2s ease;
}

.product-switcher-btn:hover {
    color: var(--ct-primary-start) !important;
    transform: scale(1.1);
}

.product-switcher-item {
    transition: all 0.2s ease;
}

.product-switcher-item:hover {
    background: var(--ct-bg-light);
    transform: translateY(-2px);
}

/* === FILTER BAR (Brief List Page) === */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--ct-card-shadow);
    border: 1px solid var(--ct-border-light);
}

.filter-select-wrapper {
    position: relative;
}

.filter-select {
    appearance: none;
    background: var(--ct-bg-light);
    border: 1px solid var(--ct-border-light);
    border-radius: 50px;
    padding: 0.6rem 2.5rem 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ct-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--ct-primary-start);
    box-shadow: 0 0 0 3px rgba(var(--ct-primary-rgb), 0.15);
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ct-bg-light);
    border: 1px solid var(--ct-border-light);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--ct-primary-start);
}

.filter-chip input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--ct-primary-start);
}

.filter-chip .chip-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ct-text-secondary);
}

.filter-sort-btn {
    background: transparent;
    border: 1px solid var(--ct-border-light);
    border-radius: 50px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ct-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-sort-btn:hover {
    border-color: var(--ct-primary-start);
    color: var(--ct-primary-start);
}

.filter-sort-btn::after {
    margin-left: 0.5rem;
}