:root {
    --primary: #2563eb;
    --secondary: #dc2626;
    --dark: #1e293b;
    --light: #f8fafc;
    --success: #16a34a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

/* Navigation */
nav {
    background: var(--dark);
    padding: 12px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-links a.active {
    background: var(--secondary);
}

/* Search Bar */
.search-bar {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 15px auto;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

/* Main Content */
main {
    padding: 30px 0;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
}

/* Brands Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.brand-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

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

.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 10px;
}

.brand-name {
    font-weight: 700;
    margin-bottom: 5px;
}

.coupon-count {
    font-size: 0.8rem;
    color: #666;
}

.category-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-top: 8px;
    display: inline-block;
}

/* Coupons */
.coupons-container {
    margin-top: 30px;
}

.coupon-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.expiry {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.discount {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.coupon-body {
    padding: 16px;
}

.coupon-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.coupon-desc {
    color: #666;
    margin-bottom: 15px;
}

.coupon-code-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #f9fafb;
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.coupon-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--primary);
    display: none;
}

.reveal-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    font-weight: 600;
}

.coupon-code-container.revealed .coupon-code {
    display: block;
}

.coupon-code-container.revealed .reveal-btn {
    opacity: 0;
    pointer-events: none;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
}

.copy-btn:hover {
    background: #1d4ed8;
}

.copy-btn.copied {
    background: var(--success);
}

/* Hot Deals */
.hot-deals {
    margin: 40px 0;
}

.deal-card {
    background: linear-gradient(to right, #ff4d4d, #f9cb28);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.deal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.deal-desc {
    margin-bottom: 15px;
    opacity: 0.9;
}

.deal-button {
    background: white;
    color: var(--secondary);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.deal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Blog Section */
.blog-section {
    margin: 50px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card img {
    width: 100%;
    height: auto;
}

.blog-content {
    padding: 20px;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.blog-card p {
    color: #555;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.read-more:hover {
    background: #1d4ed8;
}

/* Blog Post Page */
.blog-post {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.blog-post h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.blog-post img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
}

.blog-post p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.blog-meta span {
    margin-right: 15px;
    margin-bottom: 5px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Back Button */
.back-button {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        justify-content: space-around;
    }
    
    .nav-links li {
        margin: 5px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .brands-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    .search-bar {
        flex-direction: column;
        width: 100%;
    }

    .search-bar input,
    .search-bar button {
        width: 100%;
        margin: 5px 0;
        font-size: 0.9rem;
        padding: 10px;
    }

    .coupon-code-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
        margin: 10px 0 0 0;
        text-align: center;
    }

    .header-content .logo {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    main {
        padding: 20px 10px;
    }
}
