* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
    background: #f8f9fa;
}

.header-top {
    display: flex;
    justify-content: end;
    padding: 12px 0;
}

.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #1e428c;
    position: absolute;
    top: 10px;
    right: 15px;
    box-shadow: 3px 3px 15px #fff;
    animation: logoSpin 10s ease-in-out infinite forwards;
}
@keyframes logoSpin {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}
.overlay-panner {
    position: absolute;
    bottom: 8%; /* الثلث الأخير من الصورة */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 50%;
    max-width: 90%;
    background: rgba(0, 0, 0, 0.45); /* خلفية سوداء شفافة بدلاً من بيضاء */
    padding: 18px 40px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px); /* تأثير زجاجي */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: sloganFadeUp 1s ease-out forwards;
    opacity: 0; /* يبدأ مخفياً ثم يظهر بالأنيميشن */
}

    .overlay-panner span {
        font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
        font-size: clamp(1.1rem, 3.2vw, 2.6rem);
        font-weight: 800;
        color: #a0459a;
        letter-spacing: 0.5px;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
        text-align: center;
        line-height: 1.3;
        white-space: nowrap;
    }

@keyframes sloganFadeUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

    .header-nav a {
        color: #25610A;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
    }

        .header-nav a:hover {
            color: #1a4307;
        }

.cart-link {
    position: relative;
    font-size: 22px !important;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -12px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

main {
    min-height: calc(100vh - 200px);
}

.site-footer {
    background: #25610A;
    color: #fff;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 12px;
}

    .footer-links a {
        color: #fff;
        text-decoration: none;
        font-size: 14px;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

.footer-copy {
    text-align: center;
    font-size: 13px;
    opacity: 0.85;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
/* ===== Banner ===== */
.hero-banner {
    width: 100%;
    position: relative;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

/* ===== Categories ===== */
.categories-section {
    padding: 50px 0 20px;
}

.section-title {
    text-align: center;
    color: #25610A;
    font-weight: 700;
    margin-bottom: 35px;
    font-size: 28px;
}

    .section-title::after {
        content: "";
        display: block;
        width: 70px;
        height: 4px;
        background: #C9A227;
        margin: 10px auto 0;
        border-radius: 2px;
    }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.category-card {
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding-bottom: 12px;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(37,97,10,0.18);
    }

.category-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .category-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #fff;
        padding: 8px;
        transition: transform 0.3s ease;
    }

.category-card:hover .category-img-wrap img {
    transform: scale(1.08);
}

.category-name {
    margin: 12px 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #25610A;
}
/* ===== Products Grid ===== */
.products-section {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 22px rgba(37,97,10,0.18);
    }

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-img-wrap {
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.product-card:hover .product-img-wrap img {
    transform: scale(1.08);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #25610A;
    margin: 12px 12px 6px;
    min-height: 42px;
    line-height: 1.3;
}

.product-price {
    padding: 0 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.final-price {
    color: #dc3545;
    font-size: 18px;
    font-weight: 800;
}
/* ===== Product Details ===== */
.product-details-section {
    padding: 40px 0;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}

.product-gallery .main-image-wrap {
    position: relative;
    width: 100%;
    height: 480px;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-gallery .main-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: opacity 0.25s ease;
    }

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

    .thumb:hover,
    .thumb.active {
        border-color: #25610A;
    }

.product-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-title {
    font-size: 28px;
    font-weight: 800;
    color: #25610A;
    margin: 0;
    line-height: 1.3;
}

.product-desc {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.product-price-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .product-price-details .old-price {
        text-decoration: line-through;
        color: #999;
        font-size: 18px;
    }

    .product-price-details .final-price {
        color: #dc3545;
        font-size: 30px;
        font-weight: 900;
    }

.save-badge {
    background: #ffc107;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.product-stock {
    font-size: 15px;
}

.in-stock {
    color: #28a745;
    font-weight: 600;
}

.out-stock {
    color: #dc3545;
    font-weight: 600;
}

.product-actions {
    margin-top: 10px;
}

.btn-add-to-cart {
    background: #25610A;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn-add-to-cart:hover {
        background: #1a4307;
        transform: translateY(-2px);
    }

@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .product-gallery .main-image-wrap {
        height: 320px;
    }
}
/* ===== Cart ===== */
.cart-section {
    padding: 40px 0;
}

.empty-cart {
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .empty-cart p {
        font-size: 18px;
        color: #666;
        margin: 15px 0 25px;
    }

.btn-continue {
    background: #25610A;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

.cart-table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

    .cart-table thead {
        background: #25610A;
        color: #fff;
    }

    .cart-table th,
    .cart-table td {
        padding: 14px 12px;
        text-align: center;
        border-bottom: 1px solid #eee;
        font-size: 15px;
    }

.cart-img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-name {
    font-weight: 700;
    color: #25610A;
    text-align: right;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

    .qty-control button {
        background: #25610A;
        color: #fff;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
    }

    .qty-control input {
        width: 50px;
        text-align: center;
        border: none;
        background: transparent;
        font-weight: 700;
        font-size: 15px;
    }

.line-total {
    font-weight: 800;
    color: #dc3545;
}

.btn-remove {
    background: transparent;
    border: none;
    color: #dc3545;
    font-size: 18px;
    cursor: pointer;
}

.cart-total-box {
    background: #f8f9fa;
    padding: 20px;
    border-top: 2px solid #25610A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cart-total-line {
    font-size: 18px;
}

    .cart-total-line strong {
        color: #dc3545;
        font-size: 24px;
        margin-right: 8px;
    }

.btn-checkout {
    background: #25610A;
    color: #fff;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    transition: background 0.2s ease;
}

    .btn-checkout:hover {
        background: #1a4307;
    }

@media (max-width: 768px) {
    .cart-table {
        font-size: 13px;
    }

        .cart-table th, .cart-table td {
            padding: 8px 4px;
        }

    .cart-img {
        width: 45px;
        height: 45px;
    }
}
