/* Kian Affiliate Marketing Platform - Main Stylesheet */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    background-color: #fff;
    transition: background-color 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e5e7eb;
}

body.dark-mode .bg-white {
    background-color: #2d2d2d !important;
}

body.dark-mode .bg-light {
    background-color: #1f1f1f !important;
}

body.dark-mode .text-dark {
    color: #e5e7eb !important;
}

body.dark-mode .card {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .navbar {
    background-color: #2d2d2d !important;
    border-bottom: 1px solid #404040;
}

body.dark-mode .footer {
    background-color: #1a1a1a !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #e5e7eb;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin: 0.5rem;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Categories Section */
.category-card {
    display: block;
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    color: var(--primary-color);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-card h4 {
    font-size: 1rem;
    margin: 0;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--light-color);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-commission {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-category {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.product-price {
    margin-bottom: 1rem;
    margin-top: auto;
}

.price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.price-new {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    background: var(--light-color);
    padding: 60px 0;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
}

.footer h5 {
    color: white;
    font-weight: 700;
}

.footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Notifications Dropdown */
.notifications-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-dropdown .dropdown-item {
    white-space: normal;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notifications-dropdown .dropdown-item.unread {
    background-color: #f0f9ff;
}

.notifications-dropdown .dropdown-item:hover {
    background-color: var(--light-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    padding: 1.25rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: var(--light-color);
}

.table th {
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 20px;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .notifications-dropdown {
        width: 300px;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
}
