/* ملف التصميم الرئيسي */
/* Al-Majd Electronics Store - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #ddd;
    --success-color: #27ae60;
    --warning-color: #f39c12;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.contact-info span {
    margin-left: 20px;
}

.contact-info i {
    margin-left: 5px;
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--secondary-color);
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--text-color);
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
}

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

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

.btn-view {
    background: var(--secondary-color);
    color: var(--white);
    flex: 1;
}

.btn-cart {
    background: var(--accent-color);
    color: var(--white);
    flex: 1;
}

.btn-view:hover,
.btn-cart:hover {
    opacity: 0.9;
}

/* Sections */
.categories,
.products {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card a {
    text-decoration: none;
    color: var(--text-color);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--border-color);
}

.category-card h3 {
    padding: 20px;
    text-align: center;
    font-size: 20px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--border-color);
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--secondary-color);
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 15px;
    height: 50px;
    overflow: hidden;
}

.product-price {
    margin-bottom: 20px;
}

.current-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
}

.old-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-section i {
    margin-left: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        gap: 15px;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}
