/* ==========================================================================
   Homepage (Pixel-Perfect Redesign)
   ========================================================================== */

/* Global Reset for Homepage Container */
.premium-home-layout {
    width: 100%;
    background: #FAFAFA;
}

.premium-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* Common Section Header */
.premium-section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
}

.premium-section-header.with-tabs {
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.view-all-link {
    position: absolute;
    right: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4B5563;
    text-decoration: none;
    background: #F3F4F6;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: #E5E7EB;
    color: #111827;
}

@media (max-width: 768px) {
    .premium-section-header {
        flex-direction: column;
        gap: 16px;
    }
    .view-all-link {
        position: static;
    }
}

/* ==========================================================================
   1. Hero Section
   ========================================================================== */
.premium-hero-section {
    width: 100%;
    margin-bottom: 24px;
}

.premium-hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1E3A8A; /* Dark Navy Blue */
    letter-spacing: -0.03em;
    margin: 0;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #4B5563;
    line-height: 1.6;
    max-width: 90%;
    margin: 0;
}

.hero-search-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 500px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 24px;
    font-size: 1rem;
    outline: none;
    color: #111827;
}

.hero-search-btn {
    background: #EF4444; /* Vibrant Red */
    color: #FFF;
    border: none;
    border-radius: 999px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-btn:hover {
    background: #DC2626;
}

.hero-popular-searches {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
}

.search-label {
    font-weight: 700;
    color: #111827;
}

.hero-popular-searches a {
    color: #6B7280;
    text-decoration: none;
    background: #F3F4F6;
    padding: 4px 12px;
    border-radius: 999px;
    transition: all 0.2s;
}

.hero-popular-searches a:hover {
    background: #E5E7EB;
    color: #111827;
}

.hero-stats-row {
    display: flex;
    gap: 32px;
    margin-top: 24px;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-coupons { background: #FEE2E2; color: #EF4444; }
.stat-icon-stores { background: #FEF3C7; color: #F59E0B; }
.stat-icon-users { background: #FFEDD5; color: #F97316; }

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-text strong {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
}

.stat-text span {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
}

.hero-right-column {
    position: relative;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-gradient-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(219,234,254,1) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-bag-graphic {
    position: relative;
    z-index: 1;
    width: 300px;
    animation: float 6s ease-in-out infinite;
}

.hero-floating-badge {
    position: absolute;
    bottom: 20%;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 2;
    animation: float 5s ease-in-out infinite reverse;
}

.badge-icon {
    width: 32px;
    height: 32px;
    background: #EFF6FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-text strong {
    font-size: 0.875rem;
    font-weight: 800;
    color: #111827;
}

.badge-text span {
    font-size: 0.75rem;
    color: #6B7280;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 1024px) {
    .premium-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-left-column {
        align-items: center;
    }
    .hero-search-wrapper {
        margin: 0 auto;
    }
    .hero-popular-searches, .hero-stats-row {
        justify-content: center;
    }
    .hero-right-column {
        min-height: 300px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .hero-stats-row {
        flex-direction: column;
        gap: 16px;
    }
}

/* ==========================================================================
   2. Promo Banner
   ========================================================================== */
.premium-promo-banner {
    width: 100%;
}

.promo-banner-inner {
    background: linear-gradient(90deg, #0F172A 0%, #1E3A8A 100%);
    border-radius: 16px;
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.promo-content h2 {
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.promo-content p {
    color: #93C5FD;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.promo-graphics {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100%;
    z-index: 1;
}

.promo-card-graphic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 120px;
}

.promo-coin-graphic {
    position: absolute;
    animation: float 4s ease-in-out infinite;
}

.coin-1 { top: 10%; left: 0; }
.coin-2 { bottom: 10%; right: 0; animation-delay: 1s; }

.promo-action {
    position: relative;
    z-index: 2;
}

.btn-promo-activate {
    display: inline-block;
    background: #EF4444;
    color: #FFF;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-promo-activate:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .promo-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 32px 24px;
    }
    .promo-graphics {
        position: relative;
        transform: none;
        left: 0;
        top: 0;
        height: 120px;
    }
}

/* ==========================================================================
   3. Top Categories
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 24px 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.cat-icon-wrap {
    width: 48px;
    height: 48px;
    background: #F8FAFC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.cat-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.cat-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.cat-count {
    font-size: 0.75rem;
    color: #6B7280;
}

.view-all-card {
    background: #F8FAFC;
    justify-content: center;
}

.cat-arrow {
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    color: #3B82F6;
}

@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   4. Popular Stores
   ========================================================================== */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
}

.store-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.store-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.store-logo-wrap {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.store-logo-placeholder {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.05em;
}

.store-logo-placeholder[data-brand="amazon"] { font-family: sans-serif; font-weight: normal; }
.store-logo-placeholder[data-brand="walmart"] { color: #0071CE; }
.store-logo-placeholder[data-brand="nike"] { font-style: italic; }
.store-logo-placeholder[data-brand="macy's"] { color: #E11A2B; font-weight: 400; }
.store-logo-placeholder[data-brand="sephora"] { text-transform: uppercase; letter-spacing: 2px; font-weight: 400; font-size: 1rem; }
.store-logo-placeholder[data-brand="aliexpress"] { color: #FF4747; font-weight: 800; }
.store-logo-placeholder[data-brand="best buy"] { color: #0046BE; font-weight: 900; }

.store-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.store-offer {
    font-size: 0.75rem;
    color: #6B7280;
}

@media (max-width: 1024px) {
    .stores-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .stores-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   5. Top Coupons & Deals
   ========================================================================== */
.coupons-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 32px;
}

.coupon-tab {
    background: none;
    border: none;
    padding: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    position: relative;
}

.coupon-tab.active {
    color: #1E3A8A;
}

.coupon-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #1E3A8A;
    border-radius: 3px 3px 0 0;
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.premium-coupon-card {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    align-items: center;
    transition: box-shadow 0.2s;
}

.premium-coupon-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.coupon-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px dashed #E5E7EB;
    padding-right: 24px;
}

.coupon-discount {
    font-size: 3rem;
    font-weight: 900;
    color: #1E3A8A;
    line-height: 1;
    letter-spacing: -0.02em;
}

.coupon-discount-type {
    font-size: 1rem;
    font-weight: 700;
    color: #6B7280;
    letter-spacing: 0.1em;
}

.coupon-middle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coupon-store {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4B5563;
}

.coupon-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.coupon-tags {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.tag-uses, .tag-new, .tag-ends {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-uses {
    background: #FEE2E2;
    color: #EF4444;
}

.tag-new {
    color: #111827;
}

.tag-ends {
    color: #6B7280;
}

.coupon-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.btn-show-code {
    display: flex;
    align-items: center;
    background: #EF4444;
    border: none;
    border-radius: 8px;
    height: 48px;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
    max-width: 160px;
}

.btn-text {
    flex: 1;
    color: #FFF;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0 16px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.btn-fragment {
    background: #FEE2E2;
    color: #111827;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 2px dashed #EF4444;
}

.see-details-link {
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 600;
    text-decoration: none;
}

.see-details-link:hover {
    color: #111827;
}

@media (max-width: 768px) {
    .premium-coupon-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }
    .coupon-left {
        border-right: none;
        border-bottom: 1px dashed #E5E7EB;
        padding-right: 0;
        padding-bottom: 16px;
    }
    .coupon-tags {
        justify-content: center;
    }
    .coupon-right {
        align-items: center;
    }
}

/* ==========================================================================
   6. Newsletter
   ========================================================================== */
.premium-newsletter-section {
    width: 100%;
}

.newsletter-inner {
    background: #FEF3C7; /* Light Yellow */
    border-radius: 16px;
    padding: 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
}

.newsletter-illustration {
    width: 100px;
}

.newsletter-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
}

.newsletter-content p {
    font-size: 1rem;
    color: #4B5563;
    margin: 0;
}

.newsletter-form-wrap {
    width: 100%;
    max-width: 400px;
}

.premium-newsletter-form {
    display: flex;
    background: #FFF;
    padding: 6px;
    border-radius: 8px;
}

.premium-newsletter-form input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    border-radius: 8px 0 0 8px;
}

.premium-newsletter-form button {
    background: #1E3A8A;
    color: #FFF;
    border: none;
    padding: 0 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .newsletter-inner {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
}

/* ==========================================================================
   7. Features
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #F8FAFC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-text h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
}

.feature-text p {
    font-size: 0.875rem;
    color: #4B5563;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   8. Magazine
   ========================================================================== */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.article-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
}

.article-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.article-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #F3F4F6;
}

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

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #6B7280;
    font-weight: 500;
}

.meta-dot {
    color: #D1D5DB;
}

@media (max-width: 1024px) {
    .magazine-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .magazine-grid { grid-template-columns: 1fr; }
}
