:root {
    /* Color Palette - Premium International Theme */
    --primary: #2563eb;       /* Royal Blue */
    --primary-dark: #1e40af;  /* Deep Blue */
    --primary-light: #60a5fa; /* Light Blue */
    --secondary: #0f172a;     /* Slate Dark */
    --accent: #f59e0b;        /* Amber/Orange for CTAs */
    --accent-hover: #d97706;
    
    --bg: #f0f2f5;            /* Clean Slate Background for high contrast */
    --surface: #ffffff;       /* Pure White Surface for containers */
    --text: #334155;          /* Slate 700 for body text */
    --text-heading: #0f172a;  /* Slate 900 for headings */
    --text-muted: #64748b;    /* Slate 500 for secondary text */
    --border: #dae1e7;        /* Slightly more defined border */
    
    --success: #10b981;
    --error: #ef4444;
    
    /* Shadows - Refined for depth */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px -5px rgba(0, 0, 0, 0.1), 0 5px 15px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    --bg-light: #f1f5f9;      /* Light Background for sections */
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 72px;
}

/* Global Layout & Base Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    margin: 0;
    padding: 0;
    position: relative;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg); 
    color: var(--text); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    display: block;
    height: var(--header-height);
}

main {
    width: 100%;
}

section, header, footer, main, nav {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--primary-dark); }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    box-sizing: border-box;
}

/* Header */
.site-header { 
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed; 
    top: 0; 
    z-index: 1000; 
    height: var(--header-height);
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.header-content { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 1rem; 
    width: 100%;
    height: 100%;
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
}

.logo:hover {
    transform: scale(1.02);
}

/* Logo: crop the padding out of a square asset, with a real layout box.
   ---------------------------------------------------------------------------
   The file is 1024x1024 and the artwork inside it measures 807x304 at offset
   (142, 317) — 70% of the image is empty. Two consequences were being worked
   around badly:

     * at true proportions the wordmark is ~15px tall in a 72px header, so it
       had been given `transform: scale(2.5)` to look right;
     * a transform paints outside the layout box, so flex reserved the small
       box and the enlarged logo was drawn straight over the search field.

   .logo-mark is a window onto the artwork alone. The image is scaled up inside
   it and offset so the padding falls outside the window, which is clipped. The
   window IS the layout box, so neighbours are laid out around what is actually
   visible and nothing can overlap again.

   The offsets are percentages of the window, derived from the asset:
     width  1024/807 = 126.9%      left -142/807 = -17.6%
     height  ratio via top          top  -317/304 = -104.3%
   Change --logo-h alone and the rest follows. */
.site-header .logo {
    --logo-h: 44px;                    /* visible wordmark height */
}

.site-header .logo-mark {
    display: block;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;                    /* the search box shrinks first, never the brand */
    height: var(--logo-h);
    width: calc(var(--logo-h) * 2.655); /* 807 / 304, the artwork's aspect ratio */
}

.site-header .logo-mark img {
    position: absolute;
    width: 126.9%;                     /* 1024 / 807 */
    height: auto;
    left: -17.6%;                      /* 142 / 807 */
    top: -104.3%;                      /* 317 / 304 */
    max-width: none;                   /* beats any global img{max-width:100%} */
}


.logo span {
    background: linear-gradient(135deg, var(--secondary) 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.logo-icon {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    position: relative;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.25);
    border: 1px solid rgba(255,255,255,0.1);
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.search-box { 
    flex: 0 1 600px;
    margin: 0;
    display: block;
}

.search-wrapper { 
    position: relative; 
    width: 100%; 
}

.search-wrapper input { 
    width: 100%; 
    padding: 0.7rem 1rem 0.7rem 2.8rem; 
    border: 1.5px solid var(--border); 
    border-radius: 50px; 
    font-size: 0.95rem;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.search-wrapper input:focus { 
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    outline: none;
}

.search-wrapper::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    z-index: 2;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-heading); font-weight: 600; font-size: 0.95rem; position: relative; }
.nav-links a:hover, .nav-links .active { color: var(--primary); }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-heading);
    cursor: pointer;
    padding: 0.5rem;
    transition: 0.2s;
}

.mobile-menu-toggle:hover { color: var(--primary); }

/* Hero Section */
.hero { 
    margin-top: 0 !important;
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white; 
    padding: 6rem 0 8rem; 
    text-align: center; 
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 2rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero { clip-path: none; padding-bottom: 4rem; width: 100%; }
}

.hero h1 { 
    font-size: 3rem; 
    font-weight: 800; 
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 900px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-search-box {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 50; /* Higher than floating icons */
}

.hero-search-box form {
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.hero-search-box input {
    width: 100%;
    padding: 0 1.5rem 0 3rem;
    border: none;
    font-size: 1.1rem;
    background: transparent;
    color: var(--text);
    height: 54px;
    min-width: 0;
}

.hero-search-box input:focus { outline: none; }

.hero-search-box button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    height: 54px;
    white-space: nowrap;
}

.hero-search-box button:hover { 
    background: var(--accent-hover); 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: scale(1.02);
}

@media (max-width: 576px) {
    .hero-search-box form {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
        gap: 10px;
    }
    .search-input-wrapper {
        width: 100%;
    }
    .hero-search-box input {
        background: var(--bg-light);
        border-radius: 12px;
        height: 50px;
        padding-left: 3rem;
        font-size: 1rem;
    }
    .hero-search-box button {
        width: 100%;
        border-radius: 12px;
        height: 50px;
        font-size: 1.1rem;
    }
    .search-input-wrapper::before {
        left: 1.25rem;
        font-size: 0.9rem;
    }
}

/* Section Standard Styles */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-heading);
}
.section-title i { color: var(--primary); }

.content-section { margin-bottom: 4rem; padding: 2rem 0; }
.content-section h2 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--text-heading); font-weight: 800; }
.content-section p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; max-width: 900px; }

/* Intro & Trending Sections */
.intro-section { text-align: center; max-width: 800px; margin: 0 auto 4rem; }
.trending-section { background: white; padding: 3rem; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }

.trending-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.trend-tag { 
    background: #fffbeb; 
    color: #b45309; 
    padding: 0.5rem 1rem; 
    border-radius: var(--radius-full); 
    font-weight: 600; 
    font-size: 0.9rem; 
    border: 1px solid #fcd34d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.trend-tag i { color: #f59e0b; }

/* Coupon List Grid */
.coupon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); gap: 1.5rem; margin-bottom: 4rem; }
@media (min-width: 768px) {
    .coupon-list { grid-template-columns: repeat(auto-fill, minmax(48%, 1fr)); }
}

.coupon-card { 
    background: white; 
    border-radius: var(--radius); 
    padding: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 1.5rem; 
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.coupon-card:hover { 
    border-color: var(--primary-light); 
    box-shadow: var(--shadow-lg); 
    transform: translateY(-4px); 
}
.coupon-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: var(--primary);
    opacity: 0;
    transition: 0.3s;
}
.coupon-card:hover::before { opacity: 1; }

.store-logo { 
    width: 150px; height: 150px; 
    background: white; 
    border-radius: var(--radius); 
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    flex-shrink: 0;
}
.store-logo img { width: 100%; height: 100%; object-fit: contain; }

.coupon-content { flex: 1; min-width: 0; }
.store-name { 
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.brand-label {
    font-size: 0.85rem; font-weight: 800; 
    color: var(--text-heading); 
    text-transform: uppercase; 
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.verified-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    white-space: nowrap;
}
.coupon-title { 
    font-size: 1.25rem; font-weight: 700; color: var(--text-heading); 
    margin-bottom: 0.5rem; line-height: 1.3;
}
.coupon-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; }
.meta-item i { margin-right: 0.4rem; }
.success-rate { color: var(--success); font-weight: 600; background: #ecfdf5; padding: 2px 8px; border-radius: 4px; }

.coupon-action { width: 140px; }
.btn-copy { 
    background: var(--primary); color: white; border: none; 
    padding: 1rem; width: 100%; border-radius: var(--radius); 
    font-weight: 700; cursor: pointer; text-align: center;
    position: relative; overflow: hidden;
    transition: all 0.2s;
}
.btn-copy:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.btn-copy.copied { background: var(--success); }
.btn-copy .label { display: block; font-size: 0.7rem; text-transform: uppercase; opacity: 0.9; margin-bottom: 2px; }
.btn-copy .code-text { font-family: monospace; font-size: 1.1rem; letter-spacing: 0.05em; display: block; }

/* Categories */
.categories-section { margin-bottom: 4rem; }
.category-highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.cat-item { 
    background: white; border: 1px solid var(--border); padding: 0; 
    border-radius: var(--radius); transition: all 0.3s ease;
    overflow: hidden;
}
.cat-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.75rem 1.25rem;
    gap: 1.25rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
    width: 100%;
}
.cat-item a span {
    font-weight: 700;
    color: var(--text-heading);
    font-size: 0.95rem;
    line-height: 1.2;
}
.cat-item i { 
    font-size: 1.5rem; 
    color: var(--primary); 
    background: #eff6ff; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0; 
    transition: all 0.3s ease;
}
.cat-item:hover i { background: var(--primary); color: white; transform: rotate(10deg); }
.cat-item:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--primary); }

/* Trust Grid */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.trust-item { text-align: center; padding: 1.5rem; background: white; border-radius: 50px; border: 1px solid var(--border); transition: 0.3s; }
.trust-item:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.trust-icon { width: 44px; height: 44px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin: 0 auto 1rem; }
.trust-item h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--text-heading); }
.trust-item p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5; }


/* Steps */
.how-to-section { background: var(--surface); padding: 4rem 2rem; border-radius: var(--radius-lg); text-align: center; }
.steps-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; margin-top: 3rem; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 200px; }
.step-num { width: 40px; height: 40px; background: var(--secondary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.step-item p { font-size: 1rem; font-weight: 600; color: var(--text-heading); }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.review-card { background: white; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); }
.review-stars { color: #f59e0b; margin-bottom: 1rem; }
.review-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.review-text { font-style: italic; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Stores Grid - Compact for larger lists */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; margin: 3rem 0; }
.store-item { 
    background: white; border: 1px solid var(--border); border-radius: var(--radius); 
    padding: 1rem; text-align: center; color: var(--text-heading); transition: 0.3s; 
}
.store-item:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.store-item .logo { width: 48px; height: 48px; margin: 0 auto 0.75rem; border-radius: 8px; overflow: hidden; }
.store-item .logo img { width: 100%; height: 100%; object-fit: contain; }
.store-item .name { font-weight: 700; font-size: 0.85rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-item .domain { font-size: 0.7rem; color: var(--text-muted); opacity: 0.8; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* CTA Box */
.cta-box { 
    background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%); 
    color: white; padding: 4rem 2rem; border-radius: var(--radius-lg); text-align: center; margin-bottom: 4rem;
}
.cta-box h2 { color: white; margin-bottom: 1rem; }
.cta-box p { color: #cbd5e1; max-width: 600px; margin: 0 auto 1.5rem; }
.cta-highlight { font-size: 1.25rem; font-weight: 700; color: var(--accent); margin-top: 2rem; }

/* FAQ */
.faq-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem; 
    margin-top: 2rem; 
}
.faq-item { background: white; padding: 2rem; border-radius: var(--radius); border-left: 4px solid var(--primary); box-shadow: var(--shadow-sm); }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--text-heading); }
.faq-item p { margin: 0; font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--secondary); color: white; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-brand { 
    font-size: 1.8rem; 
    font-weight: 800; 
    margin-bottom: 1rem; 
    display: block; 
    color: white;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}
.footer-desc { color: #94a3b8; font-size: 0.95rem; line-height: 1.6; }
.footer-links h4 { color: white; font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #cbd5e1; font-size: 0.95rem; transition: 0.2s; }
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; text-align: center; color: #64748b; font-size: 0.9rem; }

/* Store Detailed Coupon View */
.coupon-detailed {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
}
.coupon-detailed:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); border-color: var(--primary-light); }
.coupon-detailed::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--primary); z-index: 10; }

.coupon-detailed-header { display: flex; gap: 1.5rem; align-items: flex-start; padding: 2rem 2rem 1rem; }

.discount-badge {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white; width: 100px; height: 100px; border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
    text-align: center; line-height: 1;
}
.discount-badge .amount { font-size: 2.25rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; display: block; }
.discount-badge .type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-top: 2px; opacity: 0.9; letter-spacing: 0.05em; display: block; }

.coupon-detailed-info h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--text-heading); line-height: 1.4; }
.coupon-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; color: var(--text-muted); }

.coupon-actions-row {
    display: flex; align-items: center; gap: 2rem;
    margin-top: 1rem; padding: 1.5rem 2rem; background: #f8fafc; border-top: 1px solid var(--border);
}

.code-display { display: flex; align-items: center; gap: 1rem; background: white; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-weight: 700; font-family: monospace; font-size: 1.1rem; }
.vote-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-left: auto;
    padding-left: 2rem;
    border-left: 1px solid #e2e8f0;
}

.vote-btn-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vote-text {
    font-weight: 700;
    color: var(--text-heading);
    white-space: nowrap;
}

.vote-btn {
    background: white;
    border: 1.5px solid #e2e8f0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.vote-btn.yes:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.vote-btn.no:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}


/* Category Tags */
.category-cloud { display: flex; flex-wrap: wrap; gap: 1rem; margin: 3rem 0; }
.category-tag { 
    background: white; border: 1px solid var(--border); padding: 0.75rem 1.5rem; 
    border-radius: var(--radius-full); font-size: 1rem; font-weight: 600;
    color: var(--text-muted); transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.category-tag:hover, .category-tag.active { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }

.sort-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    background-color: white;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' 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 0.7rem center;
    background-size: 1em;
    appearance: none;
    min-width: 140px;
}
.sort-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

/* Admin */
.admin-card { background: white; border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-group { margin-bottom: 2rem; }
.form-group label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--text-heading); }
.form-control { 
    width: 100%; padding: 0.875rem 1.25rem; border: 1px solid var(--border); 
    border-radius: var(--radius); font-size: 1rem; background: #fff; color: var(--text);
}

.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.75rem; border-radius: var(--radius); font-weight: 700; cursor: pointer; border: none; font-size: 1rem; font-family: 'Outfit', sans-serif; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); transition: all 0.2s ease-in-out;}
.btn-primary:hover { background: var(--primary); }
.btn-secondary { background: #f1f5f9; color: var(--text); }
.btn-secondary:hover { background: #e2e8f0; }

.alert { padding: 1.25rem 1.5rem; border-radius: var(--radius); font-weight: 600; margin-bottom: 2rem; display: flex; align-items: center; gap: 1rem; }
.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fee2e2; }
.alert-success { background: #ecfdf5; color: var(--success); border: 1px solid #d1fae5; }

/* Search Dropdown */
.search-wrapper { position: relative; width: 100%; }
.search-dropdown {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: #fff;
    border: 1px solid #e0e0e0; border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2); max-height: 450px;
    overflow-y: auto; z-index: 9999; display: none;
}
.search-result-item { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; color: var(--text); cursor: pointer; text-decoration: none; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8f9ff; }
.search-result-logo { width: 36px; height: 36px; object-fit: contain; margin-right: 12px; border-radius: 6px; flex-shrink: 0; }
.search-result-info { flex: 1; min-width: 0; text-align: left; }
.search-result-name { font-weight: 700; font-size: 0.95rem; color: var(--text-heading); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-domain { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-arrow { color: var(--border); font-size: 0.8rem; margin-left: 10px; }
@media (max-width: 768px) {
    .search-dropdown { 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        width: 100%; 
        max-height: 400px; 
        margin-top: 10px;
        z-index: 99999;
    }
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.feature-list i {
    color: var(--success);
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.cat-pill {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-pill i {
    color: var(--primary);
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.benefit-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.benefit-item i {
    color: var(--primary);
}

/* Search Page Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
}

.tip-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Results Header */
.results-header {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.results-header p {
    margin: 0;
    color: var(--text-muted);
}

.results-header strong {
    color: var(--primary);
    font-size: 1.25rem;
}
/* Page Header Modern */
.page-header-modern {
    background: linear-gradient(135deg, var(--primary) 0%, #295396 100%);
    color: white; padding: 5rem 0; text-align: center; margin-bottom: 3rem;
    position: relative; overflow: hidden;
}
.page-header-modern::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.2), transparent 40%);
    pointer-events: none;
}
.page-header-modern h1 { font-size: 2.5rem; margin-bottom: 1rem; color: white; font-weight: 800; max-width: 850px; margin-left: auto; margin-right: auto; line-height: 1.2; }
.page-header-modern p { max-width: 850px; margin: 0 auto 1rem; color: #cbd5e1; font-size: 1.1rem; line-height: 1.7; }

/* Search Layout */
.search-page-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
}

/* Sidebar */
.search-sidebar { 
    position: sticky; 
    top: 100px; 
    align-self: start;
    height: fit-content;
    z-index: 10;
}
.sidebar-box {
    background: white; border-radius: var(--radius);
    border: 1px solid var(--border); padding: 1.5rem;
    margin-bottom: 2rem; box-shadow: var(--shadow-sm);
}
.sidebar-box h3 { 
    font-size: 1.1rem; margin-bottom: 1.25rem; 
    border-bottom: 1px solid var(--bg); padding-bottom: 1rem; 
    color: var(--text-heading); display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-box h3 i { color: var(--accent); }

.top-stores-list { display: flex; flex-direction: column; gap: 0.5rem; }
.top-store-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem; border-radius: var(--radius);
    transition: 0.2s; color: var(--text); background: transparent;
}
.sidebar-deals-column { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-deal-card { 
    display: flex; gap: 1rem; align-items: flex-start; padding: 1rem;
    background: #f8fafc; border: 1px solid var(--border); border-radius: 12px;
    transition: all 0.3s ease;
}
.sidebar-deal-card:hover { background: white; border-color: var(--primary-light); transform: scale(1.02); box-shadow: var(--shadow-sm); }
.sidebar-deal-logo { width: 50px; height: 50px; flex-shrink: 0; background: white; border-radius: 8px; border: 1px solid var(--border); padding: 5px; }
.sidebar-deal-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-deal-info { flex: 1; min-width: 0; }
.sidebar-store-name { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 2px; }
.sidebar-deal-title { font-size: 0.9rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.5rem; line-height: 1.3; }
.sidebar-deal-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.sidebar-discount-pill { font-size: 0.7rem; font-weight: 800; color: var(--success); background: #ecfdf5; padding: 2px 8px; border-radius: 4px; }
.sidebar-deal-link { font-size: 0.75rem; font-weight: 700; color: var(--primary); text-decoration: underline; }
.top-store-item:hover { background: var(--bg-light); transform: translateX(4px); color: var(--primary); }
.top-store-item .rank { 
    font-weight: 800; color: #cbd5e1; font-size: 1.2rem; width: 24px; text-align: center; font-family: 'Outfit', sans-serif;
}
.top-store-item:nth-child(1) .rank { color: #fbbf24; }
.top-store-item:nth-child(2) .rank { color: #94a3b8; }
.top-store-item:nth-child(3) .rank { color: #b45309; }

.logo-mini {
    width: 40px; height: 40px; background: white; border: 1px solid var(--border);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    padding: 2px; flex-shrink: 0; box-shadow: var(--shadow-sm); overflow: hidden;
}
.logo-mini img { width: 100%; height: 100%; object-fit: contain; }
.logo-mini span { font-weight: 800; color: var(--primary); font-size: 1rem; line-height: 1; text-transform: uppercase; }
.top-store-item .name { font-weight: 600; font-size: 0.95rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-store-item .save { font-size: 0.75rem; color: var(--success); font-weight: 700; background: #ecfdf5; padding: 2px 8px; border-radius: 99px; }

/* Search Main Area */
.search-main { min-width: 0; }
.az-section { background: white; padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2rem; }
.az-section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.categories-info { background: #eff6ff; padding: 2.5rem; border-radius: var(--radius-lg); border: 1px solid #bfdbfe; margin-bottom: 2rem; }
.categories-info h2 { color: #1e40af; }

/* Store Result Card New */
.stores-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.store-result-card-new {
    background: white; border-radius: var(--radius-lg); border: 1px solid var(--border);
    overflow: hidden; transition: all 0.3s ease; display: block;
    box-shadow: var(--shadow-sm); margin-bottom: 20px;
    text-decoration: none; color: inherit; position: relative;
}
.store-result-card-new:hover { 
    transform: translateY(-4px); box-shadow: var(--shadow-lg); 
    border-color: var(--primary-light);
}

.store-card-banner { height: 120px; width: 100%; overflow: hidden; background: #f1f5f9; position: relative; }
.store-card-banner::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.05));
}
.store-card-banner img { width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: 0.5s; }
.store-result-card-new:hover .store-card-banner img { transform: scale(1.05); }

/* Fallback pattern for banner if image fails or empty (handled via default image ideally) */
.store-card-banner.no-img {
    background-color: #e5e5f7;
    background-image:  radial-gradient(#444cf7 0.5px, transparent 0.5px), radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.5;
}

.store-card-content { padding: 0 1.5rem 1.5rem; position: relative; }
.store-card-header-new { display: flex; gap: 1.25rem; margin-bottom: 1rem; align-items: flex-start; }

.store-icon-medium {
    width: 72px; height: 72px; background: white; border-radius: 16px;
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    padding: 8px; margin-top: -36px; position: relative; z-index: 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.store-icon-medium img { width: 100%; height: 100%; object-fit: contain; }

.store-info { flex: 1; padding-top: 1rem; }
.store-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; color: var(--text-heading); }
.store-category { 
    font-size: 0.8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.4rem; 
    background: var(--bg-light); padding: 2px 8px; border-radius: 4px;
}

.store-description { 
    font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; 
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 3em;
}

.store-stats { 
    display: flex; gap: 0; margin-bottom: 1.5rem; padding: 1rem 0; 
    border-top: 1px solid var(--bg); border-bottom: 1px solid var(--bg);
    background: #fdfdfd; border-radius: 8px;
}
.stat-item { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.25rem; font-size: 0.8rem; color: var(--text-muted); border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-item strong { color: var(--text-heading); font-size: 1.1rem; font-weight: 800; }
.stat-item i { color: var(--primary); margin-bottom: 2px; font-size: 1rem; }

.store-card-footer { display: flex; justify-content: flex-end; align-items: center; }
.view-deals-btn { 
    background: var(--secondary); color: white; padding: 0.75rem 1.5rem;
    border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; 
    display: flex; align-items: center; gap: 0.5rem; transition: 0.2s;
}
.store-result-card-new:hover .view-deals-btn { background: var(--primary); gap: 0.75rem; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

/* Mobile Search Page */
@media (max-width: 992px) {
    .search-page-layout { grid-template-columns: 1fr; gap: 2rem; }
    .search-sidebar { display: none; }
}

@media (max-width: 768px) {
    .site-header { height: 72px; padding: 0; }
    .header-content { flex-wrap: nowrap; justify-content: space-between; height: 100%; }
    .hero h1 { font-size: 2rem; }
    .nav-links { display: none; } 
    .coupon-card { flex-direction: column; align-items: flex-start; }
    .store-logo { width: 60px; height: 60px; }
    .coupon-action { width: 100%; margin-top: 1rem; }
    
    .search-box { display: none !important; } /* Hidden in mobile header */
    .logo { margin: 0; }
    .mobile-menu-toggle { display: block; }
    
    .coupon-detailed-header { flex-direction: column; }
    .coupon-actions-row { flex-direction: column; align-items: stretch; }
}

/* Premium Card Styles */
.premium-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.premium-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.premium-card-banner {
    height: 140px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.premium-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-card-banner.no-img {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.premium-card-banner.no-img::after {
    content: '\f290'; /* FontAwesome shopping bag */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.15;
}

.premium-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.premium-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premium-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.premium-store-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: -50px; /* Overlap banner */
    position: relative;
    z-index: 1;
    background: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-store-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.premium-header-text {
    flex: 1;
    margin-top: -5px;
}

.premium-store-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.premium-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
}

.text-warning { color: #f59e0b; }
.rating-count { 
    color: var(--text-muted); 
    margin-left: 5px; 
    font-size: 0.75rem;
}

.premium-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.stat-pill {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.usage-pill {
    background: #f3f4f6;
    color: var(--text-muted);
}

.deals-pill {
    background: #ecfdf5;
    color: #059669; /* Green text */
    font-weight: 600;
}

.premium-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.view-deals-btn-large {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.view-deals-btn-large:hover {
    background: var(--primary-dark);
}

.verified-badge-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1;
}

.verified-badge-small i { color: var(--success); }
/* Modern Filter Bar with Glassmorphism */
.filter-bar {
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem; 
    border-radius: 16px; 
    border: 1px solid rgba(255, 255, 255, 0.5); 
    margin-bottom: 2.5rem; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}

.filter-bar form {
    display: flex; 
    gap: 1.5rem; 
    align-items: flex-end; 
    width: 100%;
}

/* Custom Select Dashboard Look */
.filter-group-main, .filter-group-sort {
    position: relative;
    /* Removed static z-index to fix overlapping */
}

.filter-group-main
{
    width: 70%;
}

.filter-group-sort{
    width: 30%;
}
/* Hide original but keep for form submission */
.sort-select.custom-initialized {
    display: none !important;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    z-index: 10;
}

.custom-select-wrapper.open {
    z-index: 99999; /* Force open dropdown to stay on top */
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1.5rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.custom-select-trigger:hover {
    border-color: var(--primary);
    background: #f8faff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.custom-select-trigger i {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.custom-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999; /* Max priority */
    overflow: hidden;
    padding: 8px;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 14px 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    margin-bottom: 4px;
    position: relative;
}

.custom-option:last-child { margin-bottom: 0; }

.custom-option:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.02) translateX(8px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.custom-option.selected {
    background: #f0f7ff;
    color: var(--primary);
    font-weight: 800;
}

.custom-option.selected::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .filter-bar { padding: 1.25rem; }
    .filter-bar form { flex-direction: column; align-items: stretch; gap: 1.25rem; }
    .filter-group-main, .filter-group-sort { width: 100% !important; }
}

/* Results Header */
.results-header {
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-header p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.results-header strong {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Stores Grid Results */
.stores-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 640px) {
    .stores-results-grid { grid-template-columns: 1fr; }
}

/* Store Page Layout Refinement */
.store-page-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

.store-page-grid .coupon-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.store-page-grid .coupon-list .coupon-detailed {
    max-width: 900px; /* Decent width, not "full" but set correctly */
}

@media (max-width: 1024px) {
    .store-page-grid {
        grid-template-columns: 1fr;
    }
    .store-page-grid aside {
        order: 2;
    }
}

/* Sidebar Premium Refinement */
.sidebar-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.sidebar-box h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-light);
}

.sidebar-box h3 i { color: var(--primary); font-size: 1.2rem; }

.top-store-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.top-store-item:hover {
    background: var(--bg-light);
    transform: translateX(5px);
}

.top-store-item .rank {
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-store-item .name { font-weight: 600; font-size: 0.9rem; flex: 1; }
.top-store-item .save { color: var(--success); font-weight: 700; font-size: 0.85rem; }

/* Store Header Detail Update */
.store-header {
    width: 100%;
    background: white;
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.store-header-content {
    width: 100%;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.store-header-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.breadcrumb-container {
    margin-top: 2rem;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary);
    font-weight: 500;
    transition: 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
}

.breadcrumbs .separator {
    font-size: 0.7rem;
    color: #cbd5e1;
}

.store-header-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    line-height: 1.6;
}

.store-stats-bar {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Rich-text store description.
   Was a single <p>; it is a container now because the field legitimately holds
   paragraphs, headings and lists, and those need to inherit the same type as the
   old paragraph did rather than fall back to browser defaults. */
.store-header-desc > *:first-child { margin-top: 0; }
.store-header-desc > *:last-child { margin-bottom: 0; }

.store-header-desc p,
.store-header-desc li {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.95;
}

.store-header-desc h2,
.store-header-desc h3,
.store-header-desc h4 {
    font-size: 1.15rem;
    margin: 1rem 0 0.5rem;
}

.store-header-desc ul,
.store-header-desc ol {
    margin: 0.5rem 0 0.5rem 1.25rem;
}

/* Long descriptions must not stretch the header into an unreadable measure or
   push a long unbroken string outside it. */
.store-header-desc {
    max-width: 70ch;
    overflow-wrap: anywhere;
}

.store-header-desc a {
    color: inherit;
    text-decoration: underline;
}

/* "View Store" — the courtesy link to the merchant, under the stats bar. */
/* The button shares the stats bar's flex row with the .category-tag pills, so it
   borrows their geometry — same vertical padding, same pill radius, same font
   size — and every item on the row lines up at one height. The btn-secondary
   fill is kept so it still reads as an action rather than another label. */
.store-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    /* .category-tag carries a 1px border and .btn sets border:none, so without a
       matching transparent border the button computes ~1.3px shorter than the
       pills beside it and the row sits fractionally off. */
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.store-visit-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Slightly smaller and lifted, so it reads as a suffix to the label rather than
   another icon competing with the store icon on the left. */
.store-visit-icon {
    font-size: 0.75em;
    opacity: 0.85;
}

.submission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.user-submission-box {
    margin: 3rem 0;
    border: 2px dashed var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.user-submission-box .accordion-header {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    transition: background 0.2s;
}

.user-submission-box .accordion-header:hover {
    background: #f1f5f9;
}

.user-submission-box .accordion-header i:first-child {
    color: var(--primary);
    margin-right: 0.75rem;
}

.user-submission-box .accordion-header #accordion-icon {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.user-submission-box .accordion-content {
    display: none;
    padding: 2.5rem;
    background: white;
}

.submission-note {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.field-group {
    margin-bottom: 1.25rem;
}

.field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
}

.field-group input, 
.field-group select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
}

.field-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Activity Log */
.activity-log-box {
    margin-top: 3.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.activity-log-box .section-title {
    padding: 1.5rem 2rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem;
    background: #fafafa;
}

.activity-item {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: background 0.2s;
}

.activity-item:last-child { border-bottom: none; }
.activity-item.highlight { background: linear-gradient(90deg, rgba(59,130,246,0.03) 0%, transparent 100%); }

.activity-time {
    min-width: 110px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.activity-icon.coupon_used { background: #dcfce7; color: #15803d; }
.activity-icon.user_submitted_coupon { background: #dbeafe; color: #1d4ed8; }
.activity-icon.voted_yes, .activity-icon.voted_no { background: #fef3c7; color: #b45309; }

.activity-content {
    flex: 1;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.badge-code {
    font-family: var(--font-mono);
    font-weight: 700;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--primary);
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.empty-activity, .empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--border);
    margin-bottom: 1.5rem;
    display: block;
}

/* SEO Content Blocks */
.seo-content-section {
    width: 100%;
    margin-top: 4rem;
    overflow: hidden;
}

.content-block {
    margin-bottom: 3rem;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.block-title {
    color: var(--primary);
    font-size: 1.85rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.block-title.centered {
    text-align: center;
}

.content-block p {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.store-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.store-cta-section h2 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.store-cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 0 auto 2.5rem;
    max-width: 800px;
}

.btn-cta {
    background: white;
    color: var(--primary);
    padding: 1.25rem 2.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    border-radius: 12px;
    display: inline-block;
    transition: all 0.3s;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Sidebar refined */
.related-brands {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-brand-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.related-brand-item:hover {
    background: white;
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.related-brand-item i {
    color: var(--accent);
}

.newsletter-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
    border: none !important;
    padding: 2.5rem !important;
}

.newsletter-box h3 {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.newsletter-box p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.newsletter-box .form-group label {
    color: white;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.newsletter-box .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.btn-subscribe {
    width: 100%;
    background: white !important;
    color: var(--primary) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem !important;
}

.btn-subscribe:hover {
    background: #f8fafc !important;
    transform: scale(1.02);
}

/* Featured Premium Grid */
.featured-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3.5rem;
}

.featured-premium-card {
    background: white;
    border-radius: 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
    padding: 3.5rem 2.25rem 2.25rem;
    cursor: pointer;
    height: 100%;
}

.featured-premium-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.1);
}

.featured-badge-prime {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.3);
    border: 3px solid white;
    z-index: 5;
    text-transform: uppercase;
}

.fp-logo-wrap {
    width: 96px;
    height: 96px;
    background: white;
    border-radius: 24px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
    transition: 0.4s;
}

.featured-premium-card:hover .fp-logo-wrap {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.fp-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fp-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fp-store {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.fp-title {
    width: 100%;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    letter-spacing: -0.02em;
}

.fp-footer {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fp-success {
    font-size: 0.85rem;
    font-weight: 700;
    color: #059669; /* Stronger green */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ecfdf5;
    padding: 6px 16px;
    padding: 6px 14px;
    border-radius: 50px;
    width: fit-content;
    margin: 0 auto 0.5rem; /* Space below badge before the line */
}

/* The Ticket Separator & Side Notches */
.featured-premium-card::before,
.featured-premium-card::after {
    content: '';
    position: absolute;
    bottom: 92px; /* Adjusted to sit between success badge and button */
    width: 24px;
    height: 24px;
    background: var(--bg); /* Matches site background to create "cut" effect */
    border-radius: 50%;
    z-index: 10;
}

.featured-premium-card::before { left: -12px; box-shadow: inset -5px 0 5px rgba(0,0,0,0.02); }
.featured-premium-card::after { right: -12px; box-shadow: inset 5px 0 5px rgba(0,0,0,0.02); }

/* The Dashed Line */
.fp-footer::before {
    content: '';
    position: absolute;
    bottom: 104px; /* Perfectly centered between success badge and button */
    left: 1.5rem;
    right: 1.5rem;
    height: 0;
    border-top: 2px dashed rgba(0, 0, 0, 0.08);
}

.fp-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    padding: 1.1rem;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
    margin-top: 1rem; /* Space above button after the line */
}

.fp-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.featured-premium-card:hover .fp-btn {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.featured-premium-card:hover .fp-btn::after {
    left: 100%;
}

@media (max-width: 992px) {
    .featured-grid-premium { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 640px) {
    .featured-grid-premium { grid-template-columns: 1fr; }
    .featured-premium-card { padding: 3rem 1.75rem 2rem; }
}

/* Floating Deal Icons Animation - Extended */
.hero { position: relative; }
.floating-deal-icons { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.f-icon { 
    position: absolute; color: rgba(255, 255, 255, 0.12); 
    font-size: 2.2rem; filter: blur(1px); animation: float-deal var(--d, 8s) ease-in-out infinite;
    will-change: transform;
}

.f-tag-1 { top: 10%; left: 5%; --d: 12s; font-size: 3.5rem; }
.f-tag-2 { top: 65%; left: 10%; --d: 15s; font-size: 2rem; opacity: 0.80; }
.f-tag-3 { top: 15%; right: 8%; --d: 10s; font-size: 4.5rem; opacity: 0.80; }
.f-tag-4 { top: 75%; right: 15%; --d: 13s; font-size: 2.5rem; opacity: 0.80; }
.f-tag-5 { top: 45%; right: 4%; --d: 18s; font-size: 1.8rem; opacity: 0.60; }
.f-tag-6 { top: 30%; left: 18%; --d: 11s; font-size: 2.8rem; opacity: 0.40; }
.f-tag-7 { top: 80%; left: 35%; --d: 14s; font-size: 2.2rem; opacity: 0.70; }
.f-tag-8 { top: 10%; left: 45%; --d: 16s; font-size: 3rem; opacity: 0.50; }
.f-tag-9 { top: 50%; left: 2%; --d: 20s; font-size: 2.5rem; opacity: 0.30; }
.f-tag-10 { top: 5%; right: 30%; --d: 13s; font-size: 2rem; opacity: 0.60; }

@keyframes float-deal {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(25px, -35px) rotate(15deg); }
    50% { transform: translate(-15px, 20px) rotate(-10deg); }
    75% { transform: translate(30px, 15px) rotate(5deg); }
}

/* Live Activity Status */
.live-status { 
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    margin-top: 2rem; background: rgba(0, 0, 0, 0.15); padding: 0.5rem 1.25rem;
    border-radius: 50px; width: fit-content; margin-left: auto; margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px);
}
.pulse-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; position: relative; }
.pulse-dot::after {
    content: ''; position: absolute; inset: 0; background: #22c55e;
    border-radius: 50%; animation: pulse-live 1.8s ease-out infinite;
}
.status-text { color: rgba(255, 255, 255, 0.9); font-size: 0.9rem; }
.status-text strong { color: white; }

@keyframes pulse-live {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(3); opacity: 0; }
}

/* ==========================================================================
   Global Responsiveness & Header Fixes
   ========================================================================== */

/* Header Mobile Menu Logic */
.main-nav { transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mobile-search-container { display: none; }

/* Tablet (Cramped View Fix) & Finishing Touches */
@media (max-width: 1024px) {
    :root { --container-width: 940px; }
    .featured-grid-premium { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .coupon-list { grid-template-columns: 1fr; } 
    .store-page-grid { grid-template-columns: 1fr; gap: 2rem; }
    .store-header-content { gap: 2rem; padding: 2rem 1.5rem; text-align: center; }
    .store-header-content .store-logo { margin: 0 auto; }
}

/* Fallback Initials Style Premium */
.store-logo span, .logo-mini span {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--primary);
    font-weight: 800;
    font-size: 2.5rem;
    border-radius: inherit;
    text-shadow: 1px 1px 0 white;
}
.logo-mini span { font-size: 1.2rem; }

/* Refined Success Badge */
.success-rate {
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.success-rate::before {
    content: "\f164";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

@media (max-width: 768px) {
    /* Header & Nav */
    .mobile-menu-toggle { display: block; order: 2; }
    .search-box { display: none !important; }
    .header-content { justify-content: space-between; align-items: center; }
    
    .mobile-search-container { 
        padding: 1rem 1.5rem; 
        border-bottom: 1px solid #f1f5f9;
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        z-index: 99999;
        border-top: 1px solid var(--border);
        transition: 0.3s ease;
        overflow-y: auto;
        max-height: calc(100vh - var(--header-height));
    }
    
    .main-nav.active { transform: translateY(0); opacity: 1; visibility: visible; }
    
    .nav-links { display: flex; flex-direction: column; gap: 0; align-items: stretch; padding: 0; }
    .nav-links li { border-bottom: 1px solid #f1f5f9; width: 100%; }
    .nav-links a { padding: 1rem 1.5rem; display: block; width: 100%; font-size: 1rem; color: var(--text-heading) !important; }
    .nav-links a.active::after { display: none; }

    /* Hero */
    .hero { padding: 4rem 1rem 5rem; clip-path: none; }
    .hero h1 { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 2rem; }

    /* Store Page Specifics */
    .store-header { width: 100%; padding: 3rem 0; background: #fff; text-align: center; overflow: hidden; }
    .store-header-content { width: 100%; flex-direction: column; gap: 1.5rem; }
    .store-logo { width: 100px; height: 100px; margin: 0 auto; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
    .store-header-info h1 { font-size: 1.6rem; margin-bottom: 1rem; padding: 0 15px; }
    .store-header-info p { font-size: 0.9rem; line-height: 1.5; padding: 0 15px; }
    .store-stats-bar { justify-content: center; gap: 0.5rem; }
    .store-header-desc { padding: 0 15px; max-width: 100%; }
    .store-header-desc p, .store-header-desc li { font-size: 0.9rem; line-height: 1.5; }
    
    .store-page-grid { 
        display: block; 
        width: 100%;
        margin-top: 2rem; 
        padding: 0;
        overflow-x: hidden;
    }
    .coupon-list { 
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    .breadcrumb-container { display: none; }

    /* Premium Vertical Coupon Card Mobile */
    .coupon-detailed { 
        width: 100%;
        max-width: 100%;
        border-radius: 20px; 
        border: 1px solid rgba(0, 0, 0, 0.08); 
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
        background: #fff;
        overflow: hidden;
        margin: 0 0 2rem 0;
        position: relative;
        box-sizing: border-box;
    }

    /* Remove side indicator for mobile vertical cards */
    .coupon-detailed::before { display: none !important; }
    
    .coupon-detailed-header { 
        width: 100%;
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
        padding: 2rem 1.25rem 1rem; 
        gap: 1rem; 
        background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
        box-sizing: border-box;
    }
    
    .discount-badge { 
        width: 75px; 
        height: 75px; 
        border-radius: 16px; 
        flex-shrink: 0;
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
        border: 3px solid #fff;
    }
    
    .discount-badge .amount { font-size: 1.75rem; letter-spacing: -1px; }
    .discount-badge .type { font-size: 0.7rem; font-weight: 800; opacity: 0.9; }
    
    .coupon-detailed-info { 
        width: 100%; 
        min-width: 0; /* Prevents overflow */
    }
    .coupon-detailed-info .store-name { 
        font-size: 0.75rem; 
        margin-bottom: 0.75rem; 
        text-align: center;
        background: rgba(37, 99, 235, 0.05);
        color: var(--primary);
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-weight: 700;
    }
    .coupon-detailed-info h3 { 
        font-size: 1.25rem; 
        line-height: 1.3; 
        margin: 0.25rem 0 0.75rem;
        padding: 0 0.5rem;
    }
    
    .coupon-meta { 
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 1fr; /* Force equal height for all boxes */
        gap: 0.6rem; 
        font-size: 0.65rem; 
        padding: 0;
        width: 100%;
    }
    
    .coupon-meta .meta-item {
        background: #ffffff;
        padding: 10px 6px;
        border-radius: 12px;
        border: 1px solid #edf2f7;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 0.25rem;
        color: var(--text-muted);
        height: 100%; /* Fill grid cell height */
        box-sizing: border-box;
    }
    
    .coupon-meta .meta-item i { font-size: 1rem; color: var(--primary); margin-bottom: 2px; }
    .coupon-meta .meta-item.success-rate { background: #f0fdf4; border-color: #dcfce7; color: #166534; }
    .coupon-meta .meta-item.success-rate i { color: #22c55e; }
    
    .coupon-detailed p {
        padding: 0 1rem !important;
        margin: 0.75rem 0 1rem !important;
        font-size: 0.9rem !important;
        text-align: center;
        line-height: 1.4;
        color: var(--text-muted);
    }
    
    .coupon-actions-row { 
        flex-direction: column; 
        padding: 1rem; 
        gap: 0.75rem; 
        background: #fdfdfe; 
        border-top: 1px dashed var(--border); 
    }
    
    .premium-copy-container { 
        max-width: 100%; 
        width: 100%;
        height: 50px; 
        margin: 0; 
        padding: 4px 4px 4px 15px; /* Left padding for code breathing room */
        border-radius: 12px;
        background: #0f172a; 
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
    }
    
    .code-revealer { 
        font-size: 1.1rem; 
        flex: 1; 
        text-align: left; /* Aligned left for better flow */
        font-family: var(--font-mono); 
        color: #f8fafc; 
        overflow: hidden; 
        white-space: nowrap; 
        text-overflow: ellipsis; 
        letter-spacing: 1.5px;
    }
    .copy-trigger { 
        width: 75px; 
        height: 38px;
        font-size: 0.75rem; 
        border-radius: 8px;
        background: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .vote-section { 
        margin-top: 0.5rem; 
        padding: 0.75rem 0; 
        border-top: 1px solid #f1f5f9; 
        width: 100%; 
        justify-content: center; 
        display: flex;
        flex-direction: row; /* Horizontal on mobile to save space */
        align-items: center;
        gap: 0.75rem;
    }

    .vote-section .vote-text { font-size: 0.8rem; font-weight: 700; color: var(--text-heading); }
    .vote-btn-wrap { display: flex; gap: 0.75rem; }
    .vote-btn { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; border: 1px solid #f1f5f9; }
    .vote-btn.yes { color: var(--success); }
    .vote-btn.no { color: var(--error); }

    /* Activity Log */
    .activity-log-box .section-title { padding: 1.25rem; font-size: 1.15rem; text-align: center; }
    .activity-item { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; gap: 0.75rem; }
    .activity-time { min-width: auto; font-size: 0.8rem; }
    .activity-icon { width: 36px; height: 36px; font-size: 1rem; }

    /* SEO & Content */
    .seo-content-section { margin-top: 3rem; }
    .block-title { font-size: 1.5rem; text-align: center; }
    .intro-text { font-size: 1rem; text-align: center; }
    .content-block p { font-size: 0.95rem; text-align: center; }
    
    .store-cta-section { padding: 3rem 1.5rem; border-radius: 16px; }
    .store-cta-section h2 { font-size: 1.75rem; }
    .store-cta-section p { font-size: 1rem; }

    /* User Submission */
    .submission-grid { grid-template-columns: 1fr; gap: 1rem; }
    .user-submission-box .accordion-header { padding: 1.25rem; font-size: 1rem; }
    .user-submission-box .accordion-content { padding: 1.5rem; }
    
    /* Grids & Footer */
    .featured-grid-premium { grid-template-columns: 1fr; }
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .social-links { justify-content: center; }

    /* FAQ Mobile Fixes */
    .faq-grid { 
        grid-template-columns: 1fr; 
        gap: 1.25rem; 
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .faq-item { 
        padding: 1.5rem; 
        border-radius: 12px; 
        width: 100%;
        box-sizing: border-box;
    }
    .faq-item h3 { font-size: 1rem; }
    .faq-item p { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .section-title { font-size: 1.4rem; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center; }
    .container { padding: 0 1.25rem; }
    .logo span { font-size: 1.2rem; }
}

/* Highlight pulse for linked coupons */
.highlight-pulse {
    animation: highlightPulse 1.5s ease-in-out infinite;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2) !important;
    z-index: 100;
}

@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); border-color: var(--primary); }
    100% { transform: scale(1); }
}
/* Professionally Refined Dark Premium Copy Container */
.premium-copy-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b; /* Sophisticated Charcoal Navy */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Minimal border */
    border-radius: 16px;
    padding: 0.6rem 0.6rem 0.6rem 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-width: 460px;
    min-height: 64px;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.3); /* Softer, broader shadow */
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.premium-copy-container:hover {
    background: #334155; /* Slightly lighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.code-revealer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1.5px;
    background: rgba(15, 23, 42, 0.4); /* Deeper contrast for code area */
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    flex: 1;
    white-space: nowrap;
    transition: all 0.3s;
}

.masked-code {
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
}

.copy-trigger {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 11px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.3);
    min-width: 125px;
}

.premium-copy-container:hover .copy-trigger {
    background: #3b82f6;
    box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.premium-copy-container.revealed {
    background: #0f172a; /* Solid dark on reveal */
    border-color: var(--primary);
}

.premium-copy-container.revealed .code-revealer {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    border-style: solid;
    color: white;
}

.coupon-actions-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem 2rem;
}

@media (max-width: 768px) {
    .coupon-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .premium-copy-container {
        padding: 0.75rem 1rem;
    }
}

/* Educational Slider Premium Styles */
.edu-slider-container {
    position: relative;
    max-width: 100%;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.edu-slider {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
}

.edu-slide {
    display: none;
    width: 100%;
    animation: slideFade 0.6s ease;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.edu-slide.active {
    display: flex;
}

@keyframes slideFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.edu-graphic {
    width: 120px;
    height: 120px;
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 3.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.edu-slide:hover .edu-graphic {
    transform: rotate(-5deg) scale(1.1);
}

.edu-graphic .step-label {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--secondary);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: white; }
.bg-amber { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.bg-slate { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); color: white; }
.bg-green { background: linear-gradient(135deg, #10b981 0%, #047857 100%); color: white; }

.edu-text h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-heading) 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.edu-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.edu-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.edu-slider-dots .dot {
    width: 10px;
    height: 10px;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.edu-slider-dots .dot.active {
    width: 30px;
    background: var(--primary);
    border-radius: 10px;
}

.edu-slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    color: var(--text-heading);
    transition: 0.3s;
    z-index: 10;
}

.edu-slider-nav button:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.2);
}

.nav-prev { left: 1rem; }
.nav-next { right: 1rem; }

@media (max-width: 640px) {
    .edu-slider-container { padding: 1.5rem; border-radius: 16px; margin: 1rem 0; }
    .edu-slider { height: auto; min-height: 280px; padding: 1rem 0; }
    .edu-graphic { width: 80px; height: 80px; font-size: 2.2rem; border-radius: 24px; }
    .edu-graphic .step-label { padding: 4px 10px; font-size: 0.75rem; top: -8px; right: -8px; }
    .edu-text h3 { font-size: 1.3rem; margin-top: 1rem; }
    .edu-text p { font-size: 0.95rem; line-height: 1.5; padding: 0 10px; }
    .edu-slider-nav button { 
        width: 38px; 
        height: 38px; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .nav-prev { left: 0.5rem; }
    .nav-next { right: 0.5rem; }
    .edu-slider-dots { margin-top: 1.5rem; }
}

/* Newsletter Popup */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.newsletter-modal.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.newsletter-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.newsletter-header i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.newsletter-header h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.newsletter-header p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.newsletter-body {
    padding: 2.5rem 2rem;
    text-align: center;
}

.popup-label {
    display: block;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.popup-input {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    padding: 0 1.25rem;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s;
    text-align: center;
}

.popup-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.popup-submit {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.3s;
}

.popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.privacy-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.privacy-note i {
    font-size: 0.9rem;
}

.newsletter-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}

.newsletter-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@media (max-width: 480px) {
    .newsletter-content {
        margin: 1rem;
        border-radius: 20px;
    }
    
    .newsletter-header {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-header i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .newsletter-header h2 {
        font-size: 1.5rem;
    }
    
    .newsletter-body {
        padding: 1.5rem 1.25rem;
    }
    
    .popup-submit, .popup-input {
        height: 48px;
        font-size: 0.95rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.subscription-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.subscription-message.success {
    display: block;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
}

.subscription-message.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}
/* Custom Select Dropdowns */
select.sort-select { 
    display: none;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    min-width: 200px;
    min-height: 48px; /* Prevents jumping before JS runs */
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 48px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-heading);
    transition: all 0.3s ease;
}

.custom-select-trigger:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.custom-select-trigger i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.custom-select-wrapper.open .custom-select-trigger i {
    transform: rotate(180deg);
    color: var(--primary);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-option {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: var(--text);
}

.custom-option:hover {
    background: #f8fafc;
    color: var(--primary);
}

.custom-option.selected {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}

/* Scrollbar for options */
.custom-options::-webkit-scrollbar {
    width: 6px;
}
.custom-options::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.custom-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ==========================================================================
   About Page Responsiveness
   ========================================================================== */

@media (max-width: 992px) {
    .about-intro-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .about-details-row {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        text-align: center;
        margin-bottom: 5rem !important;
    }
    
    .about-details-row div {
        order: unset !important;
    }
    
    .about-info-hub-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
}

@media (max-width: 768px) {
    .about-container {
        padding: 3rem 1rem !important;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem !important;
        margin-top: 2rem !important;
    }
    
    .hero-stats .stat-item span:first-child {
        font-size: 1.75rem !important;
    }
    
    .about-card.premium-card {
        padding: 2rem !important;
    }
    
    .about-details-row .detail-visual {
        padding: 2.5rem !important;
    }

    .about-info-hub-box {
        padding: 2.5rem 1.5rem !important;
    }
    
    .about-cta {
        padding: 4rem 1.5rem !important;
        border-radius: 20px !important;
    }
    
    .about-cta h2 {
        font-size: 2rem !important;
    }
    
    .about-cta .btn {
        width: 100%;
        padding: 1rem 1.5rem !important;
    }
    
    .content-section h2 {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 480px) {
    .page-header-modern h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0 2rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    background: white;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    background: white;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.pagination-num:hover:not(.active) {
    background: #f1f5f9;
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.pagination-num.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
    cursor: default;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 44px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.35rem;
        margin: 2rem 0 1.5rem;
    }

    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .pagination-btn span.text {
        display: none;
    }

    .pagination-num {
        min-width: 38px;
        height: 38px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .pagination-ellipsis {
        min-width: 28px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .pagination-num {
        min-width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

/* ---------------------------------------------------------------------------
   Classes replacing inline style manipulation.

   These exist because the behaviour that used to set element.style directly,
   or ship a style="" attribute inside an innerHTML string, now toggles a class
   instead. Keeping presentation in the stylesheet is what lets the site run
   under a Content-Security-Policy that does not allow injected <style>.
   --------------------------------------------------------------------------- */

.masked-code.is-hidden { display: none; }
.actual-code { display: none; }
.actual-code.is-shown { display: inline; }

#accordion-content { display: none; }
#accordion-content.is-open { display: block; }
#accordion-icon { transition: transform 0.2s ease; }
#accordion-icon.is-rotated { transform: rotate(180deg); }

.vote-verified { color: var(--success); font-weight: 700; font-size: 0.9rem; }

.unlock-deal-btn { flex: 1; padding: 1.25rem; }

/* Off-screen textarea used by the clipboard fallback. */
.offscreen-copy { position: fixed; left: -9999px; top: 0; }

/* ---------------------------------------------------------------------------
   Narrow-screen coupon card.

   A flex item defaults to min-width:auto, so it refuses to shrink below its
   content. On the homepage card, .store-name is a flex row holding the brand
   label next to a "Verified" badge with white-space:nowrap. A long brand name
   ("The Australian Organic") therefore pushed .store-name — and with it the
   whole .coupon-content column — about 26px past the edge of its card at
   320px, clipping the badge and the success-rate figure.

   Letting the row wrap and clearing the implicit minimum fixes it without
   changing anything at larger sizes.
   --------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .coupon-card .coupon-content,
    .coupon-card .store-name,
    .coupon-card .coupon-meta {
        min-width: 0;
    }

    .coupon-card .store-name,
    .coupon-card .coupon-meta {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }

    .coupon-card .brand-label,
    .coupon-card .coupon-title {
        overflow-wrap: anywhere;
    }
}

/* A coupon code is one unbroken token, so it cannot wrap by default and
   overflowed its container on narrow screens. */
.masked-code,
.actual-code {
    overflow-wrap: anywhere;
}

/* ===========================================================================
   Coupon popup, hero call-to-action row, footer sign-up form and the category
   descriptions.

   Everything below reuses the existing tokens — the same blues, the same radii,
   the same shadows and the same 0.3s transitions as the rest of the sheet — so
   the new pieces read as part of the theme rather than bolted on.
   =========================================================================== */

/* --- Hero call-to-action row --------------------------------------------- */
.hero-cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-hero-primary,
.btn-hero-secondary {
    min-width: 190px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-hero-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-hero-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

/* --- Section subheadings -------------------------------------------------- */
.section-sub {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0 0 1.5rem;
}

/* --- Category card descriptions ------------------------------------------ */
.cat-desc {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 0.35rem;
}

/* --- Footer newsletter / contact form ------------------------------------ */
.footer-signup {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(0, 1.6fr);
    gap: 2.5rem;
    align-items: start;
    padding: 2.5rem 0 3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-signup-copy h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.footer-signup-copy p {
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

.footer-signup-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.footer-signup .form-group {
    margin-bottom: 0;
}

.footer-signup label {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-signup .form-control {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.footer-signup .form-control::placeholder {
    color: #64748b;
}

.footer-signup .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.footer-signup-submit {
    margin-top: 1.25rem;
    min-width: 180px;
}

.footer-signup-micro {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0.75rem 0 0;
}

.footer-signup .subscription-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-signup .subscription-message:empty {
    display: none;
}

.footer-signup .subscription-message.success {
    color: #34d399;
}

.footer-signup .subscription-message.error {
    color: #fca5a5;
}

@media (max-width: 900px) {
    .footer-signup {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- Coupon popup --------------------------------------------------------- */
body.modal-open {
    overflow: hidden;
}

.coupon-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1.5rem;
}

.coupon-modal[hidden] {
    display: none;
}

.coupon-modal.active {
    animation: fadeIn 0.3s ease;
}

.coupon-modal-card {
    background: var(--surface);
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    border-radius: 24px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.coupon-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 2;
}

.coupon-modal-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

.coupon-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.coupon-modal-head {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 2.25rem 2rem 1.75rem;
    text-align: center;
    color: #fff;
}

.coupon-modal-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.coupon-modal-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.coupon-modal-logo span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.coupon-modal-store {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
}

.coupon-modal-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
}

.coupon-modal-badge:empty {
    display: none;
}

.coupon-modal-body {
    padding: 2rem;
    text-align: center;
}

.coupon-modal-title {
    font-size: 1.15rem;
    color: var(--text-heading);
    margin: 0 0 1.5rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.coupon-code-box {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    border: 2px dashed var(--primary);
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-bottom: 1.25rem;
}

.coupon-code-box[hidden] {
    display: none;
}

.coupon-code-value {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-heading);
    padding: 0.5rem;
    overflow-wrap: anywhere;
    user-select: all;
}

.coupon-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.coupon-copy-btn:hover {
    background: var(--primary-dark);
}

.coupon-copy-btn:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.coupon-copy-btn.copied {
    background: var(--success);
}

.coupon-modal-note {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.55;
    margin: 0;
}

.coupon-modal-fallback {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.coupon-modal-fallback[hidden] {
    display: none;
}

@media (max-width: 480px) {
    .coupon-modal {
        padding: 1rem;
    }

    .coupon-modal-card {
        border-radius: 20px;
    }

    .coupon-modal-head {
        padding: 2rem 1.25rem 1.5rem;
    }

    .coupon-modal-body {
        padding: 1.5rem 1.25rem;
    }

    /* Below ~380px the code and the button no longer fit side by side. */
    .coupon-code-box {
        flex-direction: column;
    }

    .coupon-copy-btn {
        justify-content: center;
    }
}

/* --- Contact form --------------------------------------------------------- */
.contact-form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
}

.contact-form-section h2 {
    margin: 0 0 1.5rem;
    color: var(--text-heading);
}

.contact-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.contact-form .req {
    color: var(--error);
}

.contact-form textarea.form-control {
    /* .form-control is sized for single-line inputs; a textarea needs its own
       height and has to stay inside the card when dragged. */
    height: auto;
    min-height: 160px;
    padding: 1rem 1.25rem;
    line-height: 1.6;
    resize: vertical;
    max-width: 100%;
    font-family: inherit;
}

.contact-submit {
    min-width: 200px;
}

.contact-micro {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    line-height: 1.55;
    font-size: 0.95rem;
}

.contact-alert i {
    font-size: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.contact-alert strong {
    display: block;
    margin-bottom: 0.2rem;
}

.contact-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}

.contact-alert.is-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.contact-alert.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

@media (max-width: 480px) {
    .contact-form-section {
        padding: 1.5rem 1.25rem;
    }

    .contact-submit {
        width: 100%;
    }
}

/* --- Guides & Deal Tips --------------------------------------------------- */
.guides-hero {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    color: #fff;
    padding: 4.5rem 0 3.5rem;
    text-align: center;
}

.guides-hero h1 {
    color: #fff;
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    line-height: 1.2;
}

.guides-sub {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto;
    max-width: 620px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.guides-wrap {
    padding-top: 3rem;
}

.guides-intro {
    max-width: 780px;
    margin: 0 auto 3.5rem;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.guide-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.guide-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.guide-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.guide-card h3 {
    color: var(--text-heading);
    font-size: 1.15rem;
    margin: 0 0 0.65rem;
}

.guide-card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    flex: 1;
}

.guide-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.guide-link:hover {
    gap: 0.75rem;
}

.guides-pending-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--bg-light);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.guides-pending-inner i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.guides-pending-inner h2 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: var(--text-heading);
}

.guides-pending-inner p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.guides-pending-inner a {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 480px) {
    .guides-hero {
        padding: 3rem 0 2.5rem;
    }

    .guide-card {
        padding: 1.5rem;
    }

    .guides-pending-inner {
        flex-direction: column;
        gap: 0.85rem;
        padding: 1.5rem;
    }
}
