*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,sans-serif;
}

body{
    font-family: Arial, sans-serif;
    direction: rtl;
    background:#f5f5f5;
    color:#333;
}

header{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    transition: all .3s ease;
}



nav ul li{
    margin:0 15px;
}

nav ul li a{
    color:#fff;
    text-decoration:none;
    font-size:18px;
    transition:.3s;
}

nav ul li a:hover{
    color:#f39c12;
}

.hero{
    height:90vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)),url('../images/banner.jpg');
    background-size:cover;
    background-position:center;
    color:#fff;
}

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

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

.btn {
    background: #f39c12;
    color: #fff;
    padding: 10px 80px;
    text-decoration: none;
    border-radius: 8px;
    transition: .3s;
    margin: 3;
}

.btn:hover{
    background:#d68910;
}

footer{
    background:#111;
    color:#fff;
    text-align:center;
    padding:20px;
}

.products{
    padding:70px 20px;
    text-align:center;
}

.about{
    max-width:900px;
    margin:60px auto;
    padding:20px;
    text-align:center;
    line-height:2;
}

.about h2{
    margin-bottom:20px;
    font-size:36px;
}

.about p{
    font-size:20px;
    margin-bottom:20px;
}

.contact{
    max-width:700px;
    margin:50px auto;
    padding:20px;
}

.contact h2{
    text-align:center;
    margin-bottom:30px;
}

.contact form{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.contact input,
.contact textarea{
    padding:15px;
    border:1px solid #ccc;
    border-radius:8px;
    font-size:16px;
}

.contact-info{
    text-align:center;
    margin-top:30px;
    line-height:2;
}

.product-details{
    display:flex;
    gap:40px;
    align-items:center;
    max-width:1000px;
    margin:50px auto;
    padding:20px;
    flex-wrap:wrap;
}

.product-details img{
    width:400px;
    max-width:100%;
    border-radius:10px;
}

.product-details h2{
    margin-bottom:15px;
}

.product-details h3{
    color:#f39c12;
    margin-bottom:20px;
}

.product-details p{
    line-height:1.8;
    margin-bottom:20px;
}

/* =========================
   Shopping Cart
========================= */

.cart {
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
}

.cart h2 {
    text-align: center;
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

.cart-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-info {
    flex: 1;
}

.cart-info h3 {
    margin-bottom: 10px;
}

.cart-info p {
    margin: 5px 0;
}

.cart-total {
    text-align: left;
    margin-top: 30px;
}

.cart-total h3 {
    margin-bottom: 15px;
}

.cart-total button {
    padding: 15px 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.cart-total button:hover {
    background: #333;
}

/* =========================
   Login Page
========================= */

.login {
    width: 90%;
    max-width: 450px;
    margin: 60px auto;
}

.login h2 {
    text-align: center;
    margin-bottom: 25px;
}

.login form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

.login input {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.login button {
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.login button:hover {
    background: #333;
}

.login p {
    text-align: center;
    margin-top: 10px;
}

.login a {
    text-decoration: none;
    color: #007bff;
}

.login a:hover {
    text-decoration: underline;
}

/* =========================
   Register Page
========================= */

.register {
    width: 90%;
    max-width: 500px;
    margin: 60px auto;
}

.register h2 {
    text-align: center;
    margin-bottom: 25px;
}

.register form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

.register input {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.register button {
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.register button:hover {
    background: #333;
}

.register p {
    text-align: center;
}

.register a {
    color: #007bff;
    text-decoration: none;
}

.register a:hover {
    text-decoration: underline;
}



#checkout-form{
    max-width: 500px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
}

#checkout-form input,
#checkout-form textarea{
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    box-sizing: border-box;
}

#checkout-form button{
    width: 100%;
    padding: 12px;
    cursor: pointer;
}

/* تحسين أزرار التصنيفات */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 30px;
    padding: 10px 0;
    background: #fff;
}

.category-filter .btn{
    min-width:120px;
    text-align:center;
}

/* تحسين بطاقات المنتجات */

.product-card{
    width:320px;
    background:#fff;
    border-radius:18px;
    overflow: hidden;
    position:relative;
    display:flex;
    flex-direction:column;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:all .35s ease;
    padding-bottom:20px;
}

.product-card:hover{
    transform:translateY(-12px);
    box-shadow:0 18px 40px rgba(0,0,0,.18);
}

.product-card img{
    width:100%;
    height:260px;
    object-fit:cover;
    display:block;
    transition:transform .4s ease;
}

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

.product-card h3{
    font-size:22px;
    margin:18px 15px 10px;
    color:#222;
}

.product-card p{
    margin:10px 15px;
    font-size:20px;
    font-weight:bold;
    color:#f39c12;
}

.product-card .btn{
    display:block;
    width:85%;
    margin:18px auto 0;
    padding:14px;
    border-radius:12px;
    text-align:center;
    font-weight:bold;
    transition:.3s;
}

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

/* =========================
   Header
========================= */

.header-container{
    max-width:1200px;
    margin:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 30px;
}

.logo h1{
    color:#222;
    font-size:32px;
}

nav ul{
    display:flex;
    list-style:none;
    gap:25px;
}

nav ul li a{
    color:#222;
    text-decoration:none;
    font-weight:bold;
    transition:.3s;
}

nav ul li a:hover{
    color:#f39c12;
}

.header-icons{
    display:flex;
    gap:20px;
    align-items:center;
}

.header-icons a{
    text-decoration:none;
    font-size:22px;
    color:#222;
}

.cart-btn{
    position:relative;
}

#cart-count{
    position:absolute;
    top:-10px;
    right:-12px;
    width:20px;
    height:20px;
    background:#f39c12;
    color:#fff;
    border-radius:50%;
    font-size:12px;
    display:flex;
    justify-content:center;
    align-items:center;
}

/* =========================
   Hero
========================= */

.hero-content{
    max-width:700px;
}

.hero-buttons{
    margin-top:30px;
    display:flex;
    gap:15px;
    justify-content:center;
    flex-wrap:wrap;
}

.btn-outline{
    background:transparent;
    border:2px solid #fff;
}

.btn-outline:hover{
    background:#fff;
    color:#222;
}

/* =========================
   Categories
========================= */

.categories{
    padding:70px 30px;
    background:#fff;
    text-align:center;
}

.categories h2{
    margin-bottom:40px;
}

.categories-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:25px;
    max-width:1100px;
    margin:auto;
}

.category-card{
    background:#f8f8f8;
    padding:35px;
    border-radius:18px;
    text-decoration:none;
    color:#222;
    font-size:45px;
    transition:.3s;
}

.category-card h3{
    margin-top:15px;
    font-size:22px;
}

.category-card:hover{
    background:#f39c12;
    color:#fff;
    transform:translateY(-8px);
}

/* =========================
   Features
========================= */

.features{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:25px;
    max-width:1200px;
    margin:70px auto;
    padding:0 20px;
}

.feature{
    background:#fff;
    text-align:center;
    padding:35px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    transition:.3s;
    font-size:40px;
}

.feature:hover{
    transform:translateY(-8px);
}

.feature h3{
    margin:15px 0;
    font-size:22px;
}

.feature p{
    color:#666;
}

/* =========================
   Products Grid
========================= */

.product-container{
    max-width:1200px;
    margin:40px auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:30px;
    justify-items:center;
}

.products h2{
    font-size:38px;
    margin-bottom:20px;
    color:#222;
}


/* =========================
   Responsive
========================= */

@media (max-width:768px){

    .header-container{
        flex-direction:column;
        gap:20px;
    }

    nav ul{
        flex-wrap:wrap;
        justify-content:center;
        gap:15px;
    }

    .hero h2{
        font-size:36px;
    }

    .hero p{
        font-size:18px;
    }

    .hero-buttons{
        flex-direction:column;
        align-items:center;
    }

    .btn{
        width:200px;
        padding:14px;
    }



    .categories-grid,
    .features,
    .product-container{
        grid-template-columns:1fr;
    }
}

/* =========================
   Best Selling
========================= */

.best-selling{
    padding:70px 20px;
    background:#fff;
    text-align:center;
}

.best-selling h2{
    font-size:36px;
    margin-bottom:40px;
}

.best-grid{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
}

.best-card{
    background:#f8f8f8;
    padding:35px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    transition:.3s;
    font-size:42px;
}

.best-card:hover{
    transform:translateY(-8px);
}

.best-card h3{
    margin:20px 0 10px;
    font-size:22px;
}

.best-card p{
    color:#666;
    line-height:1.8;
}

/* =========================
   Testimonials
========================= */

.testimonials{
    padding:70px 20px;
    background:#f5f5f5;
    text-align:center;
}

.testimonials h2{
    font-size:36px;
    margin-bottom:40px;
}

.testimonial-grid{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:25px;
}

.testimonial-card{
    background:#fff;
    padding:30px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    transition:.3s;
}

.testimonial-card:hover{
    transform:translateY(-8px);
}

.testimonial-card p{
    font-size:18px;
    line-height:1.8;
    margin-bottom:20px;
}

.testimonial-card h4{
    color:#f39c12;
    margin-bottom:10px;
}

.testimonial-card span{
    color:#666;
    font-weight:bold;
}

/* =========================
   Stats
========================= */

.stats{
    background:#111;
    color:#fff;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:25px;
    padding:70px 20px;
    text-align:center;
}

.stat-box h2{
    font-size:42px;
    color:#f39c12;
    margin-bottom:10px;
}

.stat-box p{
    font-size:18px;
}

/* =========================
   Footer
========================= */

.footer{
    background:#111;
    color:#fff;
    padding:60px 20px 20px;
}

.footer-container{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
}

.footer-box h3{
    margin-bottom:20px;
    color:#f39c12;
}

.footer-box p{
    line-height:1.8;
    color:#ddd;
    direction:ltr
}

.footer-box a{
    display:block;
    color:#ddd;
    text-decoration:none;
    margin-bottom:10px;
    transition:.3s;
}

.footer-box a:hover{
    color:#f39c12;
}

.footer-bottom{
    margin-top:40px;
    padding-top:20px;
    border-top:1px solid rgba(255,255,255,.1);
    text-align:center;
    color:#bbb;
}

.best-products{
    padding:70px 20px;
    background:#ffffff;
}

.best-products h2{
    text-align:center;
    font-size:38px;
    margin-bottom:40px;
    color:#222;
}

.search-form{
    max-width:700px;
    margin:30px auto;
    display:flex;
    gap:10px;
}

.search-form input{
    flex:1;
    padding:14px;
    border:1px solid #ddd;
    border-radius:10px;
    font-size:16px;
}

.search-form .btn{
    padding:14px 30px;
}

.product-link{
    text-decoration:none;
    color:inherit;
}



.product-card .btn{
    margin-top: 3px;
}

.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.filters input,
.filters select,
.filters button {
    height: 45px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.filters button {
    background: #f59e0b;
    color: white;
    border: none;
    cursor: pointer;
    padding: 0 25px;
}

.filters button:hover {
    background: #d97706;
}

/*=========================
  Add Product Page
=========================*/

.add-product{
    max-width:700px;
    margin:10px auto;
    background:#fff;
    padding:22px;
    border-radius:15px;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.add-product h2{
    text-align:center;
    margin-bottom:18px;
    color:#222;
    font-size:28px;
}

.add-product label{
    display:block;
    margin-bottom:5px;
    font-weight:bold;
    font-size:15px;
}

.add-product input,
.add-product textarea,
.add-product select{
    width:100%;
    padding:10px 12px;
    margin-bottom:12px;
    border:1px solid #ddd;
    border-radius:8px;
    font-size:15px;
    transition:.3s;
}

.add-product textarea{
    min-height:65px;
    resize:vertical;
}

.add-product input:focus,
.add-product textarea:focus,
.add-product select:focus{
    border-color:#f39c12;
    box-shadow:0 0 8px rgba(243,156,18,.2);
    outline:none;
}

.add-product input[type=file]{
    background:#fafafa;
}

.add-product button{
    width:100%;
    padding:10px;
    background:#f39c12;
    color:#fff;
    border:none;
    border-radius:8px;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
}

.add-product button:hover{
    background:#d68910;
}

.success-message{
    background:#d4edda;
    color:#155724;
    padding:12px;
    margin-bottom:15px;
    border-radius:8px;
    text-align:center;
    font-weight:bold;
}


.edit-img { 
    width: 100px;
}