/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Banner Slider */
.banner-slider {
    position: relative;
}

.banner-slider .carousel-item img {
    height: 500px;
    object-fit: cover;
}

.banner-slider .carousel-caption {
    background: rgba(0,0,0,0.5);
    padding: 2rem;
    border-radius: 10px;
    bottom: 20%;
}

.banner-slider .carousel-caption h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Section Styles */
.about-section,
.categories-section,
.featured-products {
    padding: 80px 0;
}

.about-section h2,
.categories-section h2,
.featured-products h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Card Styles */
.category-card,
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-card img,
.product-card img {
    height: 200px;
    object-fit: cover;
}

.category-card .card-body,
.product-card .card-body {
    padding: 1.5rem;
}

/* Product Details */
.product-details {
    padding: 60px 0;
}

.product-images .carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.product-info h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.product-info h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-actions .btn {
    padding: 12px 30px;
    font-weight: 600;
}

/* Contact CTA */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.contact-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #2c3e50 !important;
}

.footer h5,
.footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer .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: background 0.3s ease;
}

.footer .social-links a:hover {
    background: var(--primary-color);
    text-decoration: none;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-slider .carousel-item img {
        height: 300px;
    }
    
    .banner-slider .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .about-section h2,
    .categories-section h2,
    .featured-products h2 {
        font-size: 2rem;
    }
    
    .product-info h1 {
        font-size: 2rem;
    }
    
    .contact-cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .banner-slider .carousel-caption {
        padding: 1rem;
        bottom: 10%;
    }
    
    .banner-slider .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .product-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 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;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Admin Styles */
.admin-sidebar {
    background: #343a40;
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.admin-content {
    padding: 2rem;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
}

.image-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.image-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-gallery-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
}

/* Sortable */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    cursor: grabbing;
}