/* buynoks B2B Ecommerce - Custom Styles */
/* Mobile-first responsive design with dark/light mode support */

/* Product Image Fixes - Show full product images */
.product-image, 
.card-img-top, 
.product-card img,
.product-thumbnail {
    object-fit: contain !important;
    object-position: center !important;
    background: #f8f9fa;
    width: 100%;
    height: auto;
    max-height: 250px;
}

/* Product card containers */
.product-card .card-img-top,
.product-item img {
    height: 220px;
    object-fit: contain !important;
    background: #f8f9fa;
    padding: 10px;
}

/* Product detail page main image */
.product-main-image {
    max-height: 400px;
    object-fit: contain !important;
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* Product thumbnails */
.product-thumbnail {
    height: 80px;
    object-fit: contain !important;
    background: #f8f9fa;
    padding: 5px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.product-thumbnail:hover {
    border-color: #007bff;
}

:root {
    /* Light mode colors */
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #343a40;
    
    /* Text colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #6c757d;
    
    /* Border colors */
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    /* Shadow */
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-dark: #121212;
    
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    
    --border-color: #404040;
    --border-light: #333333;
    
    --shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(255, 255, 255, 0.175);
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    opacity: 0.8;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Product Cards */
.product-card {
    transition: var(--transition);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.product-card .card-img-top {
    transition: var(--transition);
    border-radius: 1rem 1rem 0 0;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Testimonial Cards */
.testimonial-card {
    border: none;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
}

.testimonial-card .card-body {
    padding: 2rem;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(0, 123, 255, 0.95) !important;
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    min-width: 60px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

.mobile-bottom-nav .badge {
    top: -5px;
    right: 10px;
    font-size: 0.6rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Forms */
.form-control {
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .auth-card {
    background: rgba(26, 26, 26, 0.95);
}

/* Tables */
.table {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.table th {
    border-color: var(--border-color);
    background-color: var(--bg-secondary);
    font-weight: 600;
}

.table td {
    border-color: var(--border-color);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--bg-dark) !important;
    color: white;
}

footer a {
    color: #b3b3b3;
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

/* Accordion */
.accordion-item {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem !important;
    margin-bottom: 1rem;
}

.accordion-button {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 0.75rem !important;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Theme Toggle */
#theme-toggle {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(180deg);
}

/* Responsive Design */

/* Mobile Styles (default) */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding-top: 80px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Tablet Styles */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .mobile-bottom-nav {
        display: none;
    }
}

/* Desktop Styles */
@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none;
    }
    
    .hero-section {
        padding-top: 120px;
    }
    
    .product-card:hover {
        transform: translateY(-10px);
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* Extra Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-bottom-nav,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}