/* Offeratee - Purple & White Color Scheme */
/* Primary Purple: #6A1B9A, Light Purple: #AB47BC, Dark Purple: #4A148C, White: #FFFFFF */

:root {
    --primary-purple: #6A1B9A;
    --light-purple: #AB47BC;
    --dark-purple: #4A148C;
    --white: #FFFFFF;
    --text-dark: #333333;
    --border-color: #AB47BC;
    --shadow: rgba(106, 27, 154, 0.1);
}

/* Critical Navbar Styles - Force Application */
.top-row {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%) !important;
    box-shadow: 0 4px 20px var(--shadow) !important;
    min-height: 80px !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 100% !important;
    display: block !important;
}

/* Hide any duplicate sidebar navigation */
.sidebar {
    display: none !important;
}

.nav-scrollable {
    display: none !important;
}

/* Ensure mobile nav is hidden by default */
.mobile-nav {
    display: none !important;
}

    .mobile-nav.show {
        display: block !important;
    }

.top-row .container-fluid {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 2rem !important;
    height: 80px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

.navbar-brand-section {
    display: flex !important;
    align-items: center !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: white !important;
    font-weight: 800 !important;
    font-size: 1.8rem !important;
    transition: all 0.3s ease !important;
    gap: 12px !important;
}

.navbar-nav-section {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
}

.nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

    .nav-links .nav-link {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px 20px !important;
        color: white !important;
        text-decoration: none !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
        border: 1px solid transparent !important;
    }

        .nav-links .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.2) !important;
            transform: translateY(-3px) !important;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
            border-color: rgba(255, 255, 255, 0.3) !important;
        }

        .nav-links .nav-link.active {
            background-color: rgba(255, 255, 255, 0.3) !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
            border-color: rgba(255, 255, 255, 0.4) !important;
            transform: translateY(-1px) !important;
        }

.navbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.auth-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

    .auth-buttons .btn {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 0.95rem !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        border: 2px solid transparent !important;
        min-width: 100px !important;
        justify-content: center !important;
    }

    .auth-buttons .btn-outline-primary {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        color: white !important;
        backdrop-filter: blur(10px) !important;
    }

    .auth-buttons .btn-primary {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

.language-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    color: white !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.brand-logo {
    width: 45px !important;
    height: 45px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.brand-text {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    letter-spacing: -0.5px !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafbfc;
    color: var(--text-dark);
    line-height: 1.6;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-purple);
    margin-bottom: 15px;
}

a {
    color: var(--primary-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--light-purple);
    }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: var(--light-purple);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px var(--shadow);
    }

.btn-add-cart {
    width: 100%;
    background-color: var(--primary-purple);
    color: var(--white);
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-add-cart:hover {
        background-color: var(--light-purple);
    }

/* Header Styles */
.header {
    background-color: var(--white);
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.top-bar {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo h1 {
    color: var(--primary-purple);
    font-size: 28px;
    margin: 0;
    font-weight: 700;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    background-color: #f8f9fa;
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary-purple);
        background-color: var(--white);
    }

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

    .search-btn:hover {
        background-color: var(--light-purple);
    }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border: 2px solid var(--light-purple);
    border-radius: 10px;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

    .search-result-item:hover {
        background-color: rgba(171, 71, 188, 0.1);
    }

    .search-result-item img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 5px;
        margin-right: 10px;
    }

.result-info {
    flex: 1;
}

    .result-info h4 {
        margin: 0;
        font-size: 14px;
        color: var(--primary-purple);
    }

    .result-info .discount {
        color: var(--light-purple);
        font-weight: 600;
    }

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link, .language-toggle {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

    .nav-link:hover, .language-toggle:hover {
        color: var(--primary-purple);
    }

.cart-icon {
    position: relative;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 20px;
}

    .cart-icon:hover {
        color: var(--primary-purple);
    }

/* User Button - Modern Design */
.user-button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: white !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-size: 14px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 10 !important;
}

    .user-button:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    }

    .user-button i {
        font-size: 1.2rem !important;
    }

/* User Arrow - Always Visible */
.user-arrow {
    font-size: 14px !important;
    color: white !important;
    transition: transform 0.3s ease !important;
    margin-left: 8px !important;
}

.user-button:hover .user-arrow {
    transform: rotate(180deg) !important;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-top: 10px;
    z-index: 1000;
}

/* User Dropdown Menu - For NavMenu Component */
.user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    min-width: 220px !important;
    padding: 12px 0 !important;
    z-index: 9999 !important;
    animation: dropdownFadeIn 0.3s ease !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

    .dropdown-item:hover {
        background: linear-gradient(135deg, #6A1B9A 0%, #8E24AA 100%);
        color: white;
        transform: translateX(4px);
    }

    .dropdown-item i {
        font-size: 1rem;
        color: #6A1B9A;
        transition: color 0.2s ease;
    }

    .dropdown-item:hover i {
        color: white;
    }

    .dropdown-item.logout-btn {
        color: #dc3545 !important;
    }

        .dropdown-item.logout-btn:hover {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            color: white !important;
            transform: translateX(4px);
        }

    .dropdown-item:first-child {
        border-radius: 12px 12px 0 0;
    }

    .dropdown-item:last-child {
        border-radius: 0 0 12px 12px;
    }

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #eee 50%, transparent 100%);
    margin: 8px 0;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-purple);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    width: 350px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin-top: 10px;
}

.cart-items {
    padding: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

    .cart-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 5px;
        margin-right: 10px;
    }

.item-info {
    flex: 1;
}

    .item-info h4 {
        margin: 0;
        font-size: 14px;
        color: var(--primary-purple);
    }

    .item-info p {
        margin: 5px 0;
        font-size: 12px;
        color: #666;
    }

    .item-info .price {
        font-weight: 600;
        color: var(--primary-purple);
    }

.remove-btn {
    background: none;
    border: none;
    color: var(--light-purple);
    cursor: pointer;
    font-size: 18px;
}

    .remove-btn:hover {
        color: var(--primary-purple);
    }

.cart-footer {
    padding: 15px;
    border-top: 2px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.empty-cart {
    padding: 20px;
    text-align: center;
    color: #666;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    background-color: var(--white);
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

    .mobile-nav-link:hover {
        background-color: rgba(106, 27, 154, 0.1);
        color: var(--primary-purple);
        padding-left: 20px;
    }

    .mobile-nav-link i {
        width: 20px;
        text-align: center;
        color: var(--primary-purple);
    }

    .mobile-nav-link.logout-btn {
        color: #dc3545;
    }

        .mobile-nav-link.logout-btn:hover {
            background-color: rgba(220, 53, 69, 0.1);
            color: #dc3545;
        }

        .mobile-nav-link.logout-btn i {
            color: #dc3545;
        }

.mobile-menu-divider {
    height: 1px;
    background: rgba(106, 27, 154, 0.2);
    margin: 10px 0;
}

.mobile-cart-badge {
    background: var(--primary-purple);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    margin-left: auto;
}

/* RTL Support for Mobile Menu */
.rtl .mobile-nav-link {
    text-align: right;
}

    .rtl .mobile-nav-link:hover {
        padding-right: 20px;
        padding-left: 15px;
    }

.rtl .mobile-cart-badge {
    margin-left: 0;
    margin-right: auto;
}

/* Category Navbar */
.category-navbar {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.category-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

    .category-item:hover {
        color: var(--primary-purple);
        background-color: rgba(106, 27, 154, 0.05);
        transform: translateY(-2px);
    }

    .category-item i {
        font-size: 24px;
        margin-bottom: 5px;
        color: var(--primary-purple);
    }

    .category-item span {
        font-size: 13px;
        font-weight: 500;
    }

/* Home Page */
.home-page {
    padding: 30px 0;
}

.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
    animation: fadeInUp 0.6s ease;
}

    .featured-section > * {
        min-width: 0;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-carousel {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.section-title {
    color: var(--text-dark);
    font-size: 32px;
    margin-bottom: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    padding-left: 24px;
}

    .section-title::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 100%;
        background: linear-gradient(to bottom, var(--primary-purple), var(--light-purple));
        border-radius: 3px;
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
    }

.featured-carousel .section-title {
    text-shadow: 0 2px 8px rgba(106, 27, 154, 0.1);
}

/* Carousel Styles */
.hot-carousel .carousel-item {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

    .hot-carousel .carousel-item * {
        cursor: pointer;
    }

    .hot-carousel .carousel-item:hover .carousel-image img {
        transform: scale(1.08);
    }

.carousel-image {
    position: relative;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.1), rgba(171, 71, 188, 0.1));
    width: 100%;
}

.hot-carousel .carousel-image {
    border-radius: 20px;
}

.carousel-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.2) 60%, transparent 100% );
    z-index: 1;
    transition: all 0.4s ease;
}

.hot-carousel .carousel-item:hover .carousel-image::before {
    background: linear-gradient( to top, rgba(106, 27, 154, 0.9) 0%, rgba(106, 27, 154, 0.5) 40%, rgba(106, 27, 154, 0.3) 60%, transparent 100% );
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: var(--white);
    z-index: 2;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.hot-carousel .carousel-item:hover .carousel-overlay {
    transform: translateY(-10px);
}

.carousel-overlay h3 {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    line-height: 1.3;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FF6B6B, #FF4757);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    animation: discountPulse 2s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes discountPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(255, 71, 87, 0.6);
    }
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .rating i {
        color: #FFD700;
        font-size: 18px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .rating span {
        font-weight: 700;
        font-size: 16px;
        color: var(--white);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

.rates-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

/* Owl Carousel Override */
.owl-carousel {
    position: relative;
    z-index: 1;
}

.owl-theme .owl-nav {
    margin-top: 0 !important;
}

    .owl-theme .owl-nav button {
        background-color: var(--primary-purple) !important;
        color: var(--white) !important;
        border-radius: 50% !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 20px !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2) !important;
    }

        .owl-theme .owl-nav button:hover {
            background-color: var(--light-purple) !important;
            transform: scale(1.1) !important;
            box-shadow: 0 6px 16px rgba(106, 27, 154, 0.3) !important;
        }

        .owl-theme .owl-nav button:focus {
            outline: none !important;
        }

        .owl-theme .owl-nav button.disabled {
            opacity: 0.5 !important;
            cursor: not-allowed !important;
        }

.owl-theme .owl-dots {
    margin-top: 24px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
}

    .owl-theme .owl-dots .owl-dot {
        outline: none !important;
    }

        .owl-theme .owl-dots .owl-dot span {
            background-color: rgba(106, 27, 154, 0.3) !important;
            width: 10px !important;
            height: 10px !important;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
            margin: 0 !important;
        }

        .owl-theme .owl-dots .owl-dot:hover span {
            background-color: rgba(106, 27, 154, 0.6) !important;
            transform: scale(1.2) !important;
        }

        .owl-theme .owl-dots .owl-dot.active span {
            background: linear-gradient(135deg, var(--primary-purple), var(--light-purple)) !important;
            width: 40px !important;
            border-radius: 6px !important;
            box-shadow: 0 4px 12px rgba(106, 27, 154, 0.4) !important;
        }

/* Hot Carousel Specific Styles */
.hot-carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(106, 27, 154, 0.2);
    position: relative;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.05), rgba(171, 71, 188, 0.05));
    max-width: 100%;
    box-sizing: border-box;
}

    .hot-carousel .owl-stage-outer {
        border-radius: 20px;
        overflow: hidden;
    }

    .hot-carousel .owl-stage {
        display: flex;
    }

    .hot-carousel .owl-item {
        flex-shrink: 0;
    }

    .hot-carousel .owl-nav button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 50px !important;
        height: 50px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    }

        .hot-carousel .owl-nav button:hover {
            background: var(--primary-purple) !important;
            transform: translateY(-50%) scale(1.1) !important;
        }

    .hot-carousel .owl-nav .owl-prev {
        left: 16px;
    }

    .hot-carousel .owl-nav .owl-next {
        right: 16px;
    }

/* Category Carousel Specific Styles */
.category-carousel {
    margin: 0 -10px;
    width: 100% !important;
    max-width: 100% !important;
}

    .category-carousel .owl-stage-outer {
        width: 100% !important;
        max-width: 100% !important;
    }

    .category-carousel .owl-item {
        display: flex !important;
    }

    .category-carousel .owl-nav button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

    .category-carousel .owl-nav .owl-prev {
        left: -25px;
    }

    .category-carousel .owl-nav .owl-next {
        right: -25px;
    }

    .category-carousel .carousel-offer-card {
        padding: 10px;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
    }

        .category-carousel .carousel-offer-card .offer-card {
            width: 100%;
            max-width: 100%;
        }

/* Carousel Item Animations */
.owl-carousel .owl-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .owl-carousel .owl-item.active {
        opacity: 1;
        transform: scale(1);
    }

    .owl-carousel .owl-item.center {
        transform: scale(1.05);
    }

/* Top Rated Sidebar */
.top-rated-sidebar {
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.top-rated-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-rated-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

    .top-rated-item:hover {
        background-color: var(--white);
        border-color: var(--primary-purple);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.08);
        transform: translateX(5px);
    }

    .top-rated-item img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 10px;
    }

    .top-rated-item h4 {
        margin: 0;
        font-size: 14px;
        color: var(--primary-purple);
    }

    .top-rated-item .discount {
        color: var(--light-purple);
        font-weight: 600;
        font-size: 12px;
    }

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--white);
    color: var(--text-dark);
    border: 1px solid #e0e0e0;
    padding: 12px 28px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

    .filter-btn:hover {
        background-color: #f8f9fa;
        border-color: var(--primary-purple);
        color: var(--primary-purple);
        box-shadow: 0 4px 8px rgba(106, 27, 154, 0.12);
    }

    .filter-btn.active {
        background-color: var(--primary-purple);
        color: var(--white);
        border-color: var(--primary-purple);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
    }

    .filter-btn i {
        margin-right: 8px;
    }

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Offer Card */
.offer-card {
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

    .offer-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.12);
        border-color: var(--primary-purple);
    }

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    z-index: 10;
}

.badge-hot {
    background-color: var(--light-purple);
}

.badge-new {
    background-color: var(--primary-purple);
    top: 40px;
}

.badge-bestseller {
    background-color: var(--dark-purple);
    top: 70px;
}

.card-image {
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .card-image:hover img {
        transform: scale(1.1);
    }

.card-body {
    padding: 15px;
}

.merchant-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

    .merchant-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.offer-title {
    font-size: 16px;
    color: var(--primary-purple);
    margin: 10px 0;
    cursor: pointer;
    min-height: 40px;
}

    .offer-title:hover {
        color: var(--light-purple);
    }

.offer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.discounted-price {
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 18px;
}

.location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 12px;
    margin: 10px 0;
}

    .location i {
        color: var(--light-purple);
    }

/* Category Section */
.category-section {
    margin: 50px 0;
}

.no-offers-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 2px dashed #e0e0e0;
}

    .no-offers-message i {
        color: var(--light-purple);
        margin-bottom: 16px;
        opacity: 0.6;
    }

    .no-offers-message p {
        color: #666;
        font-size: 16px;
        margin: 0;
        font-weight: 500;
    }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.show-all-link {
    color: var(--primary-purple);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .show-all-link:hover {
        color: var(--light-purple);
    }

.category-carousel .carousel-offer-card {
    padding: 10px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    border: none;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e0e0e0;
    background-color: var(--white);
    color: var(--text-dark);
}

    .modal-header h3 {
        margin: 0;
        color: var(--primary-purple);
        font-weight: 700;
    }

.modal-close {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .modal-close:hover {
        background-color: #f8f9fa;
        color: var(--primary-purple);
    }

.modal-body {
    padding: 24px 28px;
}

.coupon-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

    .coupon-option:hover {
        background-color: var(--white);
        border-color: var(--primary-purple);
        box-shadow: 0 4px 16px rgba(106, 27, 154, 0.12);
        transform: translateY(-2px);
    }

.coupon-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-purple);
}

.coupon-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.coupon-price {
    text-align: right;
}

    .coupon-price .original {
        display: block;
        text-decoration: line-through;
        color: #999;
        font-size: 14px;
    }

    .coupon-price .discounted {
        display: block;
        color: var(--primary-purple);
        font-weight: 700;
        font-size: 18px;
    }

    .coupon-price .discount-percent {
        display: block;
        color: var(--light-purple);
        font-size: 12px;
        font-weight: 600;
    }

/* Footer */
.footer {
    background-color: #f8f9fa;
    color: var(--text-dark);
    padding: 50px 0 20px;
    margin-top: 80px;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3, .footer-section h4 {
    color: var(--primary-purple);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.8;
    color: #666;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.contact-info i {
    color: var(--primary-purple);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

    .social-links a {
        color: var(--text-dark);
        font-size: 20px;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: var(--white);
        border: 1px solid #e0e0e0;
    }

        .social-links a:hover {
            color: var(--white);
            background-color: var(--primary-purple);
            border-color: var(--primary-purple);
            transform: translateY(-3px);
        }

.footer-links {
    list-style: none;
}

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        color: #666;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: var(--primary-purple);
        }

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: var(--white);
}

    .newsletter-input:focus {
        outline: none;
        border-color: var(--primary-purple);
    }

.newsletter-btn {
    background-color: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .newsletter-btn:hover {
        background-color: var(--light-purple);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
    }

.payment-methods {
    margin-top: 24px;
}

    .payment-methods h5 {
        color: var(--primary-purple);
        margin-bottom: 12px;
        font-weight: 600;
    }

.payment-icons {
    display: flex;
    gap: 12px;
    font-size: 32px;
}

    .payment-icons i {
        color: var(--primary-purple);
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }

        .payment-icons i:hover {
            opacity: 1;
        }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    color: #666;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary-purple);
    font-size: 18px;
}

/* RTL Support */
.rtl {
    direction: rtl;
}

    .rtl .header-content,
    .rtl .filter-bar,
    .rtl .category-list {
        direction: rtl;
    }

    /* RTL Support for Header Cart and User Menu */
    .rtl .header-nav .cart-icon {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .rtl .header-nav .cart-count {
        right: auto !important;
        left: 5px !important;
    }

    .rtl .header-nav .user-dropdown {
        right: auto !important;
        left: 0 !important;
    }

    .rtl .header-nav .user-button {
        flex-direction: row-reverse !important;
    }

/* Responsive Design */
@media (max-width: 992px) {
    .featured-section {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .featured-carousel {
        width: 100%;
        max-width: 100%;
    }

    .hot-carousel {
        width: 100%;
    }

    .top-rated-sidebar {
        order: -1;
    }

    .offers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .category-list {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: flex !important;
        gap: 10px !important;
    }

        /* Hide nav links on mobile, but keep cart and user menu visible */
        .header-nav > a.nav-link:not(.user-button) {
            display: none !important;
        }

        .header-nav > button.language-toggle {
            display: none !important;
        }

        /* Keep user button and menu visible */
        .header-nav .nav-link.user-button {
            display: flex !important;
        }

        /* Ensure cart icon stays visible on mobile */
        .header-nav .cart-icon {
            display: flex !important;
            padding: 8px 12px !important;
        }

            .header-nav .cart-icon i {
                font-size: 20px !important;
            }

        /* Ensure user menu stays visible on mobile */
        .header-nav .user-menu-container {
            display: flex !important;
        }

        .header-nav .user-button {
            padding: 6px 12px !important;
            font-size: 14px !important;
        }

        .header-nav .user-name {
            max-width: 80px !important;
            font-size: 13px !important;
        }

        .header-nav .arrow-icon {
            font-size: 12px !important;
        }

    .mobile-menu-toggle {
        display: block;
    }

    .search-box {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .container {
        padding: 0 12px;
    }

    .featured-section {
        gap: 24px;
    }

    .featured-carousel {
        padding: 0;
    }

    .hot-carousel {
        width: 100%;
        max-width: 100%;
    }

    .offers-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .filter-bar {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .carousel-image {
        height: 350px;
    }

    .carousel-overlay {
        padding: 30px 24px;
    }

        .carousel-overlay h3 {
            font-size: 26px;
        }

    .discount-badge {
        font-size: 14px;
        padding: 8px 16px;
    }

    .rating {
        padding: 6px 12px;
    }

        .rating span {
            font-size: 14px;
        }

    .hot-carousel .owl-nav button {
        width: 45px !important;
        height: 45px !important;
    }

    .hot-carousel .owl-nav .owl-prev {
        left: 12px;
    }

    .hot-carousel .owl-nav .owl-next {
        right: 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 20px;
    }

    .container {
        padding: 0 10px;
    }

    .featured-section {
        gap: 20px;
        margin-bottom: 40px;
    }

    .featured-carousel {
        width: 100%;
        padding: 0;
    }

    .hot-carousel {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .category-list {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .category-item {
        flex-shrink: 0;
    }

    .carousel-image {
        height: 280px;
    }

    .carousel-overlay {
        padding: 20px 16px;
    }

        .carousel-overlay h3 {
            font-size: 22px;
            margin-bottom: 12px;
        }

    .discount-badge {
        font-size: 13px;
        padding: 6px 14px;
    }

    .rating {
        padding: 5px 10px;
        font-size: 13px;
    }

        .rating i {
            font-size: 14px;
        }

    .hot-carousel .owl-nav button {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }

    .hot-carousel .owl-nav .owl-prev {
        left: 8px;
    }

    .hot-carousel .owl-nav .owl-next {
        right: 8px;
    }

    .owl-theme .owl-dots {
        margin-top: 16px !important;
    }

    .section-title {
        font-size: 24px;
        padding-left: 20px;
    }

        .section-title::before {
            width: 5px;
        }

    .cart-dropdown {
        width: 90vw;
        right: 5vw;
    }
}

/* Font Awesome Icon Colors */
.fa, .fas, .far, .fab {
    color: var(--primary-purple);
}

    .fa:hover, .fas:hover, .far:hover, .fab:hover {
        color: var(--light-purple);
    }

/* Override any conflicting styles */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--light-purple) var(--white);
}

    *::-webkit-scrollbar {
        width: 8px;
    }

    *::-webkit-scrollbar-track {
        background: var(--white);
    }

    *::-webkit-scrollbar-thumb {
        background: var(--light-purple);
        border-radius: 4px;
    }

        *::-webkit-scrollbar-thumb:hover {
            background: var(--primary-purple);
        }

/* ============================================
   AUTHENTICATION PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.05) 0%, rgba(171, 71, 188, 0.05) 100%);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.auth-header h1 {
    color: var(--primary-purple);
    font-size: 32px;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-purple);
        box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.1);
    }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.btn-full {
    width: 100%;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

    .auth-info h2 {
        color: var(--primary-purple);
        font-size: 28px;
        margin-bottom: 15px;
    }

    .auth-info p {
        color: #666;
        margin-bottom: 30px;
    }

.features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

    .feature i {
        color: var(--primary-purple);
        font-size: 20px;
    }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

    .toast-notification.show {
        opacity: 1;
        transform: translateX(0);
    }

.toast-success {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #F44336, #EF5350);
    color: white;
}

.toast-warning {
    background: linear-gradient(135deg, #FF9800, #FFA726);
    color: white;
}

.toast-info {
    background: linear-gradient(135deg, #2196F3, #42A5F5);
    color: white;
}

.toast-icon {
    font-size: 24px;
}

.toast-content {
    flex: 1;
}

    .toast-content p {
        margin: 0;
        font-weight: 500;
    }

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

    .toast-close:hover {
        opacity: 1;
    }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--dark-purple) 0%, var(--primary-purple) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-collapsed .admin-sidebar {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .sidebar-header h2 {
        color: white;
        font-size: 22px;
        margin: 0;
    }

.sidebar-collapsed .sidebar-header h2 {
    display: none;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .sidebar-toggle:hover {
        background: rgba(255,255,255,0.2);
    }

.sidebar-nav {
    flex: 1;
    padding: 20px 10px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .nav-item:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }

    .nav-item.active {
        background: rgba(255,255,255,0.15);
        color: white;
    }

    .nav-item i {
        font-size: 18px;
        width: 20px;
        color: white;
    }

.sidebar-collapsed .nav-item span {
    display: none;
}

.sidebar-footer {
    padding: 20px 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-btn {
    color: #ffcdd2;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s ease;
}

.sidebar-collapsed .admin-content {
    margin-left: 80px;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

    .admin-header-left h1 {
        margin: 0;
        font-size: 24px;
        color: var(--primary-purple);
    }

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.admin-main {
    padding: 30px;
}

.admin-page {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

    .page-header h2 {
        margin: 0;
        color: var(--primary-purple);
        font-size: 28px;
    }

.admin-dashboard {
    padding: 20px 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 32px;
    color: var(--text-dark);
}

.stat-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

    .card-header h3 {
        margin: 0;
        color: var(--primary-purple);
        font-size: 18px;
    }

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.data-table {
    overflow-x: auto;
}

    .data-table table {
        width: 100%;
        border-collapse: collapse;
    }

    .data-table th {
        background: #f8f9fa;
        padding: 12px 16px;
        text-align: left;
        font-weight: 600;
        color: var(--text-dark);
        border-bottom: 2px solid #e0e0e0;
    }

    .data-table td {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .data-table tr:hover {
        background-color: #f8f9fa;
    }

.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.badge-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

.badge-secondary {
    background-color: #f5f5f5;
    color: #616161;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .btn-icon:hover {
        background-color: #f0f0f0;
    }

.btn-edit {
    color: #2196F3;
}

.btn-coupons {
    color: #FF9800;
}

    .btn-coupons:hover {
        background-color: rgba(255, 152, 0, 0.1);
    }

.btn-delete {
    color: #F44336;
}

.btn-images {
    color: var(--primary-purple);
}

.top-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}

    .top-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
    }

.item-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: var(--primary-purple);
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Modal Enhancements */
.modal-large {
    max-width: 900px;
}

.modal-extra-large {
    max-width: 1200px;
    width: 95%;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

    .form-checkbox input[type="checkbox"] {
        width: auto;
    }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--text-dark);
}

    .btn-secondary:hover {
        background-color: #d0d0d0;
    }

/* Image Upload Section */
.image-upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #e0e0e0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .upload-area.dragging {
        border-color: var(--primary-purple);
        background: rgba(106, 27, 154, 0.05);
    }

    .upload-area i {
        font-size: 48px;
        color: var(--light-purple);
        margin-bottom: 16px;
    }

.file-input {
    display: none;
}

.upload-hint {
    color: #999;
    font-size: 13px;
    margin-top: 12px;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--light-purple));
    transition: width 0.3s ease;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
}

    .image-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.primary-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.merchant-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.merchant-logo {
    text-align: center;
}

    .merchant-logo img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        border-radius: 12px;
    }

.merchant-info {
    flex: 1;
}

    .merchant-info h3 {
        margin: 0 0 10px 0;
        color: var(--primary-purple);
    }

    .merchant-info p {
        margin: 5px 0;
        color: #666;
        font-size: 14px;
    }

.merchant-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   OFFER DETAIL PAGE
   ============================================ */
.offer-detail-page {
    padding: 40px 0;
}

.offer-detail-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.offer-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

    .main-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.offer-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    z-index: 10;
}

.image-thumbnails {
    display: flex;
    gap: 12px;
}

    .image-thumbnails img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 12px;
        cursor: pointer;
        border: 3px solid transparent;
        transition: all 0.3s ease;
    }

        .image-thumbnails img:hover,
        .image-thumbnails img.active {
            border-color: var(--primary-purple);
        }

.offer-info-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.merchant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.merchant-logo-small {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
}

.merchant-name {
    margin: 0;
    font-weight: 600;
    color: var(--text-dark);
}

.category-name {
    margin: 0;
    font-size: 13px;
    color: #999;
}

.offer-title {
    color: var(--primary-purple);
    font-size: 28px;
    margin: 0 0 20px 0;
}

.offer-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stars i {
    color: #FFC107;
    font-size: 18px;
}

.rating-value {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 18px;
}

.rating-count {
    color: #999;
}

.discount-highlight {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.offer-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.offer-description h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.offer-description p {
    color: #666;
    line-height: 1.8;
}

.offer-location {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
}

.coupons-section {
    margin: 60px 0;
}

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.coupon-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

    .coupon-card:hover {
        border-color: var(--primary-purple);
        box-shadow: 0 8px 24px rgba(106, 27, 154, 0.15);
        transform: translateY(-4px);
    }

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

    .coupon-header h3 {
        margin: 0;
        font-size: 18px;
        color: var(--text-dark);
    }

.coupon-discount {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.coupon-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.coupon-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

    .coupon-pricing .original-price {
        text-decoration: line-through;
        color: #999;
        font-size: 16px;
    }

    .coupon-pricing .discounted-price {
        color: var(--primary-purple);
        font-size: 24px;
        font-weight: 700;
    }

.coupon-details {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.points-badge, .expiry-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

    .points-badge i {
        color: #FFC107;
    }

.related-offers-section {
    margin-top: 60px;
}

/* ============================================
   MERCHANT & CATEGORY PAGES
   ============================================ */
.merchant-page, .category-page {
    padding-bottom: 60px;
}

.merchant-header-banner {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
}

    .merchant-header-banner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
    }

.merchant-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.merchant-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.merchant-info-header h1 {
    color: white;
    font-size: 36px;
    margin: 0 0 12px 0;
}

.merchant-meta {
    display: flex;
    gap: 24px;
    color: white;
    margin-bottom: 16px;
}

.merchant-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

    .social-link:hover {
        background: white;
        color: var(--primary-purple);
    }

.category-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
}

    .category-header h1 {
        color: white;
        font-size: 36px;
        margin: 0 0 12px 0;
    }

    .category-header p {
        color: rgba(255,255,255,0.9);
        font-size: 18px;
        margin-bottom: 16px;
    }

.offers-count {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 24px;
    display: inline-block;
    font-weight: 600;
}

.filter-sort-bar {
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offer-card, .merchant-card, .coupon-card {
    animation: fadeIn 0.5s ease;
}

/* Loading States */
.loading-page {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(106, 27, 154, 0.1);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-info {
        display: none;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

        .admin-sidebar.mobile-open {
            transform: translateX(0);
        }

    .admin-content {
        margin-left: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .offer-detail-header {
        grid-template-columns: 1fr;
    }

    .merchant-header-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .merchants-grid {
        grid-template-columns: 1fr;
    }

    .coupons-grid {
        grid-template-columns: 1fr;
    }

    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ============================================
   ADMIN SEARCH & FILTER SECTION
   ============================================ */
.search-filter-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.search-box-admin {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

    .search-box-admin i {
        position: absolute;
        left: 16px;
        color: var(--primary-purple);
        font-size: 18px;
        z-index: 1;
    }

.search-input-admin {
    width: 100%;
    padding: 14px 50px 14px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

    .search-input-admin:focus {
        outline: none;
        border-color: var(--primary-purple);
        background-color: var(--white);
        box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.1);
    }

.btn-clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

    .btn-clear-search:hover {
        background: rgba(244, 67, 54, 0.1);
        color: #F44336;
    }

.pagination-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .pagination-size-selector label {
        color: var(--text-dark);
        font-weight: 600;
        margin: 0;
        white-space: nowrap;
    }

    .pagination-size-selector select {
        padding: 10px 16px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-dark);
        background-color: var(--white);
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 80px;
    }

        .pagination-size-selector select:hover {
            border-color: var(--primary-purple);
        }

        .pagination-size-selector select:focus {
            outline: none;
            border-color: var(--primary-purple);
            box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.1);
        }

/* Table Row Animations */
.table-row-fade-in {
    animation: tableRowFadeIn 0.4s ease;
}

@keyframes tableRowFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

    .loading-section p {
        margin-top: 20px;
        color: var(--primary-purple);
        font-size: 18px;
        font-weight: 600;
    }

.spinner-medium {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(106, 27, 154, 0.1);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced No Data State */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

    .no-data i {
        color: #ddd;
        margin-bottom: 20px;
    }

    .no-data p {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 20px;
    }

/* ============================================
   NEW FEATURES - PAGINATION & LISTING PAGES
   ============================================ */

/* Pagination Control */
.pagination-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 50px 0 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .pagination-btn:hover:not(:disabled) {
        background: var(--primary-purple);
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
    }

    .pagination-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        border-color: #ccc;
        color: #999;
    }

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid #e0e0e0;
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .pagination-page:hover {
        border-color: var(--primary-purple);
        color: var(--primary-purple);
    }

    .pagination-page.active {
        background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
        border-color: var(--primary-purple);
        color: var(--white);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
    }

.pagination-ellipsis {
    color: var(--text-dark);
    padding: 0 8px;
    font-weight: 600;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 16px;
}

/* Listing Page Header */
.listing-page {
    min-height: 100vh;
    padding-bottom: 60px;
}

.listing-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    padding: 60px 0 40px 0;
    margin-bottom: 40px;
    text-align: center;
}

    .listing-header h1 {
        color: var(--white);
        font-size: 42px;
        margin: 0 0 12px 0;
        font-weight: 800;
    }

    .listing-header p {
        color: rgba(255, 255, 255, 0.95);
        font-size: 18px;
        margin: 0;
    }

/* Loading States */
.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

    .loading-section p {
        margin-top: 20px;
        color: var(--primary-purple);
        font-size: 18px;
        font-weight: 600;
    }

.spinner-medium {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(106, 27, 154, 0.1);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
}

    .loading-spinner p {
        color: var(--primary-purple);
        font-weight: 600;
    }

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.category-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

    .category-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 6px;
        height: 100%;
        background: linear-gradient(to bottom, var(--primary-purple), var(--light-purple));
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .category-card:hover {
        border-color: var(--primary-purple);
        box-shadow: 0 8px 24px rgba(106, 27, 154, 0.15);
        transform: translateY(-4px);
    }

        .category-card:hover::before {
            transform: scaleY(1);
        }

.category-card-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.1), rgba(171, 71, 188, 0.1));
    border-radius: 16px;
    color: var(--primary-purple);
}

.category-card-body {
    flex: 1;
}

    .category-card-body h3 {
        color: var(--primary-purple);
        font-size: 20px;
        margin: 0 0 8px 0;
        font-weight: 700;
    }

.category-description {
    color: #666;
    font-size: 14px;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 14px;
}

.category-card-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(106, 27, 154, 0.1);
    border-radius: 50%;
    color: var(--primary-purple);
    transition: all 0.3s ease;
}

.category-card:hover .category-card-arrow {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateX(4px);
}

/* Merchants Grid */
.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.merchant-listing-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

    .merchant-listing-card:hover {
        border-color: var(--primary-purple);
        box-shadow: 0 12px 32px rgba(106, 27, 154, 0.15);
        transform: translateY(-6px);
    }

.merchant-card-header {
    padding: 30px;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.05), rgba(171, 71, 188, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.merchant-logo-large {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.merchant-logo-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(106, 27, 154, 0.1);
    border-radius: 16px;
    color: var(--primary-purple);
}

.merchant-card-body {
    flex: 1;
    padding: 24px;
}

    .merchant-card-body h3 {
        color: var(--primary-purple);
        font-size: 22px;
        margin: 0 0 12px 0;
        font-weight: 700;
    }

.merchant-address, .merchant-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

    .merchant-address i, .merchant-phone i {
        color: var(--primary-purple);
        width: 16px;
    }

.merchant-social-links {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(106, 27, 154, 0.1);
    border-radius: 50%;
    color: var(--primary-purple);
    transition: all 0.3s ease;
    text-decoration: none;
}

    .social-icon:hover {
        background: var(--primary-purple);
        color: var(--white);
        transform: translateY(-2px);
    }

.merchant-card-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* Enhanced Offer Detail Carousel */
.main-image-carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f8f9fa;
}

.main-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offer-badges-container {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.offer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.badge-toprated {
    background: linear-gradient(135deg, #FFA726, #FB8C00);
}

.discount-badge-large {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: var(--white);
    font-size: 28px;
    font-weight: 900;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
    z-index: 10;
    transform: rotate(-5deg);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    color: var(--primary-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

    .carousel-nav:hover {
        background: var(--primary-purple);
        color: var(--white);
        transform: translateY(-50%) scale(1.1);
    }

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.thumbnail-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

    .thumbnail-wrapper:hover {
        border-color: var(--light-purple);
    }

    .thumbnail-wrapper.active {
        border-color: var(--primary-purple);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
    }

/* Merchant Page Enhancements */
.merchant-top-offers {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.03), rgba(171, 71, 188, 0.03));
    border-radius: 20px;
}

.merchant-all-offers {
    margin: 50px 0;
}

.load-more-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

/* Infinite Scroll Loading */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Enhanced No Data State */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

    .no-data i {
        color: #ddd;
        margin-bottom: 20px;
    }

    .no-data p {
        font-size: 18px;
        font-weight: 600;
    }

/* Responsive Enhancements for New Components */
@media (max-width: 992px) {
    .listing-header h1 {
        font-size: 32px;
    }

    .categories-grid,
    .merchants-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .merchant-top-offers {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .listing-header {
        padding: 40px 0 30px 0;
    }

        .listing-header h1 {
            font-size: 28px;
        }

        .listing-header p {
            font-size: 16px;
        }

    .categories-grid,
    .merchants-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        flex-direction: column;
        text-align: center;
    }

    .category-card-arrow {
        display: none;
    }

    .pagination-control {
        gap: 6px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .pagination-page {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .discount-badge-large {
        font-size: 20px;
        padding: 12px 16px;
    }

    .merchant-top-offers {
        padding: 20px 16px;
    }
}

@media (max-width: 576px) {
    .main-image-carousel {
        aspect-ratio: 1;
    }

    .offer-badges-container {
        top: 12px;
        left: 12px;
    }

    .offer-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .discount-badge-large {
        top: 12px;
        right: 12px;
        font-size: 18px;
        padding: 10px 14px;
    }
}

/* ========================================
   CART & CHECKOUT PAGES
======================================== */

.cart-page, .checkout-page {
    padding: 40px 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ffffff 100%);
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-top: 30px;
}

.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-purple);
}

    .section-header h2 {
        color: var(--primary-purple);
        margin: 0;
    }

.btn-link {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
}

    .btn-link:hover {
        opacity: 0.7;
    }

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

    .cart-item-card:hover {
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.15);
        border-color: var(--light-purple);
    }

.item-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.item-coupon {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.item-merchant {
    font-size: 12px;
    color: #999;
    margin: 5px 0;
}

    .item-merchant i {
        margin-right: 5px;
    }

.item-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
}

.discount-badge {
    background: var(--light-purple);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.discounted-price {
    color: var(--primary-purple);
    font-size: 18px;
    font-weight: bold;
}

.item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: var(--light-purple);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

    .qty-btn:hover {
        background: var(--primary-purple);
    }

    .qty-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-dark);
}

    .qty-input:focus {
        outline: none;
    }

.item-total {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-purple);
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-remove:hover {
        background: #c82333;
        transform: scale(1.05);
    }

.cart-summary-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px var(--shadow);
}

    .summary-card h2 {
        color: var(--primary-purple);
        margin: 0 0 20px 0;
        font-size: 20px;
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-total {
    border-top: 2px solid var(--primary-purple);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-purple);
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 15px 0;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
}

.empty-cart-message {
    text-align: center;
    padding: 80px 20px;
}

    .empty-cart-message i {
        font-size: 80px;
        color: var(--light-purple);
        margin-bottom: 20px;
    }

    .empty-cart-message h2 {
        color: var(--text-dark);
        margin-bottom: 10px;
    }

    .empty-cart-message p {
        color: #666;
        margin-bottom: 30px;
    }

/* Checkout Page */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-top: 30px;
}

.order-details-section, .payment-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px var(--shadow);
}

.order-info {
    margin: 15px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-items h3 {
    color: var(--primary-purple);
    margin: 20px 0 10px 0;
    font-size: 16px;
}

.order-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
}

    .order-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
    }

    .order-item .item-info h4 {
        font-size: 14px;
        margin: 0 0 5px 0;
    }

    .order-item .item-info p {
        font-size: 12px;
        color: #666;
        margin: 0;
    }

    .order-item .quantity {
        font-size: 12px;
        color: #999;
    }

    .order-item .item-price {
        font-size: 16px;
        font-weight: bold;
        color: var(--primary-purple);
    }

.payment-method {
    margin: 20px 0;
}

    .payment-method h3 {
        color: var(--text-dark);
        font-size: 14px;
        margin-bottom: 10px;
    }

.method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

    .method-option.selected {
        border-color: var(--primary-purple);
        background: rgba(106, 27, 154, 0.05);
    }

    .method-option i {
        font-size: 20px;
        color: var(--primary-purple);
    }

.btn-pay {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.security-note {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
}

    .security-note i {
        color: #28a745;
        margin-right: 8px;
    }

    .security-note p {
        font-size: 12px;
        color: #666;
        margin: 0;
    }

/* Payment Return Page */
.payment-return-page {
    padding: 60px 0;
    text-align: center;
}

.success-message, .error-message, .info-message {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
}

.success-icon, .error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

    .success-icon i {
        color: #28a745;
    }

    .error-icon i {
        color: #dc3545;
    }

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* ========================================
   MY COUPONS PAGE
======================================== */

.my-coupons-page {
    padding: 40px 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ffffff 100%);
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

    .tab-btn.active {
        background: var(--primary-purple);
        color: white;
        border-color: var(--primary-purple);
    }

    .tab-btn:hover {
        background: var(--light-purple);
        color: white;
        border-color: var(--light-purple);
    }

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.purchased-coupon-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
}

    .purchased-coupon-card.active {
        border-color: var(--primary-purple);
    }

    .purchased-coupon-card.used {
        opacity: 0.7;
        border-color: #999;
    }

    .purchased-coupon-card.expired {
        opacity: 0.6;
        border-color: #dc3545;
    }

.coupon-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.status-active {
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-used {
    background: #999;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-expired {
    background: #dc3545;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .coupon-header img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
    }

.header-info h3 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: var(--text-dark);
}

.merchant-name {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.coupon-details h4 {
    font-size: 14px;
    color: var(--primary-purple);
    margin: 10px 0 5px 0;
}

.coupon-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.coupon-code-section {
    margin: 15px 0;
}

    .coupon-code-section label {
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 5px;
    }

.code-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f9f9f9;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
}

.code-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-purple);
    letter-spacing: 2px;
}

.btn-copy {
    background: var(--light-purple);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-copy:hover {
        background: var(--primary-purple);
        transform: scale(1.05);
    }

.qr-code-section {
    text-align: center;
    margin: 15px 0;
}

    .qr-code-section label {
        display: block;
        font-size: 12px;
        color: #666;
        margin-bottom: 10px;
    }

.qr-code-container {
    display: inline-block;
    padding: 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.qr-code-image {
    width: 150px;
    height: 150px;
}

.coupon-dates {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

    .date-item i {
        color: var(--light-purple);
    }

/* ========================================
   MERCHANT PAGES
======================================== */

.merchant-coupons-page, .qr-scanner-page {
    padding: 40px 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ffffff 100%);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

    .stat-card i {
        font-size: 40px;
        color: var(--primary-purple);
    }

    .stat-card h3 {
        font-size: 32px;
        margin: 0;
        color: var(--text-dark);
    }

    .stat-card p {
        font-size: 14px;
        margin: 0;
        color: #666;
    }

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.search-box {
    position: relative;
    margin: 20px 0;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.coupons-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    overflow-x: auto;
}

.coupons-table {
    width: 100%;
    border-collapse: collapse;
}

    .coupons-table thead {
        background: var(--primary-purple);
        color: white;
    }

    .coupons-table th {
        padding: 15px;
        text-align: left;
        font-weight: 600;
    }

    .coupons-table td {
        padding: 15px;
        border-bottom: 1px solid #e0e0e0;
    }

    .coupons-table tr.used {
        background: #f9f9f9;
        opacity: 0.7;
    }

    .coupons-table tr.expired {
        background: #fff5f5;
    }

.coupon-code {
    font-family: 'Courier New', monospace;
    background: var(--light-purple);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-used {
    background: #999;
    color: white;
}

/* QR Scanner */
.scanner-controls {
    text-align: center;
    padding: 40px 20px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* Auto-use checkbox */
.auto-use-checkbox {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    margin-bottom: 10px;
    user-select: none;
}

    .checkbox-container input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

    .checkbox-container .checkmark {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 24px;
        width: 24px;
        border: 2px solid var(--border-color);
        border-radius: 6px;
        background-color: white;
        transition: all 0.3s ease;
    }

    .checkbox-container:hover input ~ .checkmark {
        border-color: var(--primary-purple);
        background-color: rgba(106, 27, 154, 0.05);
    }

    .checkbox-container input:checked ~ .checkmark {
        background-color: var(--primary-purple);
        border-color: var(--primary-purple);
    }

    .checkbox-container .checkmark:after {
        content: "";
        position: absolute;
        display: none;
        left: 7px;
        top: 3px;
        width: 6px;
        height: 11px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

    .checkbox-container input:checked ~ .checkmark:after {
        display: block;
    }

.checkbox-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
}

.checkbox-description {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.manual-entry {
    max-width: 500px;
    margin: 40px auto 0;
    text-align: left;
}

    .manual-entry h3 {
        color: var(--primary-purple);
        margin-bottom: 15px;
    }

.input-group {
    display: flex;
    gap: 10px;
}

.form-control {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.scanner-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
}

#qr-video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 250px;
    height: 250px;
    border: 3px solid var(--primary-purple);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-status {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

    .scanner-status i {
        font-size: 24px;
        color: var(--primary-purple);
        margin-bottom: 10px;
    }

.coupon-validation-result {
    margin-top: 30px;
}

.validation-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

    .validation-card.valid {
        border: 3px solid #28a745;
    }

    .validation-card.invalid {
        border: 3px solid #dc3545;
    }

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

    .result-header i {
        font-size: 60px;
        margin-bottom: 10px;
    }

    .result-header.success i {
        color: #28a745;
    }

    .result-header.error i {
        color: #dc3545;
    }

    .result-header h2 {
        margin: 0;
    }

.coupon-info {
    margin: 20px 0;
}

    .coupon-info .info-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid #e0e0e0;
    }

        .coupon-info .info-row label {
            font-weight: 600;
            color: #666;
        }

.badge-valid {
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.badge-expired {
    background: #ffc107;
    color: #333;
}

/* Processing Feedback */
.processing-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.feedback-icon {
    background: white;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.processing-feedback.success .feedback-icon i {
    font-size: 80px;
    color: #28a745;
    animation: successPulse 0.5s ease;
}

.processing-feedback.error .feedback-icon i {
    font-size: 80px;
    color: #dc3545;
    animation: errorShake 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback-icon p {
    margin: 15px 0 0 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Scanned History */
.scanned-history {
    margin-top: 40px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px var(--shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.history-header h3 {
    margin: 0;
    color: var(--primary-purple);
    font-size: 22px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--primary-purple);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.btn-sm {
    font-size: 14px;
    padding: 6px 12px;
}

.history-table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table thead {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.history-table tbody tr {
    transition: background 0.2s ease;
}

.history-table tbody tr:hover {
    background: rgba(106, 27, 154, 0.05);
}

.history-table .success-row {
    background: rgba(40, 167, 69, 0.05);
}

.history-table .error-row {
    background: rgba(220, 53, 69, 0.05);
}

.small-code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-dark);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.success {
    background: #28a745;
    color: white;
}

.status-badge.error {
    background: #dc3545;
    color: white;
}

.status-badge i {
    font-size: 11px;
}

.history-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.summary-item i {
    font-size: 24px;
}

.summary-item strong {
    color: var(--primary-purple);
    font-size: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .history-table-container {
        max-height: 300px;
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 10px;
    }
    
    .history-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .feedback-icon {
        padding: 30px 40px;
    }
    
    .processing-feedback.success .feedback-icon i,
    .processing-feedback.error .feedback-icon i {
        font-size: 60px;
    }
    
    .feedback-icon p {
        font-size: 16px;
    }
}

/* Quantity Selector in Offer Detail */
.coupon-quantity-section {
    margin: 15px 0;
}

    .coupon-quantity-section label {
        display: block;
        font-size: 14px;
        color: var(--text-dark);
        margin-bottom: 8px;
        font-weight: 500;
    }

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

/* Loading Spinner */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty States */
.empty-message {
    text-align: center;
    padding: 80px 20px;
}

    .empty-message i {
        font-size: 80px;
        color: var(--light-purple);
        margin-bottom: 20px;
    }

    .empty-message h2 {
        color: var(--text-dark);
        margin-bottom: 10px;
    }

    .empty-message p {
        color: #666;
        margin-bottom: 30px;
    }

/* ========================================
   IMPROVED HEADER COMPONENTS
======================================== */

/* Cart Icon in Header - Ensure Visibility */
.header-nav .cart-icon {
    position: relative !important;
    cursor: pointer !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--text-dark) !important;
    font-size: 20px !important;
}

    .header-nav .cart-icon:hover {
        background: rgba(106, 27, 154, 0.1) !important;
        transform: scale(1.05) !important;
        color: var(--primary-purple) !important;
    }

    .header-nav .cart-icon i {
        font-size: 24px !important;
        color: var(--text-dark) !important;
        display: inline-block !important;
        visibility: visible !important;
    }

    .header-nav .cart-icon:hover i {
        color: var(--primary-purple) !important;
    }

.header-nav .cart-count {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: #ff4444 !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 2px 6px !important;
    border-radius: 50% !important;
    min-width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: pulse 2s infinite !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* User Menu Container - Ensure Visibility */
.header-nav .user-menu-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.header-nav .user-button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

    .header-nav .user-button:hover {
        background: rgba(106, 27, 154, 0.1) !important;
        color: var(--primary-purple) !important;
    }

    .header-nav .user-button i {
        visibility: visible !important;
        opacity: 1 !important;
        display: inline-block !important;
    }

.header-nav .user-name {
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

.header-nav .arrow-icon {
    font-size: 14px !important;
    transition: transform 0.3s ease !important;
    color: var(--primary-purple) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

    .header-nav .arrow-icon.rotate {
        transform: rotate(180deg) !important;
    }

.header-nav .user-dropdown {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
    min-width: 220px !important;
    z-index: 2000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease-in-out !important;
}

    .header-nav .user-dropdown.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

/* Dropdown Items - Enhanced Styling */
.header-nav .dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    background: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

    .header-nav .dropdown-item:hover {
        background: rgba(106, 27, 154, 0.1) !important;
        color: var(--primary-purple) !important;
        transform: translateX(5px) !important;
    }

    .header-nav .dropdown-item i {
        width: 20px !important;
        text-align: center !important;
        color: var(--primary-purple) !important;
        transition: all 0.3s ease !important;
    }

    .header-nav .dropdown-item:hover i {
        transform: scale(1.1) !important;
    }

.header-nav .dropdown-divider {
    height: 1px !important;
    background: rgba(106, 27, 154, 0.2) !important;
    margin: 8px 0 !important;
    border: none !important;
}

.header-nav .logout-btn {
    color: #dc3545 !important;
}

    .header-nav .logout-btn:hover {
        background: rgba(220, 53, 69, 0.1) !important;
        color: #dc3545 !important;
    }

        .header-nav .logout-btn:hover i {
            color: #dc3545 !important;
        }

/* RTL Support for Dropdown Items */
.rtl .header-nav .dropdown-item:hover {
    transform: translateX(-5px) !important;
}

/* Tooltip Support for Cart Icon */
.header-nav .cart-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Focus styles for accessibility */
.header-nav .cart-icon:focus,
.header-nav .user-button:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Smooth fade-in animation for header elements */
@keyframes fadeInHeader {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-nav .cart-icon,
.header-nav .user-menu-container {
    animation: fadeInHeader 0.3s ease-in-out;
}

.btn-register {
    background: var(--primary-purple);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
}

    .btn-register:hover {
        background: var(--dark-purple);
    }

/* ========================================
   PAGE-LEVEL MODAL (COUPON SELECT)
======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-dialog {
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
    }

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

    .modal-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.offer-info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.offer-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.offer-info-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
}

.offer-info-header .merchant-name {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.coupon-option-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

    .coupon-option-card:hover {
        border-color: var(--light-purple);
        box-shadow: 0 4px 15px rgba(106, 27, 154, 0.15);
        transform: translateY(-2px);
    }

.coupon-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .coupon-header-info h5 {
        margin: 0;
        font-size: 16px;
        color: var(--text-dark);
    }

.discount-tag {
    background: var(--light-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.coupon-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.coupon-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

    .coupon-price-info .original {
        text-decoration: line-through;
        color: #999;
        font-size: 14px;
    }

    .coupon-price-info .discounted {
        color: var(--primary-purple);
        font-size: 20px;
        font-weight: bold;
    }

.coupon-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-selector-modal {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .quantity-selector-modal label {
        font-size: 14px;
        color: var(--text-dark);
        font-weight: 500;
        margin: 0;
    }

.qty-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.btn-add-coupon {
    flex: 1;
    min-width: 140px;
}

.no-coupons {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
    .cart-content,
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .cart-summary-section {
        position: static;
    }

    .cart-item-card {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }

    .item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .coupons-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .modal-dialog {
        max-width: 100%;
    }

    .modal-body {
        max-height: 60vh;
    }

    .coupon-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity-selector-modal {
        width: 100%;
        justify-content: space-between;
    }

    .user-dropdown {
        right: auto;
        left: 0;
        min-width: 200px;
    }
}

/* ========================================
   ORDERS PAGE
======================================== */

.orders-page {
    padding: 40px 0;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ffffff 100%);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
}

    .order-card:hover {
        border-color: var(--light-purple);
        box-shadow: 0 6px 25px rgba(106, 27, 154, 0.2);
    }

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

.order-id-section h3 {
    margin: 0 0 5px 0;
    color: var(--primary-purple);
    font-size: 18px;
}

.order-date {
    font-size: 13px;
    color: #666;
}

.status-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-paid {
    background: #28a745;
    color: white;
}

.status-pending {
    background: #ffc107;
    color: #333;
}

.status-failed {
    background: #dc3545;
    color: white;
}

.order-items {
    margin: 15px 0;
}

.order-item-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
}

    .order-item-row img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
    }

    .order-item-row .item-details h4 {
        font-size: 14px;
        margin: 0 0 5px 0;
        color: var(--text-dark);
    }

    .order-item-row .item-details p {
        font-size: 13px;
        color: #666;
        margin: 0 0 5px 0;
    }

    .order-item-row .quantity {
        font-size: 12px;
        color: #999;
    }

    .order-item-row .item-price {
        font-size: 16px;
        font-weight: bold;
        color: var(--primary-purple);
    }

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.order-total {
    font-size: 18px;
}

    .order-total strong {
        color: var(--primary-purple);
        font-size: 20px;
        margin-left: 10px;
    }

.order-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .order-item-row {
        grid-template-columns: 50px 1fr;
    }

        .order-item-row .item-price {
            grid-column: 2;
            text-align: right;
            margin-top: 5px;
        }

    .order-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .order-actions {
        width: 100%;
    }

        .order-actions .btn {
            flex: 1;
        }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE ENHANCEMENTS
   Mobile-First Approach with Progressive Enhancement
   ============================================ */

/* Base Typography Adjustments */
html {
    font-size: 16px; /* Base size for desktop */
}

/* Extra Large Screens (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* Large Screens (1200px - 1920px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .container {
        max-width: 1200px;
    }
}

/* Medium Screens / Laptops (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 1.5rem;
    }

    /* Grid adjustments */
    .grid-4-cols {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    html {
        font-size: 15px;
    }

    .container {
        max-width: 720px;
        padding: 0 1rem;
    }

    /* Grid: 2 columns */
    .grid-4-cols,
    .grid-3-cols {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Navigation adjustments */
    .navbar-toggler {
        display: block !important;
    }

    /* Card spacing */
    .card {
        margin-bottom: 1rem;
    }
}

/* Mobile Landscape / Small Tablets (577px - 767px) */
@media (min-width: 577px) and (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .container {
        max-width: 100%;
        padding: 0 1rem;
    }

    /* Single column grids */
    .grid-4-cols,
    .grid-3-cols,
    .grid-2-cols {
        grid-template-columns: 1fr !important;
    }

    /* Forms: Full width */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        width: 100%;
    }
}

/* Mobile Phones (max-width: 576px) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.9rem;
    }

    /* Buttons: Full width where appropriate */
    .btn-block,
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
    }

    /* Forms: Prevent iOS zoom */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
    }

    /* Cards: Full width with reduced padding */
    .card {
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .card-body {
        padding: 1rem;
    }

    /* Tables: Horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

        /* Hide non-essential table columns on mobile */
        .table th:nth-child(n+6),
        .table td:nth-child(n+6) {
            display: none;
        }

    /* Navigation: Stack vertically */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    /* Owl Carousel: 1 item on mobile */
    .owl-carousel .owl-item {
        min-width: 100%;
    }

    /* Modal: Full screen on mobile */
    .modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }

    .modal-content {
        height: 100%;
        border-radius: 0;
    }

    /* Touch targets: Minimum 44px */
    .btn,
    button,
    a.btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    /* Spacing adjustments */
    .mb-3 {
        margin-bottom: 1rem !important;
    }

    .mt-3 {
        margin-top: 1rem !important;
    }

    .py-3 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Flexbox: Stack on mobile */
    .flex-mobile-column {
        flex-direction: column !important;
    }

    /* Hide on mobile */
    .d-mobile-none {
        display: none !important;
    }

    /* Show only on mobile */
    .d-mobile-block {
        display: block !important;
    }
}

/* Extra Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
    .container {
        padding: 0 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}

/* RTL Responsive Adjustments */
[dir="rtl"] {
    /* Base RTL */
    direction: rtl;
    text-align: right;
}

    [dir="rtl"] .navbar-nav {
        flex-direction: row-reverse;
    }

    [dir="rtl"] .breadcrumb {
        flex-direction: row-reverse;
    }

    [dir="rtl"] .pagination {
        flex-direction: row-reverse;
    }

/* RTL Mobile Adjustments */
@media (max-width: 768px) {
    [dir="rtl"] .navbar-nav {
        flex-direction: column;
    }

    [dir="rtl"] .card {
        text-align: right;
    }

    [dir="rtl"] .modal-header .close {
        margin-left: 0;
        margin-right: auto;
    }
}

/* Print Styles */
@media print {
    .no-print,
    .navbar,
    .footer,
    .btn,
    button {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }

    .page-break {
        page-break-after: always;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
    }

    .navbar {
        min-height: 50px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
}

/* Payment Complete Page Styles */
.payment-complete-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
}

    .payment-complete-page .page-header {
        text-align: center;
        margin-bottom: 3rem;
    }

        .payment-complete-page .page-header h1 {
            color: var(--primary-purple);
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

    .payment-complete-page .status-icon {
        text-align: center;
        margin-bottom: 2rem;
    }

        .payment-complete-page .status-icon i {
            font-size: 4rem;
            margin-bottom: 1rem;
        }

.payment-success .status-icon i {
    color: #28a745;
}

.payment-failed .status-icon i {
    color: #dc3545;
}

.payment-pending .status-icon i {
    color: #ffc107;
}

.payment-processing .status-icon i {
    color: var(--primary-purple);
}

.payment-complete-page h2 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.payment-complete-page p {
    color: #666;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.order-summary {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid #e9ecef;
}

    .order-summary h3 {
        color: var(--primary-purple);
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        text-align: center;
    }

.summary-info {
    display: grid;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

    .info-row:last-child {
        border-bottom: none;
    }

    .info-row span:first-child {
        color: #666;
        font-weight: 500;
    }

    .info-row strong {
        color: var(--text-dark);
        font-weight: 600;
    }

.coupons-section {
    margin: 2rem 0;
}

    .coupons-section h3 {
        color: var(--primary-purple);
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        text-align: center;
    }

.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.coupon-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

    .coupon-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(106, 27, 154, 0.15);
    }

    .coupon-card.expired {
        opacity: 0.6;
        background: #f8f9fa;
    }

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .coupon-header h4 {
        color: var(--text-dark);
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
    }

.coupon-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

    .coupon-status.active {
        background: #d4edda;
        color: #155724;
    }

    .coupon-status.expired {
        background: #f8d7da;
        color: #721c24;
    }

.coupon-details {
    margin-bottom: 1.5rem;
}

.coupon-name {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.coupon-expiry {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.coupon-code {
    margin-bottom: 1.5rem;
}

    .coupon-code label {
        display: block;
        color: #666;
        font-size: 0.9rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
    }

.code-display {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
}

.code-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple);
    letter-spacing: 1px;
}

.btn-copy {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

    .btn-copy:hover {
        background: var(--dark-purple);
        transform: scale(1.05);
    }

.qr-code-section {
    text-align: center;
}

.qr-code {
    max-width: 150px;
    height: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.qr-note {
    color: #666;
    font-size: 0.8rem;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

    .action-buttons .btn {
        padding: 0.75rem 2rem;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

    .action-buttons .btn-primary {
        background: var(--primary-purple);
        color: var(--white);
    }

        .action-buttons .btn-primary:hover {
            background: var(--dark-purple);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
        }

    .action-buttons .btn-secondary {
        background: #6c757d;
        color: var(--white);
    }

        .action-buttons .btn-secondary:hover {
            background: #5a6268;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
        }

/* Responsive Design for Payment Complete */
@media (max-width: 768px) {
    .payment-complete-page .page-header h1 {
        font-size: 2rem;
    }

    .payment-complete-page h2 {
        font-size: 1.5rem;
    }

    .coupons-grid {
        grid-template-columns: 1fr;
    }

    .coupon-card {
        padding: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

        .action-buttons .btn {
            width: 100%;
            max-width: 300px;
        }
}

@media (max-width: 480px) {
    .payment-complete-page {
        padding: 1rem 0;
    }

    .order-summary,
    .coupon-card {
        padding: 1rem;
    }

    .qr-code {
        max-width: 120px;
    }
}

/* RTL Support for Payment Complete */
[dir="rtl"] .payment-complete-page {
    text-align: right;
}

[dir="rtl"] .info-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .coupon-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .code-display {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-copy {
    margin-left: 0;
    margin-right: 0.5rem;
}



/* QR Reader Container */
#qr-reader {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(106, 27, 154, 0.15);
    background: #000;
}

    #qr-reader video {
        width: 100% !important;
        height: auto !important;
        border-radius: 16px;
    }

#qr-reader__dashboard {
    background: white !important;
    padding: 1rem !important;
    border-radius: 0 0 16px 16px !important;
}

#qr-reader__dashboard_section {
    padding: 0.5rem 0 !important;
}

#qr-reader__dashboard_section_csr button {
    background: var(--primary-purple) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

    #qr-reader__dashboard_section_csr button:hover {
        background: var(--dark-purple) !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
    }

#qr-reader__scan_region {
    border: 3px solid var(--primary-purple) !important;
    border-radius: 12px !important;
}

/* Scanner Container Styles */
.scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.scanner-status {
    text-align: center;
    padding: 1rem;
    background: rgba(106, 27, 154, 0.05);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
}

    .scanner-status i {
        font-size: 2rem;
        color: var(--primary-purple);
        margin-bottom: 0.5rem;
    }

    .scanner-status p {
        margin: 0;
        color: var(--text-dark);
        font-weight: 500;
    }

/* Mobile Responsive for QR Scanner */
@media (max-width: 768px) {
    #qr-reader {
        max-width: 100% !important;
        width: 100% !important;
    }

    .scanner-container {
        padding: 1rem 0;
    }

    #qr-reader__dashboard_section_csr button {
        width: 100%;
        font-size: 14px !important;
        padding: 0.75rem 1rem !important;
    }
}

@media (max-width: 576px) {
    .qr-scanner-page .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    #qr-reader {
        border-radius: 8px;
    }

    .scanner-status {
        padding: 0.75rem;
    }

        .scanner-status i {
            font-size: 1.5rem;
        }
}

/* Scanner Controls */
.scanner-controls {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.manual-entry {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(106, 27, 154, 0.08);
}

    .manual-entry h3 {
        color: var(--primary-purple);
        margin-bottom: 1.5rem;
        font-size: 1.25rem;
    }

    .manual-entry .input-group {
        display: flex;
        gap: 0.5rem;
        align-items: stretch;
    }

    .manual-entry .form-control {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .manual-entry .form-control:focus {
            outline: none;
            border-color: var(--primary-purple);
            box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.1);
        }

@media (max-width: 576px) {
    .manual-entry {
        padding: 1.5rem;
        margin-top: 2rem;
    }

        .manual-entry .input-group {
            flex-direction: column;
        }

        .manual-entry .btn {
            width: 100%;
        }
}