/* Nepalese Felt Handicraft E-commerce Styles */

:root {
    --primary-color: #764ba2;
    --secondary-color: #667eea;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

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

/* Mega Menu */
.mega-menu {
    min-width: 250px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 0;
}

.hero-slide {
    position: relative;
    overflow: hidden;
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* Feature Boxes */
.feature-box {
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    transition: var(--transition);
}

.feature-box:hover .feature-icon {
    transform: scale(1.1);
}

/* Category Cards */
.category-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    transition: var(--transition);
    height: 100%;
}

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

.category-icon {
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

/* Rating Stars */
.rating {
    color: #ffc107;
}

.rating .fas,
.rating .far {
    font-size: 0.875rem;
}

/* Price */
.text-primary.fw-bold {
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--border-radius);
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
}

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

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

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: white !important;
    transform: translateX(3px);
}

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

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

/* Newsletter Form */
.newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Back to Top Button */
#backToTop {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000;
    transition: var(--transition);
}

#backToTop:hover {
    transform: translateY(-5px);
}

/* Modal */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Product Details Page */
.product-main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail-image {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.quantity-input {
    width: 60px;
    text-align: center;
}

/* Reviews */
.rating-summary {
    text-align: center;
}

.rating-bars .progress {
    background-color: #e9ecef;
}

.rating-star {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: var(--transition);
}

.rating-star:hover,
.rating-star.active {
    color: #ffc107;
}

/* Cart Page */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Checkout Form */
.checkout-section {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 2rem;
}

/* Admin Panel */
.admin-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    margin: 2px 0;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th {
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-slide {
        height: 400px !important;
    }
    
    .hero-slide .display-4 {
        font-size: 2rem;
    }
    
    .product-image-container {
        height: 200px;
    }
    
    .feature-box {
        padding: 1rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        height: 300px !important;
    }
    
    .hero-slide .display-4 {
        font-size: 1.5rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .top-bar {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #212529;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #1e1e1e;
        border-color: #333;
    }
    
    .table {
        color: #e0e0e0;
    }
    
    .form-control,
    .form-select {
        background-color: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}
