﻿body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Arial", sans-serif;
    background: linear-gradient(180deg, #000000 0%, #000000 100%);
    margin: 0;
    padding: 20px;
    color: #3c210b;
}
header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
header h1 {
    margin: 0;
    font-size: 2.6rem;
    letter-spacing: 0.05em;
    color: #3e260f;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
}
.Menu {
    display: flex;
    flex-direction: row-reverse;
    direction: ltr;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    background-color: transparent;
    padding: 15px 20px;
    border-radius: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    z-index: 2;
    box-sizing: border-box;
}
.Menu a {
    color: #fff8f0;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    padding: 8px 16px;
    transition: color 0.35s ease, transform 0.35s ease;
    border-radius: 14px;
    overflow: hidden;
    font-family: "Rubik", sans-serif;
}
.Menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(255, 255, 255);
    transform: scaleX(0);
    transform-origin: center center;
    transition: transform 0.35s ease;
    z-index: -1;
}
.Menu a:hover {
    color: #000000;
    transform: translateY(-1px);
}
.Menu a:hover::before {
    transform: scaleX(1);
}
.Cart_img,
.Menu a img {
    display: inline-block;
    vertical-align: middle;
    height: 20px;
    width: auto;
    margin-right: 8px;
    transition: filter 0.35s ease;
}
.Menu a:hover .Cart_img,
.Menu a:hover img {
    filter: invert(1) brightness(0);
}
.Menu a,
.Menu a:hover {
    border: none;
}
.Logo img {
    height: 40px;
    width: auto;
}
.Logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.Menu a:nth-child(6) {
    margin-right: auto;
}

main {
    width: 100%;
    max-width: 1200px;
    margin: 100px auto 0; 
    padding: 0 10px;
}
main h2 {
    color: #4c331a;
    margin-bottom: 20px;
    font-size: 2rem;
    text-align: center;
}
.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1000px) {
    .product-list { grid-template-columns: repeat(2, 1fr); }
}

.product {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    border: 1px solid rgba(110, 62, 22, 0.2);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    box-shadow: 0 16px 30px rgba(92, 55, 24, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    height: 420px; 
    box-sizing: border-box;
    overflow: hidden; 
}
.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 45px rgba(95, 50, 18, 0.18);
    border-color: rgba(110, 62, 22, 0.35);
}
.product img {
    width: 100%;
    height: 180px; 
    border-radius: 12px;
    object-fit: cover; 
    box-shadow: 0 12px 24px rgba(95, 48, 12, 0.12);
    flex-shrink: 0;
}
.product h3 {
    margin: 0;
    color: #3b1f0f;
    font-size: 1.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}
.product .description {
    margin: 0;
    color: #5b391f;
    line-height: 1.4;
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.2em; 
}
.product .price {
    margin: 0;
    font-weight: 700;
    color: #2d1507;
}
.add-to-cart {
    background: #3b1f0f;
    color: #f7e4c7;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}
.add-to-cart {
    margin-top: auto; 
}
.add-to-cart:hover {
    background: #5b3217;
    transform: translateY(-2px);
}
footer {
    margin-top: auto;
    padding: 20px;
    background: #ffffff;
    color: #000000;
}
footer p {
    text-align: center;
    color: #000000;
}
hr {
    border: none;
    height: 1px;
    background: rgba(95, 51, 19, 0.18);
    margin: 18px 0;
}

.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 80px; 
    top: 80px;
    height: 360px;
    overflow: hidden;
    border-radius: 18px;
}
.hero-slider .slides { position: relative; height: 100%; }
.hero-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.3s ease;
}
.hero-slider .slide.active { opacity: 1; transform: scale(1); z-index: 1; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== تعديلات الشاشات المتوسطة (من 601px إلى 1000px) ===== */
@media (max-width: 1000px) {
    .product-list { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* ===== تعديلات الجوال (أقل من 768px) ===== */
@media (max-width: 768px) {
    /* السلايدر بالطول */
    .hero-slider {
        height: auto !important;
        aspect-ratio: 3 / 4 !important;
        top: 60px;
        margin-bottom: 40px;
        border-radius: 12px;
    }
    
    /* منتجان بجانب بعض */
    .product-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    
    .product {
        height: auto;
        min-height: 380px;
        padding: 16px;
    }
    
    .product img {
        height: 150px;
    }
    
    .product h3 {
        font-size: 1.1rem;
        white-space: normal;
    }
    
    .product .description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .add-to-cart {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    body {
        padding: 12px;
    }
    
    .Menu {
        gap: 8px;
    }
    
    .Menu a {
        padding: 10px 14px;
    }
}

/* ===== تعديلات الشاشات الصغيرة جداً (أقل من 480px) ===== */
@media (max-width: 480px) {
    .product-list {
        gap: 12px;
    }
    
    .product {
        padding: 12px;
        min-height: 340px;
    }
    
    .product img {
        height: 120px;
    }
    
    .product h3 {
        font-size: 1rem;
    }
    
    .add-to-cart {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        aspect-ratio: 2 / 3 !important;
    }
}
