/* Custom CSS for Affiliate System */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    transition: transform 0.3s ease;
}

.hero .btn:hover {
    transform: translateY(-2px);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-image-container {
    overflow: hidden;
    height: 200px;
    background: var(--light-color);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.platform-badge .badge {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.rating-badge .badge {
    font-size: 0.75rem;
}

.product-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    background: white;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color) !important;
}

.category-icon {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Platform Cards */
.platform-card {
    transition: all 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-3px);
}

.platform-logo {
    transition: transform 0.3s ease;
}

.platform-card:hover .platform-logo {
    transform: scale(1.1);
}

/* Pagination */
.pagination .page-link {
    border-radius: 50px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
    background: transparent;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
}

/* Fix text-muted color in footer for better contrast */
.footer .text-muted {
    color: #b8bcc1 !important; /* Lighter gray for better contrast on dark background */
}

.footer .text-muted:hover {
    color: #e9ecef !important; /* Even lighter on hover */
}

/* Ensure footer links have proper color */
.footer a.text-muted {
    color: #b8bcc1 !important;
}

.footer a.text-muted:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

/* Search Form */
.search-form {
    position: relative;
}

.search-form .form-control {
    border-radius: 25px;
    padding-left: 20px;
    padding-right: 50px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-form .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
}

/* Filters */
.filters {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.filter-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 0;
}

.filter-item:last-child {
    border-bottom: none;
}

.filter-checkbox {
    margin-right: 10px;
}

/* Product Detail */
.product-detail-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.product-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.product-gallery img:hover,
.product-gallery img.active {
    border-color: var(--primary-color);
}

.product-info {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rating-stars {
    color: #ffc107;
}

.buy-button {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(25, 135, 84, 0.3);
}

/* Specifications Table */
.specifications-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.specifications-table th {
    background: var(--light-color);
    font-weight: 600;
    border: none;
    padding: 15px 20px;
}

.specifications-table td {
    border: none;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 2rem;
    }
    
    .product-gallery {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .category-card,
    .platform-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .buy-button {
        width: 100%;
        padding: 12px 30px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #212529;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--dark-color);
    }
    
    .card,
    .feature-card,
    .product-info,
    .filters {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    .navbar {
        background-color: rgba(45, 45, 45, 0.95) !important;
    }
    
    .breadcrumb {
        color: var(--dark-color);
    }
    
    /* Footer adjustments for dark mode */
    .footer .text-muted {
        color: #adb5bd !important; /* Slightly different shade for dark mode */
    }
    
    .footer .text-muted:hover {
        color: #f8f9fa !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .social-links,
    .buy-button {
        display: none;
    }
    
    .product-detail-image {
        max-width: 300px;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
}
