/* ===== Mobile Responsive Styles ===== */

/* Base RTL and Overflow Fix */
html, body {
    direction: rtl !important;
    text-align: right !important;
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

.container, .container-fluid, .container-custom {
    direction: rtl !important;
    text-align: right !important;
    max-width: 100% !important;
}

main {
    direction: rtl !important;
    text-align: right !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ===== Color Variables ===== */
:root {
    --site-bg-color: #dedede;
    --coupon-card-bg: #fff0fc;
    --store-card-bg: #fff0fc;
    --popular-stores-section-bg: #F9FAFB;
    --popular-stores-title-color: #1F2937;
    --featured-store-bg: #F97316;
    
    /* Header Colors */
    --header-primary: #f97316;
    --header-secondary: #dd2c2c;
    --header-tertiary: #ff0000;
    
    /* Button Colors */
    --button-primary: #dc2626;
    --button-secondary: #2563eb;
    --button-hot-deal: #f59e0b;
    
    /* Bottom Navigation */
    --bottom-nav-primary: #f97316;
    --bottom-nav-secondary: #dc2626;
    --bottom-nav-center: #f59e0b;
}

/* ===== Background Colors ===== */
body {
    background-color: var(--site-bg-color) !important;
}

.coupon-card-bg {
    background-color: var(--coupon-card-bg) !important;
}

.store-card-bg {
    background-color: var(--store-card-bg) !important;
}

.section-bg {
    background-color: var(--site-bg-color) !important;
}

.popular-stores-section {
    background-color: var(--popular-stores-section-bg) !important;
}

.popular-stores-title {
    color: var(--popular-stores-title-color) !important;
}

.featured-store-bg {
    background: linear-gradient(135deg, var(--featured-store-bg), var(--featured-store-bg)dd) !important;
    border-color: var(--featured-store-bg) !important;
}

/* ===== Mobile Header Styles ===== */
.mobile-header-animated {
    transition: all 0.3s ease;
}

.mobile-header-shadow {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-logo {
    transition: transform 0.2s ease;
}

.press-effect:active {
    transform: scale(0.95);
}

.mobile-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.inner-glow {
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.soft-glow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== Mobile Search Bar ===== */
.mobile-search-bar {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.mobile-search-bar:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-search-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 400 !important;
}

.mobile-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.mobile-search-btn {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.05);
}

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: scale(1.05);
}

.mobile-interactive {
    transition: all 0.2s ease;
}

.mobile-interactive:active {
    transform: scale(0.95);
}

.mobile-icon {
    stroke-width: 2.5;
}

.mobile-font-optimized {
    font-size: 14px;
    font-weight: 500;
}

/* ===== Swiper Styles ===== */
.featured-coupons-swiper {
    padding: 20px 0px 50px 0px;
    position: relative;
    overflow: visible;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
}

.featured-coupons-swiper .swiper-wrapper {
    align-items: stretch;
}

.featured-coupons-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.featured-coupons-swiper .swiper-pagination {
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    text-align: center !important;
    position: absolute !important;
}

.featured-coupons-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ff6b35;
    opacity: 0.4;
    margin: 0 4px !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.featured-coupons-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #ff6b35;
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.swiper-pagination-bullets {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.swiper-pagination-horizontal {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
}

/* === Featured Coupons Swiper === */
.featured-coupons-swiper {
    margin: 0 130px;
    padding-bottom: 40px;
}

/* السهمين */
.featured-coupons-swiper .swiper-button-next,
.featured-coupons-swiper .swiper-button-prev {
    color: #ff6b35;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    top: 50%;
    margin-top: -20px;
}

.featured-coupons-swiper .swiper-button-next {
    right: -120px;
}

.featured-coupons-swiper .swiper-button-prev {
    left: -120px;
}

.featured-coupons-swiper .swiper-button-next:after,
.featured-coupons-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

/* النقاط */
.featured-coupons-swiper .swiper-pagination {
    position: absolute !important;
    bottom: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
}

.featured-coupons-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ff6b35;
    opacity: 0.3;
    margin: 0 4px !important;
    display: inline-block;
}

.featured-coupons-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* الـ Slides */
.featured-coupons-swiper .swiper-slide {
    padding: 0 5px;
}

/* تحسين موضع السويبر */
.featured-coupons-swiper {
    position: relative;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .featured-coupons-swiper {
        margin: 0 80px;
        padding-bottom: 50px;
    }
    
    .featured-coupons-swiper .swiper-button-next {
        right: -70px;
        width: 35px;
        height: 35px;
    }
    
    .featured-coupons-swiper .swiper-button-prev {
        left: -70px;
        width: 35px;
        height: 35px;
    }
    
    .featured-coupons-swiper .swiper-button-next:after,
    .featured-coupons-swiper .swiper-button-prev:after {
        font-size: 14px;
    }
}

/* ===== Bottom Navigation ===== */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
    min-width: 45px;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-icon-wrapper {
    position: relative;
    margin-bottom: 2px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.nav-label {
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.nav-btn-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    position: relative;
    transform: translateY(-6px);
}

.nav-center-bg {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--dynamic-bottom-nav-center, #f59e0b) 0%, var(--dynamic-bottom-nav-secondary, #dc2626) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.nav-btn-center:hover .nav-center-bg {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.nav-btn-center.active .nav-center-bg {
    background: linear-gradient(135deg, var(--dynamic-bottom-nav-center, #f59e0b) 0%, var(--dynamic-bottom-nav-secondary, #dc2626) 100%);
    transform: scale(1.1);
    filter: brightness(1.1);
}

.nav-center-icon {
    width: 18px;
    height: 18px;
}

.nav-center-label {
    font-size: 8px;
    font-weight: 700;
    margin-top: 2px;
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 10px;
    animation: bounce 2s infinite;
}

.nav-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    border: 1px solid white;
    min-width: 14px;
    text-align: center;
}

.nav-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    border: 1px solid white;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-btn:active {
    transform: translateY(0) scale(0.95);
}

.nav-btn-center:active .nav-center-bg {
    transform: scale(1.0);
}

/* ===== Hero Slider ===== */
.hero-slider-container {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    position: relative;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-nav {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ===== Responsive Breakpoints ===== */

/* Mobile First - Small screens */
@media (max-width: 375px) {
    .nav-btn {
        padding: 4px 6px;
        min-width: 40px;
    }
    
    .nav-icon {
        width: 16px;
        height: 16px;
    }
    
    .nav-center-bg {
        width: 32px;
        height: 32px;
    }
    
    .nav-center-icon {
        width: 16px;
        height: 16px;
    }
    
    .nav-label,
    .nav-center-label {
        font-size: 7px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .featured-coupons-swiper .swiper-slide {
        transform: scale(0.85);
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hero-nav {
        width: 40px;
        height: 40px;
    }
    
    .hero-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .mobile-header-animated,
    .mobile-search-bar,
    .mobile-menu-btn,
    .nav-btn,
    .nav-btn-center {
        display: none;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== Utility Classes ===== */
.no-scroll-x {
    overflow-x: hidden !important;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Desktop Search Bar Styles ===== */
.desktop-search-bar {
    position: relative;
}

.desktop-search-input {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: 500;
}

.desktop-search-input:focus {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.desktop-search-btn:hover {
    transform: scale(1.05);
}

/* ===== Store Card Image Enhancements ===== */
.store-card-bg .h-2\/3 img {
    transition: all 0.3s ease;
    border-radius: 6px;
}

.store-card-bg:hover .h-2\/3 img {
    transform: scale(1.1);
}

/* Featured stores image styling */
.featured-stores-section .w-16.h-16 img {
    transition: all 0.3s ease;
    border-radius: 6px;
}

.featured-stores-section .group:hover .w-16.h-16 img {
    transform: scale(1.05);
}

/* ===== Force Override Tailwind ===== */
.store-card-bg.rounded-xl,
.store-card-bg.block {
    background-color: var(--store-card-bg) !important;
}

.coupon-card-bg.rounded-xl,
.coupon-card-bg.block {
    background-color: var(--coupon-card-bg) !important;
}