/* ... existing styles ... */

/* Color Variables */
:root {
    --primary: #1e3a5f;      /* Navy Blue */
    --secondary: #00b4a9;    /* Lake Green */
    --cta: #f97316;          /* Orange */
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--white);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a.active {
    color: var(--secondary);
    font-weight: 700;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    z-index: 1;
}

.lang-switcher::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    /* Custom Chevron Icon (Encoded SVG - Filled Triangle) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e3a5f'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
}

.lang-switcher select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.5rem 2.5rem 0.5rem 2.5rem; /* Left padding for globe, Right for arrow */
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%; /* Ensure it fills container if needed */
}

.lang-switcher select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(0, 180, 169, 0.1);
}

/* Hero Section */
.hero {
    background-image: url("../images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    text-align: center;
    padding: 4rem 1rem;
    position: relative;
}

/* Dark overlay so text stays readable over the image */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 40, 80, 0.52);
    pointer-events: none;
}

/* Keep hero content above the overlay */
.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}

.search-btn {
    background-color: var(--cta);
    color: var(--white);
    border: none;
    padding: 0 2rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-btn:hover {
    background-color: #ea580c;
}

/* Featured Deals Grid */
.deals-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Coupon Card */
.coupon-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    border: 1px solid #f1f5f9;
    height: 100%; /* Ensure full height for grid alignment */
}

.coupon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.store-logo {
    height: 30px;
    margin-bottom: 1rem;
}

.store-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.badge-verified {
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    margin-left: auto;
}

.coupon-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.store-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.875rem;
}

.coupon-title {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.coupon-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.coupon-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* Coupon Actions */
.coupon-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto; /* Push actions to bottom */
    align-items: center; /* Center horizontally */
    width: 100%; /* Ensure full width */
}

/* Code Container (for coupons with code) */
.code-container {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed var(--secondary);
    border-radius: 8px;
    background-color: #f0fdfa;
    overflow: hidden;
    cursor: pointer;
}

.code-text {
    flex: 1;
    padding: 0.75rem;
    font-family: monospace;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    user-select: all;
}

.btn-copy {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 0 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #0d9488;
}

.btn-copy.copied {
    background: #059669;
}

/* Primary Button (Affiliate Link) */
.btn-primary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--cta);
    color: var(--white);
    text-align: center;
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #ea580c;
}

.btn-full {
    width: 100%;
}

/* --- Stores Section --- */
.stores-section {
    padding: 4rem 0;
}

.stores-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.store-category-section {
    margin-top: 2rem;
}

.store-category-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.store-category-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--secondary), transparent);
    border-radius: 999px;
}

.store-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 45%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-color: var(--secondary);
}

.store-card-logo {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-card-logo img {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
}

.store-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-dark);
}

.store-card-cta {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.store-card-cta::after {
    content: "›";
    font-size: 0.85rem;
}

/* --- Store Detail Page --- */
.store-hero {
    background: radial-gradient(circle at top left, #e0f2fe 0, #f8fafc 45%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 3rem 0 2.5rem;
}

.store-hero-inner {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.store-hero-info {
    flex: 1;
    min-width: 260px;
}

.store-hero-logo {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.75rem;
    flex-shrink: 0;
}

.store-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.store-hero-info h1 {
    font-size: 2rem;
    color: var(--primary);
    margin: 0 0 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.store-hero-tag {
    font-size: 0.8rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.store-hero-desc {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 600px;
    margin: 0;
}

.store-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.store-breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}

.store-breadcrumb a:hover {
    text-decoration: underline;
}

.store-breadcrumb span {
    margin: 0 0.4rem;
}

/* Make subtitle left-aligned inside content sections (e.g. store deals) */
.deals-section .stores-subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: 720px;
    margin-bottom: 1.75rem;
}

.deals-section .section-title {
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .stores-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }

    .store-hero-inner {
        gap: 1.25rem;
    }

    .store-hero-info h1 {
        font-size: 1.5rem;
    }

    .deals-section .stores-subtitle {
        margin-bottom: 1.25rem;
    }
}

/* --- Guides Section --- */
.guides-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.guides-section-page {
    padding: 4rem 1rem;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.guides-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.guide-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    border: 1px solid #e2e8f0;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px -2px rgba(0,0,0,0.1);
}

.guide-image {
    height: 200px;
    overflow: hidden;
}

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

.guide-content {
    padding: 1.5rem;
}

.guide-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.guide-content h3 a {
    text-decoration: none;
    color: var(--text-dark);
}

.guide-content h3 a:hover {
    color: var(--primary);
}

.guide-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-more {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Article Page */
.article-container {
    max-width: 800px;
    margin: 4rem auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.article-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1.125rem;
    color: #334155;
}

.article-body h2 {
    color: var(--primary);
    margin-top: 2rem;
}

.article-body h3 {
    color: var(--text-dark);
    margin-top: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .coupon-card {
        padding: 1rem;
    }

    .deals-grid, .guides-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 4rem; /* Further increased gap for better separation */
        padding: 0 1rem;
    }
    
    .nav-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .logo {
        width: auto;
        justify-content: flex-start;
        order: 1;
    }

    .nav-container > nav {
        width: 100%;
        order: 3;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start; /* Align left */
        gap: 1rem;
        width: 100%;
        margin-top: 0.5rem;
        padding: 0; /* Remove default ul padding */
    }

    /* Minimalist Lang Switcher for Mobile */
    .lang-switcher {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #f1f5f9; /* Light background circle */
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0; /* Align right/natural */
        order: 2;
    }

    .lang-switcher i {
        position: static; /* Reset absolute positioning */
        transform: none;
        font-size: 1.2rem;
    }

    .lang-switcher::after {
        display: none; /* Hide the chevron arrow */
    }

    .lang-switcher select {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0; /* Invisible but clickable */
        padding: 0;
    }

    .article-container {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
}

/* --- Modern Deals Header & Filters --- */

/* 1. Title Styling: Big, Bold, and Clean */
.deals-section .section-title {
    font-size: 3rem; /* Larger text */
    font-weight: 800; /* Extra bold */
    color: var(--primary); /* Navy Blue */
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em; /* Tighter tracking looks more modern */
}

/* 2. Filter Bar Layout */
.filters-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem !important; /* Override inline styles */
    flex-wrap: wrap;
}

/* 3. The Modern Dropdown (The key change) */
.filter-select {
    /* Reset default browser styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Modern Shape & Size */
    background-color: #fff;
    border: 1px solid #e2e8f0; /* Very subtle border */
    border-radius: 12px; /* Soft rounded corners (Apple-style) */
    padding: 12px 48px 12px 20px; /* Space for text + arrow */
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    min-width: 180px;
    
    /* Shadows for depth */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    
    /* Custom Chevron Icon (Encoded SVG - Filled Triangle) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e3a5f'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

/* Hover Effect: Lifts up slightly with a teal glow */
.filter-select:hover {
    transform: translateY(-2px);
    border-color: var(--secondary); /* Teal border */
    box-shadow: 0 10px 15px -3px rgba(0, 180, 169, 0.15), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Focus Effect: Clean outline */
.filter-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 180, 169, 0.2); /* Teal Glow Ring */
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .filters-bar {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-select {
        width: 100%; /* Full width on phone */
        padding: 14px 20px; /* Larger touch target */
    }
}

/* ─── Skeleton Loading ──────────────────────────────────────────────────────── */

@keyframes skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.4s infinite linear;
    border-radius: 6px;
}

/* Coupon card skeleton */
.coupon-card-skeleton {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coupon-card-skeleton .sk-logo  { width: 80px;  height: 28px; }
.coupon-card-skeleton .sk-badge { width: 60px;  height: 18px; margin-left: auto; }
.coupon-card-skeleton .sk-row   { display: flex; align-items: center; gap: 0.5rem; }
.coupon-card-skeleton .sk-title { width: 75%;  height: 22px; margin: 0.25rem 0; }
.coupon-card-skeleton .sk-desc  { width: 100%; height: 14px; }
.coupon-card-skeleton .sk-desc2 { width: 80%;  height: 14px; }
.coupon-card-skeleton .sk-meta  { width: 50%;  height: 12px; }
.coupon-card-skeleton .sk-code  { width: 100%; height: 44px; border-radius: 8px; }
.coupon-card-skeleton .sk-btn   { width: 100%; height: 44px; border-radius: 8px; }

/* Guide card skeleton */
.guide-card-skeleton {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.guide-card-skeleton .sk-image   { width: 100%; height: 200px; border-radius: 0; }
.guide-card-skeleton .sk-body    { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.guide-card-skeleton .sk-gtitle  { width: 80%; height: 20px; }
.guide-card-skeleton .sk-gtext   { width: 100%; height: 13px; }
.guide-card-skeleton .sk-gtext2  { width: 65%; height: 13px; }
.guide-card-skeleton .sk-glink   { width: 90px; height: 14px; margin-top: 0.25rem; }
