/**
 * Main Styles for Discolink
 * Developed by Bishal Mondal
 * All rights reserved from Bangladesh
 * LinkedIn: www.linkedin.com/in/bishal-mondal2025
 * Portfolio: bishalmondal.com
 */

:root {
    /* Modern Pastel Color Palette */
    --primary-color: #8b5cf6;    /* Soft Purple */
    --secondary-color: #a78bfa;  /* Light Purple */
    --accent-color: #f472b6;     /* Soft Pink */
    --success-color: #34d399;    /* Mint Green */
    --warning-color: #fcd34d;    /* Soft Yellow */
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-color: #1e293b;
    --text-light: #64748b;
    --hover-color: #7c3aed;
    
    /* Enhanced Animations */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --smooth: cubic-bezier(0.65, 0, 0.35, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    
    /* RGB Values for transparency */
    --background-rgb: 255, 255, 255;
    --text-rgb: 30, 41, 59;
    --primary-rgb: 139, 92, 246;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #a78bfa;
    --secondary-color: #c4b5fd;
    --accent-color: #f9a8d4;
    --success-color: #6ee7b7;
    --warning-color: #fde68a;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    
    /* RGB Values for dark mode */
    --background-rgb: 15, 23, 42;
    --text-rgb: 241, 245, 249;
    --primary-rgb: 167, 139, 250;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
}

/* Modern Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.8); /* Transparent background */
    backdrop-filter: blur(10px); /* Blur effect */
    box-shadow: none; /* No shadow */
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.8); /* Dark mode transparency */
}

.navbar-brand {
    font-family: 'Clash Display', sans-serif; /* Funky font */
    font-size: 2rem; /* Bold size */
    font-weight: 700; /* Bold weight */
    color: var(--primary-color); /* Primary color */
    transition: var(--transition);
}

.nav-item {
    position: relative;
    margin: 0 0.5rem;
}

.nav-link {
    color: var(--text-color) !important; /* Ensure text is visible */
    font-weight: 500;
    transition: var(--transition);
}

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

/* Dropdown Styles */
.dropdown-menu {
    background: rgba(var(--background-rgb), 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--text-rgb), 0.1);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    min-width: 200px;
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--smooth);
}

.dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.dropdown-divider {
    border-color: var(--text-light);
    opacity: 0.1;
    margin: 0.5rem 0;
}

/* Active State */
.nav-item.active .nav-link {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem; /* Larger icon */
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--hover-color);
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(var(--background-rgb), 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: var(--shadow-md);
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .dropdown-menu {
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .dropdown-item:hover {
        background: rgba(var(--primary-rgb), 0.1);
    }
}

/* Hero Section */
.hero-section {
    padding: 160px 0 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 24px;
    font-size: 1.1rem;
    color: white;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.search-btn:hover {
    transform: scale(1.05);
}

.popular-searches {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.popular-searches a {
    color: white;
    text-decoration: none;
    margin: 0 8px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
}

.popular-searches a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Featured Categories */
.featured-categories {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.category-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.products-section {
    padding: 60px 0;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn-filter {
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 25px;
    transition: var(--transition);
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary-color);
    color: white;
}

/* Product Cards */
.product-card {
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.product-link {
    text-decoration: none;
    color: var(--text-color);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--bounce);
}

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

.discount-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

.product-details {
    padding: 15px;
}

.product-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    font-size: 0.8rem;
    gap: 8px;
    margin-bottom: 8px;
}

.price {
    gap: 8px;
    margin-bottom: 12px;
}

.original-price {
    font-size: 0.8rem;
}

.discounted-price {
    font-size: 1.1rem;
}

.buy-now {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-details {
        padding: 12px;
    }
}

/* Footer Styles */
.footer {
    background: var(--background-color);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 60px;
}

.footer h5 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--hover-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

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

/* Responsive Footer */
@media (max-width: 768px) {
    .footer .col-md-4 {
        margin-bottom: 30px;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.masonry-grid {
    opacity: 0;
    animation: fadeIn 0.6s var(--smooth) forwards;
}

/* Ensure initial opacity is set */
#productsGrid {
    opacity: 1;
    transition: opacity 0.3s var(--smooth);
}

/* Add more modern styles as needed */

/* Fix price range inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--text-light);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-color);
}

/* Page Header */
.page-header {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Deals Section */
.deals-section {
    padding: 40px 0;
}

.deals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.deals-count {
    font-size: 1.1rem;
    color: var(--text-color);
}

.deals-sort {
    width: 200px;
}

.deals-sort .form-select {
    border: 1px solid var(--text-light);
    background: var(--surface-color);
    color: var(--text-color);
}

/* Add new modern animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Trending Section */
.trending-section {
    padding: 80px 0;
    background: var(--surface-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.header-content p {
    color: var(--text-light);
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 16px;
    border: 1px solid var(--text-light);
    border-radius: 20px;
    background: transparent;
    color: var(--text-color);
    transition: var(--transition);
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Animation for product cards */
.product-card {
    animation: fadeIn 0.6s var(--bounce) forwards;
}

/* Add more modern styles as needed */

/* Fix price range inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--text-light);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-color);
}

/* Page Header */
.page-header {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Deals Section */
.deals-section {
    padding: 40px 0;
}

.deals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.deals-count {
    font-size: 1.1rem;
    color: var(--text-color);
}

.deals-sort {
    width: 200px;
}

.deals-sort .form-select {
    border: 1px solid var(--text-light);
    background: var(--surface-color);
    color: var(--text-color);
}

/* Add new modern animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Trending Section */
.trending-section {
    padding: 80px 0;
    background: var(--surface-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.header-content p {
    color: var(--text-light);
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 16px;
    border: 1px solid var(--text-light);
    border-radius: 20px;
    background: transparent;
    color: var(--text-color);
    transition: var(--transition);
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Animation for product cards */
.masonry-grid {
    opacity: 0;
    animation: fadeIn 0.6s var(--smooth) forwards;
}

.product-card {
    opacity: 0;
    animation: slideIn 0.6s var(--smooth) forwards;
    animation-delay: calc(var(--card-index) * 0.1s);
} 