/* Custom styles for Data Centar Prodavnica */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    padding-top: 76px; /* Account for fixed navbar */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    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 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.product-card img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.product-old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Buttons */
.btn-custom {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary-custom {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* Category Section */
.category-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Forms */
.form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Cart */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-summary {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
}

/* Admin Panel */
.admin-sidebar {
    background-color: #343a40;
    min-height: 100vh;
    padding-top: 2rem;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Search */
.search-form {
    max-width: 500px;
}

.search-results {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .category-card {
        margin-bottom: 2rem;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes */
.text-light-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.rounded-lg {
    border-radius: 15px !important;
}

.shadow-lg-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .admin-sidebar {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
}
