/* CSS for Eksmly Clone - Enhanced Color Scheme */

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

:root {
    /* Primary Colors */
    --primary-purple: #6366f1;
    --primary-purple-light: #818cf8;
    --primary-purple-dark: #4f46e5;
    
    /* Secondary Colors */
    --secondary-orange: #f59e0b;
    --secondary-orange-light: #fbbf24;
    --secondary-orange-dark: #d97706;
    
    /* Accent Colors */
    --accent-pink: #ec4899;
    --accent-pink-light: #f472b6;
    --accent-pink-dark: #db2777;
    
    /* Neutral Colors */
    --neutral-white: #ffffff;
    --neutral-gray-50: #f9fafb;
    --neutral-gray-100: #f3f4f6;
    --neutral-gray-200: #e5e7eb;
    --neutral-gray-300: #d1d5db;
    --neutral-gray-400: #9ca3af;
    --neutral-gray-500: #6b7280;
    --neutral-gray-600: #4b5563;
    --neutral-gray-700: #374151;
    --neutral-gray-800: #1f2937;
    --neutral-gray-900: #111827;
    
    /* Success & Error */
    --success-green: #10b981;
    --error-red: #ef4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: var(--neutral-white);
    color: var(--neutral-gray-800);
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse; /* Important for RTL */
    padding: 10px 20px;
    background-color: #000 !important;
    direction: rtl; /* RTL layout */
}

.nav-bar, .nav-bar * {
    color: #fff !important;
}

.brand img {
    max-height: 60px;
    height: auto;
    width: auto;
}

.search-con {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-con input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid var(--neutral-gray-200);
    border-radius: 25px;
    font-size: 16px;
    background: var(--neutral-white);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
}

.search-con input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-con button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    border: none;
    color: var(--neutral-white);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-con button:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark), var(--primary-purple));
    transform: translateY(-50%) scale(1.05);
}

/* Hero Section */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-pink) 100%);
    color: var(--neutral-white);
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 40px;
}

/* لجعل البحث في المنتصف داخل الهيدر */
.hero-section .search-con {
    max-width: 600px;
    margin: 0 auto;
}

/* Banner Slider */
.banner-slider {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.banner-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Mobile Banner Responsiveness */
@media (max-width: 768px) {
    .banner-slider {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .banner-item img {
        height: 200px;
        object-fit: contain;
        background: white;
    }
}

@media (max-width: 576px) {
    .banner-slider {
        max-width: 100%;
        border-radius: 10px;
    }
    
    .banner-item img {
        height: 180px;
        object-fit: contain;
        background: white;
    }
}

.swiper-pagination-bullet {
    background: var(--neutral-white);
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--secondary-orange);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--neutral-white);
}

/* Brand Filter */
.brand-filter {
    padding: 40px 0;
    background: var(--neutral-gray-50);
    box-shadow: var(--shadow-sm);
}

.brand-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.brand-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: var(--neutral-white);
    color: var(--neutral-gray-600);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--neutral-gray-200);
    min-width: 120px;
    text-align: center;
}

.brand-tab .brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 8px;
    background: var(--neutral-white);
    padding: 5px;
    box-shadow: var(--shadow-md);
}

.brand-tab span {
    font-size: 0.9rem;
    font-weight: 500;
}

.brand-tab:hover,
.brand-tab.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    color: var(--neutral-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* Responsive Brand Tabs */
@media (max-width: 768px) {
    .brand-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .brand-tab {
        flex-direction: row;
        min-width: auto;
        width: 100%;
        padding: 12px 15px;
        justify-content: flex-start;
        text-align: right;
    }
    
    .brand-tab .brand-logo {
        width: 35px;
        height: 35px;
        margin-bottom: 0;
        margin-left: 10px;
        flex-shrink: 0;
    }
    
    .brand-tab span {
        flex: 1;
        text-align: right;
    }
}

/* Coupons Section */
.coupons-section {
    padding: 60px 0;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Responsive Grid */
@media (min-width: 1200px) {
    .coupons-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

/* Coupon Card */
.coupon-card {
    background: var(--neutral-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--neutral-gray-200);
}

.coupon-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple-light);
}

.coupon-header {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-pink) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-logo {
    width: 80px;
    height: 80px;
    background: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.coupon-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff !important;
    border-radius: 50%;
}

.coupon-body {
    padding: 20px;
    text-align: center;
}

.coupon-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neutral-gray-800);
    margin-bottom: 8px;
}

.coupon-discount {
    font-size: 1rem;
    color: var(--neutral-gray-600);
    margin-bottom: 20px;
}

.copy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-orange), var(--secondary-orange-dark));
    color: var(--neutral-white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: linear-gradient(135deg, var(--secondary-orange-dark), var(--secondary-orange));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.copy-btn.copied {
    background: var(--success-green);
    transform: scale(0.95);
}

/* Footer */
.footer {
    background: var(--neutral-gray-800);
    color: var(--neutral-white);
    padding: 30px 0;
    text-align: center;
}

/* Modal Styles */
.modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-pink) 100%);
    color: var(--neutral-white);
    border: none;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.coupon-code {
    background: var(--neutral-gray-50);
    padding: 20px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-gray-800);
    margin: 20px 0;
    border: 2px dashed var(--neutral-gray-300);
    transition: all 0.3s ease;
}

.coupon-code.copied {
    background: #d1fae5;
    border-color: var(--success-green);
    color: #065f46;
}

/* Loading Spinner */
.auto-load {
    padding: 40px 0;
}

.spinner-border {
    color: var(--primary-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .banner-item img {
        height: 200px;
    }
    
    .brand-tabs {
        gap: 10px;
    }
    
    .brand-tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .coupon-card {
        margin-bottom: 20px;
    }
    
    .search-con {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .coupons-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .coupon-header {
        height: 100px;
    }
    
    .coupon-logo {
        width: 60px;
        height: 60px;
    }
    
    .coupon-logo img {
        width: 40px;
        height: 40px;
    }
    
    .coupon-body {
        padding: 15px;
    }
    
    .coupon-brand {
        font-size: 1rem;
    }
    
    .coupon-discount {
        font-size: 0.9rem;
    }
    
    .copy-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Animation for copy success */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.copy-success {
    animation: copySuccess 0.3s ease;
}

/* Preloader */
.preloader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--neutral-gray-200);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Modal Styles to Match Original */
.modal-content {
    border-radius: 15px;
    border: none;
    overflow: hidden;
}

.modal-body {
    padding: 40px 30px;
}

.brand-logo-modal img {
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modal-brand-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-discount-text {
    font-size: 1.1rem;
    color: #666;
}

.coupon-code-container {
    position: relative;
}

.coupon-code-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.copy-modal-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.copy-modal-btn:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-outline-warning {
    border: 2px solid #ffc107;
    color: #ffc107;
    font-weight: 600;
    padding: 12px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-warning:hover {
    background: #ffc107;
    color: #212529;
    transform: translateY(-2px);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.btn-close:hover {
    opacity: 1;
}

.brand-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: none; /* يخفي السكروول في فايرفوكس */
}

.brand-tabs::-webkit-scrollbar {
    display: none; /* يخفي السكروول في كروم وسفاري */
}

.brand-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: max-content;
    text-decoration: none;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 12px;
    transition: background-color 0.3s;
}

.brand-tab.active {
    background-color: #ddd;
}

.brand-tab .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.copy-btn {
    background: linear-gradient(135deg, #e74c3c, #e84332); /* medium red */
}
.copy-btn:hover {
    background: linear-gradient(135deg, #e84332, #e74c3c);
}
.search-con {
    position: relative;
    max-width: 500px;
    margin: auto;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.search-con input {
    width: 100%;
    padding: 12px 60px 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    background: white;
    color: #333;
    outline: none;
}

.search-con button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e74c3c;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-con button:hover {
    background: #c0392b;
}

.search-con button i {
    font-size: 16px;
}
/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    width: 150px;
    height: auto;
    animation: splashZoom 1.5s ease-in-out infinite;
}

@keyframes splashZoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
#splash-screen {
    background-color: #6a0dad; /* solid purple */
}

<script>
    window.addEventListener('load', function () {
        const splash = document.getElementById('splash-screen');
        setTimeout(() => {
            splash.classList.add('fade-out');
        }, 1500); // wait 1.5 seconds
    });
</script>
.coupon-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px 15px;
    transition: transform 0.3s ease;
}
.coupon-card:hover {
    transform: translateY(-5px);
}
.store-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.store-name {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 15px 0 5px;
}
.coupon-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.copy-button {
    background: linear-gradient(to right, #ff4d4d, #e60023);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.copy-button:hover {
    background: #c4001e;
}
/* Override grid count manually */
@media (min-width: 992px) {
  .coupons-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991.98px) {
  .coupons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Style for the tab list */
.tabs_category {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    justify-content: center;
    margin-bottom: 20px;
}

/* Style each nav item */
.tabs_category .nav-item {
    list-style: none;
}

/* Tab links */
.tabs_category .nav-link {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Hover and active styles */
.tabs_category .nav-link:hover,
.tabs_category .nav-link.active {
    background-color: #ffde59;
    border-color: #ffcb05;
    color: #000;
}
.filter-section {
    text-align: center;
}

.box_filters {
    justify-content: center;
}

.tabs_category .nav-link {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    margin: 0 5px;
    padding: 8px 15px;
    border-radius: 10px;
    color: #000;
    transition: 0.3s ease-in-out;
}

.tabs_category .nav-link.active {
    background-color: #ffc107;
    color: #fff;
    font-weight: bold;
}

.tabs_category .nav-link:hover {
    background-color: #ffe082;
}

.icon_cate img {
    width: 20px;
    height: 20px;
    margin-left: 5px;
    vertical-align: middle;
}






/* Categories Section */
.categories-section {
    padding: 40px 0;
    background: var(--neutral-gray-50);
    border-bottom: 1px solid var(--neutral-gray-200);
}

.categories-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
}

.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 25px;
    background: var(--neutral-white);
    color: var(--neutral-gray-700);
    text-decoration: none;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--neutral-gray-200);
    min-width: 120px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.category-tab:hover {
    text-decoration: none;
    color: var(--neutral-white);
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    color: var(--neutral-white);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive Categories */
@media (max-width: 768px) {
    .categories-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        padding: 0 20px;
        justify-content: flex-start;
    }
    
    .categories-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .category-tab {
        flex-direction: row;
        min-width: 140px;
        padding: 15px 20px;
        flex-shrink: 0;
    }
    
    .category-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        margin-left: 8px;
    }
    
    .category-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .categories-section {
        padding: 20px 0;
    }
    
    .category-tab {
        min-width: 120px;
        padding: 12px 16px;
    }
    
    .category-icon {
        font-size: 1.3rem;
        margin-left: 6px;
    }
    
    .category-name {
        font-size: 0.85rem;
    }
}


/* Navigation Links */
.nav-links {
    display: flex;
    gap: 20px;
    margin-left: auto; /* Push to the left side */
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--neutral-white);
    background: var(--primary-purple);
    text-decoration: none;
}

/* Search in Hero Section */
.hero-section .search-con {
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .nav-links {
        margin-top: 15px;
        justify-content: center;
    }
    
    .hero-section .search-con {
        max-width: 90%;
    }
}


/* Performance Optimizations */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-con input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 50px 14px 16px;
    }
    
    .categories-tabs {
        padding: 0 15px;
    }
    
    .category-tab {
        min-width: 100px;
        padding: 10px 14px;
    }
    
    .category-icon {
        font-size: 1.2rem;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .coupons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .coupon-card {
        margin-bottom: 15px;
    }
    
    .coupon-header {
        height: 80px;
    }
    
    .coupon-logo {
        width: 50px;
        height: 50px;
    }
    
    .coupon-logo img {
        width: 35px;
        height: 35px;
    }
    
    .coupon-body {
        padding: 12px;
    }
    
    .coupon-brand {
        font-size: 0.95rem;
    }
    
    .coupon-discount {
        font-size: 0.85rem;
    }
    
    .copy-btn {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 481px) and (max-width: 768px) {
    .coupons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .categories-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .category-tab {
        flex-direction: column;
        min-width: 100px;
    }
    
    .category-icon {
        margin-bottom: 5px;
        margin-left: 0;
    }
}

/* Desktop Optimizations */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .coupons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

/* Ultra-wide Screen Optimizations */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .coupons-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .coupon-card:hover {
        transform: none;
    }
    
    .coupon-card:active {
        transform: scale(0.98);
    }
    
    .copy-btn:hover {
        transform: none;
    }
    
    .copy-btn:active {
        transform: scale(0.95);
    }
    
    .category-tab:hover {
        transform: none;
    }
    
    .category-tab:active {
        transform: scale(0.98);
    }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .coupon-logo img,
    .brand-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --neutral-white: #1a1a1a;
        --neutral-gray-50: #2a2a2a;
        --neutral-gray-100: #3a3a3a;
        --neutral-gray-800: #e5e5e5;
        --neutral-gray-700: #d5d5d5;
        --neutral-gray-600: #c5c5c5;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .swiper {
        --swiper-navigation-size: 0px;
    }
}

/* Print Styles */
@media print {
    .nav-bar,
    .footer,
    .copy-btn,
    .search-con {
        display: none !important;
    }
    
    .coupon-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
    }
}

/* Focus Styles for Accessibility */
.copy-btn:focus,
.category-tab:focus,
.search-con input:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Animations */
.coupon-card {
    animation: fadeInUp 0.6s ease-out;
}

.category-tab {
    animation: fadeInDown 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Animation Delays */
.coupon-card:nth-child(1) { animation-delay: 0.1s; }
.coupon-card:nth-child(2) { animation-delay: 0.2s; }
.coupon-card:nth-child(3) { animation-delay: 0.3s; }
.coupon-card:nth-child(4) { animation-delay: 0.4s; }
.coupon-card:nth-child(5) { animation-delay: 0.5s; }
.coupon-card:nth-child(6) { animation-delay: 0.6s; }
.coupon-card:nth-child(7) { animation-delay: 0.7s; }
.coupon-card:nth-child(8) { animation-delay: 0.8s; }

.category-tab:nth-child(1) { animation-delay: 0.1s; }
.category-tab:nth-child(2) { animation-delay: 0.2s; }
.category-tab:nth-child(3) { animation-delay: 0.3s; }
.category-tab:nth-child(4) { animation-delay: 0.4s; }

/* Micro-interactions */
.copy-btn {
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.copy-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Enhanced Search Styling */
.search-con {
    position: relative;
}

.search-con::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-purple), var(--accent-pink), var(--secondary-orange));
    border-radius: 27px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-con:focus-within::before {
    opacity: 1;
}

/* Improved Modal Animations */
.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Enhanced Hover Effects */
.coupon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-purple-light), var(--accent-pink-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    z-index: 1;
}

.coupon-card:hover::before {
    opacity: 0.05;
}

.coupon-card > * {
    position: relative;
    z-index: 2;
}

/* ============================= */
/* Example: Alternative NavBar RTL Styling (User Example) */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse; /* Important for RTL */
    padding: 10px 20px;
    background-color: #fff;
    direction: rtl; /* RTL layout */
}

.brand img {
    max-height: 60px;
    height: auto;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-left: auto; /* Push to the left side */
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

.hamburger-menu {
    display: none; /* Show it on small screens only */
}
/* ============================= */

