:root {
    --primary: #6366f1; /* indigo */
    --primary-2: #8b5cf6; /* violet */
    --dark: #4f46e5;
    --accent: #ec4899; /* pink */
    --bg: #f6f7fb; /* light page */
    --surface: #ffffff; /* cards */
    --surface-2: #f3f4fb; /* subtle tint */
    --green: #10b981;
    --text: #1e2233;
    --muted: #6b7280;
    --border: #ececf3;
    --primary-gradient:
        radial-gradient(
            1100px 420px at 50% -140px,
            rgba(236, 72, 153, 0.35),
            transparent 65%
        ),
        linear-gradient(
            135deg,
            #6366f1 0%,
            #8b5cf6 55%,
            #a855f7 100%
        );
    --gold-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); /* brand gradient */
    --radius: 16px;
    --shadow: 0 8px 30px rgba(17, 24, 39, 0.07);
    --glow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 14px 34px rgba(99, 102, 241, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

::selection {
    background: rgba(99, 102, 241, 0.18);
    color: var(--dark);
}




.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 .2rem;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}









.cats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1.5rem 0;
}

.cats::-webkit-scrollbar {
    display: none;
}

.cat {
    flex: 0 0 auto;
    padding: 0.55rem 1.3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat:hover, .cat.active {
    background: var(--gold-grad);
    color: #fff;
    border-color: transparent;
}

.stats {
    display: flex;
    gap: 1.5rem;
    margin: .1rem auto 1rem;
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 25px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    flex: 1;
}

.stat:hover {
    color: #9da8d5;
    background-color: ghostwhite;
}

.stat .num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.num:hover {
    /*font-size: 1.8rem;*/
    /*font-weight: 800;*/
    /*color: royalblue;*/
}


.stat .lbl {
    font-size: 0.8rem;
    color: var(--muted);
}



.coupon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch; /* يخلي كل الكروت في نفس الصف بنفس الارتفاع */
    margin-top: 12px;
    padding-bottom: 3rem;
}

.store-sim {
    /*background: rgb(157, 168, 213);*/
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 20px 0;
}

.store-sim a {
    display: block;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    /*transition: .2s;*/
}

.store-sim a:hover {
    /*background: #9dd5a2;*/
    /*color: var(--primary);*/
        border-radius: 12px;

}




.code-box {
    /*flex: 1;*/
    background: rgba(99, 102, 241, 0.07);
    border: 2px dashed var(--primary);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
}

.copy-btn {
    padding: 0.7rem 1.2rem;
    background: var(--gold-grad);
    color: #fff;
    /*font: unset;*/
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    font-family: inherit;
    transition: filter 0.2s;
}

.copy-btn:hover {
    filter: brightness(1.06);
}

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







.seo-article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
    line-height: 1.9;
}

.seo-article h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--surface-2);
}

.seo-article h2:first-child {
    margin-top: 0;
}

.seo-article h3 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.seo-article p {
    color: #555;
    margin-bottom: .8rem;
    font-size: 0.95rem;
}

.seo-article ol, .seo-article ul {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
    color: #555;
    font-size: 0.95rem;
}

.seo-article li {
    margin-bottom: 0.4rem;
}

.seo-article strong {
    color: var(--primary);
}

.faq-item {
    background: var(--surface-2);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-right: 3px solid var(--primary);
}


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

.admin-wrap-lg {
    max-width: 950px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.admin-card h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    transition: border 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 1rem;
}


.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--surface-2);
    color: var(--primary);
    padding: 0.8rem 1rem;
    text-align: right;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #fafbff;
}

.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-ok {
    background: #e7fbf3;
    color: #058a63;
}

.alert-err {
    background: #fff0f4;
    color: #c0002a;
}

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

.dash-link {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    display: block;
    font-weight: bold;
    transition: all 0.2s;
}

.dash-link:hover {
    background: var(--gold-grad);
    color: #fff;
}

.empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--muted);
}

.empty .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.stat-link {
    /*display: flex;*/
    display: block;
    width: 100%;
    height: 100%;
    /*flex: 1;*/
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.stat-link .stat {
    transition: .2s;
    width: 100%;
}

.stat-link:hover .stat {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    background-color: white;
    color: cyan;
}

.stat-link:visited {
    color: inherit;
}


.cat-section-title {
    margin: 1.8rem 0 1rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.cat-stores-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.cat-store-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border, #eee);
    padding: 0.55rem 1.1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text, #333);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
    transition: all 0.2s ease;
}

.cat-store-chip:hover {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.chip-logo {
    font-size: 1.15rem;
}


.badge {
    display: inline-flex;
    align-items: center;
    /*justify-content: center;*/
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;

    transition: all 0.2s ease;
}

.badge-verified {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

footer {
    background: #fff;
    text-align: center;
    padding: 1.5rem;
    color: var(--muted);
    /*font-size: 0.85rem;*/
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

@media (max-width: 600px) {

    .hero h1 {
        font-size: 1.4rem;
    }

    .stats {
        gap: 0.75rem;
        /*margin: .4rem auto 2rem;*/
    }

    .coupon-grid {
        grid-template-columns: 1fr;

    }

    .form-row {
        grid-template-columns:1fr;
    }

    nav {
        padding: 1rem;
    }
    .store-logo-badge{
        display: none !important;
    }

    .hero img {
        border-radius: 12px;
        height: 100px;
    }
    
    
}

@media screen {
    .container{
        padding: 0 0.1rem;
    }
}