/**
 * Professional Theme - MultiVendor Store
 * Premium Design with Modern Aesthetics
 */

:root {
    /* Primary Colors - Premium Purple Gradient */
    --primary-100: #f3f0ff;
    --primary-200: #d5ccff;
    --primary-300: #b8a8ff;
    --primary-400: #9a84ff;
    --primary-500: #7c5cf7;
    --primary-600: #5e3de8;
    --primary-700: #4529c9;
    --primary-800: #311a9e;
    --primary-900: #1f0e73;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c5cf7 0%, #5e3de8 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #7c5cf7 0%, #4529c9 50%, #1f0e73 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    
    /* Accent Colors */
    --accent-1: #ff6b6b;
    --accent-2: #ffd93d;
    --accent-3: #6bcb77;
    --accent-4: #4d96ff;
    
    /* UI Colors */
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --gray-100: #f8f9fc;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(94,61,232,0.08);
    --shadow-md: 0 4px 20px rgba(94,61,232,0.12);
    --shadow-lg: 0 8px 40px rgba(94,61,232,0.16);
    --shadow-xl: 0 12px 60px rgba(94,61,232,0.20);
    --shadow-2xl: 0 20px 80px rgba(94,61,232,0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-700);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

a {
    text-decoration: none;
    transition: var(--transition-base);
}

/* Top Bar */
.top-bar {
    background: var(--dark);
    color: var(--gray-400);
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar a {
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.top-bar a:hover {
    color: #fff;
}

.top-bar .divider {
    color: var(--gray-600);
    margin: 0 12px;
}

/* Header */
.main-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.site-logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search */
.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-wrapper .form-control {
    padding: 10px 20px 10px 45px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-200);
    background: var(--gray-100);
    font-size: 14px;
    transition: var(--transition-base);
}

.search-wrapper .form-control:focus {
    border-color: var(--primary-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124,92,247,0.1);
}

.search-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

/* Navigation */
.main-nav {
    background: var(--gradient-primary);
    padding: 0;
    position: sticky;
    top: 72px;
    z-index: 999;
    box-shadow: 0 2px 20px rgba(94,61,232,0.15);
}

.main-nav .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 14px 20px;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    transition: var(--transition-base);
    display: inline-block;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #fff;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 60%;
}

.main-nav .nav-link:hover {
    color: #fff;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.02);
    border-radius: 50%;
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #ffd93d, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    max-width: 500px;
}

.btn-hero {
    background: #fff;
    color: var(--primary-600);
    padding: 14px 40px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition-base);
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    color: var(--primary-700);
}

.hero-stats {
    position: relative;
    z-index: 1;
    margin-top: 40px;
}

.hero-stats .stat-item {
    color: rgba(255,255,255,0.9);
    text-align: center;
}

.hero-stats .stat-item .number {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.hero-stats .stat-item .label {
    font-size: 14px;
    opacity: 0.8;
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background: #fff;
    padding: 25px 15px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-300);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card .icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: var(--primary-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-500);
    transition: var(--transition-base);
}

.category-card:hover .icon-wrapper {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.1);
}

.category-card h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--gray-800);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-card .product-image {
    position: relative;
    padding: 20px;
    background: var(--gray-100);
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-base);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .product-badge.featured {
    background: var(--gradient-primary);
    color: #fff;
}

.product-card .product-badge.sale {
    background: var(--accent-1);
    color: #fff;
}

.product-card .product-badge.new {
    background: var(--accent-3);
    color: #fff;
}

.product-card .product-body {
    padding: 16px 20px 20px;
}

.product-card .product-body h6 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-body .product-meta {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.product-card .product-body .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-600);
}

.product-card .product-body .price .old-price {
    font-size: 15px;
    font-weight: 400;
    color: var(--gray-500);
    text-decoration: line-through;
    margin-left: 10px;
}

.product-card .product-body .rating {
    color: #ffd93d;
    font-size: 14px;
}

.product-card .product-body .rating .count {
    color: var(--gray-500);
    font-size: 13px;
    margin-left: 5px;
}

.product-card .product-actions {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-wishlist {
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    cursor: pointer;
    color: var(--gray-500);
}

.btn-wishlist:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.auth-card {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: 48px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-header .brand-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.auth-card .auth-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.auth-card .auth-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
    display: block;
}

.auth-card .form-control {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition-base);
    background: var(--gray-100);
}

.auth-card .form-control:focus {
    border-color: var(--primary-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124,92,247,0.1);
}

.auth-card .input-group {
    position: relative;
}

.auth-card .input-group .form-control {
    padding-right: 48px;
}

.auth-card .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
}

.auth-card .password-toggle:hover {
    color: var(--gray-700);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition-base);
    cursor: pointer;
}

.auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-card .btn-primary:active {
    transform: translateY(0);
}

.auth-card .btn-outline {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition-base);
    cursor: pointer;
}

.auth-card .btn-outline:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: var(--primary-100);
}

.auth-card .divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-card .divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--gray-200);
}

.auth-card .divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    color: var(--gray-500);
    font-size: 13px;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.auth-card .auth-footer a {
    color: var(--primary-600);
    font-weight: 600;
}

.auth-card .auth-footer a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

.auth-card .auth-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
}

.auth-card .auth-links a {
    color: var(--gray-600);
    font-size: 14px;
}

.auth-card .auth-links a:hover {
    color: var(--primary-600);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Section Styles */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-header .view-all {
    color: var(--primary-600);
    font-weight: 600;
    font-size: 14px;
}

.section-header .view-all:hover {
    color: var(--primary-700);
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 60px 0 30px;
}

.main-footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

.main-footer a {
    color: var(--gray-400);
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.main-footer a:hover {
    color: #fff;
    padding-left: 6px;
}

.main-footer .footer-divider {
    border-color: rgba(255,255,255,0.05);
    margin: 30px 0 20px;
}

.main-footer .copyright {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 38px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar .text-end {
        text-align: center !important;
        margin-top: 4px;
    }
    
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-content p {
        font-size: 16px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats .stat-item .number {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .auth-card {
        padding: 32px 24px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
    
    .main-nav .nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .main-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-card {
        padding: 24px 16px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-stats .stat-item .number {
        font-size: 20px;
    }
}