/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= NAVBAR ================= */
header {
    background-color: #343a40;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #ffc107;
    font-size: 28px;
    font-weight: bold;
}

.menu {
    list-style: none;
    display: flex;
}

.menu li {
    margin-left: 25px;
}

.menu li a {
    color: #fff;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.3s;
}

.menu li a:hover,
.menu li a.active {
    background-color: #ffc107;
    color: #343a40;
}

/* ================= PAGE HEADER ================= */
.page-header {
    height: 220px;
    background: url("https://images.pexels.com/photos/3184298/pexels-photo-3184298.jpeg?auto=compress&cs=tinysrgb&h=400") center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header .overlay {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.page-header p {
    font-size: 16px;
}

/* ================= PRODUCTS PAGE ================= */
.products-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    margin-bottom: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.sidebar h3 {
    color: #343a40;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #ffc107;
    display: inline-block;
    padding-bottom: 3px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
    font-size: 16px;
}

/* Products Horizontal Grid */
.products-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Each Product Card */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 1 1 calc(25% - 20px); /* 4 منتجات لكل صف */
    min-width: 200px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #343a40;
}

.product-info p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #6c757d;
}

.price {
    color: #ffc107;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.product-info button {
    width: 100%;
    padding: 10px;
    background: #343a40;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.product-info button:hover {
    background: #495057;
}

/* ================= FOOTER ================= */
footer {
    background: #343a40;
    color: #ced4da;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.footer-box h3 {
    margin-bottom: 12px;
    color: #ffc107;
}

.footer-box p,
.footer-box ul,
.footer-box li {
    font-size: 14px;
}

.footer-box ul {
    list-style: none;
    padding: 0;
}

.footer-box li a {
    color: #ced4da;
    transition: 0.3s;
}

.footer-box li a:hover {
    color: #ffc107;
}

.copy {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

/* ================= RESPONSIVE ================= */
@media(max-width: 1200px) {
    .product-card {
        flex: 1 1 calc(33.33% - 20px); /* 3 منتجات لكل صف */
    }
}

@media(max-width: 992px) {
    .product-card {
        flex: 1 1 calc(50% - 20px); /* 2 منتجات لكل صف */
    }
}

@media(max-width: 768px) {
    .product-card {
        flex: 1 1 100%; /* 1 منتج لكل صف */
    }
}

