/* ElectroShop Custom Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #ffffff;
    color: #334155;
}

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

.top-bar a {
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    letter-spacing: -0.5px;
}

.nav-link {
    color: #475569 !important;
    transition: color 0.3s;
    padding: 0.5rem 1rem !important;
}

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

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.product-image {
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border-radius: 16px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
    background-color: var(--primary-color);
}

.category-card:hover h5,
.category-card:hover .category-icon i {
    color: white !important;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.btn-lg {
    padding: 0.8rem 2rem;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Cards */
.card {
    border-radius: 16px;
}

/* Footer */
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Cart Badge */
.cart-badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
}

/* Tables */
.table > :not(caption) > * > * {
    padding: 1rem;
}

/* Admin Styles */
.admin-sidebar {
    min-height: 100vh;
    background-color: var(--dark-color);
}

.admin-sidebar .nav-link {
    color: #94a3b8 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

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

.admin-sidebar .nav-link i {
    width: 24px;
}

/* Stats Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-image {
        height: 200px;
    }
}

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

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
}

/* Image Upload Preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
}
/* RTL Support */
[dir="rtl"] .dropdown-menu { text-align: right; }
[dir="rtl"] .input-group .btn { border-radius: 0.375rem 0 0 0.375rem; }
[dir="rtl"] .input-group .form-control { border-radius: 0 0.375rem 0.375rem 0; }
[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .text-start { text-align: right !important; }