:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --text-light: #1e293b;
    --text-dark: #e2e8f0;
    --card-light: #f8fafc;
    --card-dark: #1e293b;
}

[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--card-dark);
}

[data-theme="light"] {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --card-bg: var(--card-light);
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slider .carousel-item {
    height: 600px;
    position: relative;
}

.hero-slider .slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slider .slider-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(59, 130, 246, 0.7) 100%);
}

.hero-slider .carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 10;
}

.hero-slider .carousel-caption-custom h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-slider .carousel-caption-custom p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.hero-slider .carousel-control-prev {
    left: 30px;
}

.hero-slider .carousel-control-next {
    right: 30px;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(255,255,255,0.3);
}

.hero-slider .carousel-indicators {
    bottom: 30px;
}

.hero-slider .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
}

.hero-slider .carousel-indicators button.active {
    background-color: #fff;
}

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
    height: 100%;
}

[data-theme="dark"] .product-card {
    border-color: rgba(255,255,255,0.1);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.admin-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .admin-card {
    border-color: rgba(255,255,255,0.1);
}

.admin-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stats-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.stats-card h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.table {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .table {
    --bs-table-bg: var(--card-dark);
    --bs-table-striped-bg: rgba(255,255,255,0.05);
    --bs-table-hover-bg: rgba(255,255,255,0.075);
}

.form-control, .form-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: rgba(0,0,0,0.1);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    border-color: rgba(255,255,255,0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

.product-gallery .carousel-item img {
    border-radius: 10px;
}

.product-gallery .carousel-control-prev,
.product-gallery .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.product-details {
    position: sticky;
    top: 20px;
}

.pricing-section .btn-check:checked + .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--secondary-color);
}

.price-display {
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.product-description {
    line-height: 1.8;
}

.product-description h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.product-description h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.product-description ul {
    list-style: none;
    padding-left: 0;
}

.product-description ul li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.product-description ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.features-list ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .features-list ul li {
    border-bottom-color: rgba(255,255,255,0.1);
}

.features-list ul li:last-child {
    border-bottom: none;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "›");
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "‹");
}

.product-card a {
    color: inherit;
    transition: color 0.3s ease;
}

.product-card a:hover {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .product-details {
        position: relative;
        top: 0;
    }
    
    .product-gallery .carousel-item img {
        height: 300px;
    }
}