/* =========================================
   Product Grid & Mobile Responsive (تجاوب الشبكة الخفيف)
========================================= */
.products-grid, .s-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 24px !important;
}

/* حل مشكلة التشتت على الجوال بفرض منتجين ثابتين فوراً */
@media (max-width: 768px) {
    .products-grid, .s-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* =========================================
   Product Card (كرت المنتج الشامل)
========================================= */
.product, .s-product-card, .product-entry {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
}

/* =========================================
   Product Image (إطار الصورة الطولي المستقر)
========================================= */
.s-product-card-image, .product-image, .s-product-card-image-wrapper {
    background: #fff !important;
    border: 2px solid #6d1b1b !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    
    /* فرض نسبة طولية ثابتة وخفيفة تجعل المتصفح يحجز المساحة مسبقاً دون تشتت */
    aspect-ratio: 1 / 1.15 !important; 
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* تحسين أداء الصورة الداخلي */
.s-product-card-image img, .product-image img, .s-product-card-image-wrapper img {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    padding: 0 !important;
}

/* تأثير حركة الكرت السلس */
.s-product-card:hover .s-product-card-image, .product:hover .product-image {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.06) !important;
}

/* =========================================
   Product Content (تقريب ملاصق لبيانات المنتج)
========================================= */
.s-product-card-content, .product-content {
    text-align: center !important;
    padding: 0 !important;
    margin: 6px 0 0 0 !important;
}

/* اسم المنتج */
.s-product-card-content h3, .product-title {
    font-size: 19px !important; 
    font-weight: 800 !important;
    color: #5a0000 !important;
    margin: 0 !important; 
    line-height: 1.3 !important;
}

/* السعر */
.s-product-card-price, .price {
    color: #c40000 !important;
    font-size: 23px !important; 
    font-weight: 900 !important;
    margin: 2px 0 0 0 !important; 
    line-height: 1.2 !important;
}

/* =========================================
   Add To Cart Button (زر السلة الملاصق)
========================================= */
.s-product-card-btn, .product-footer, .btn-add-to-cart {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
    margin: 4px 0 0 0 !important;
}

/* إظهار الزر على الكمبيوتر */
@media (min-width: 769px) {
    .s-product-card:hover .s-product-card-btn, 
    .product:hover .product-footer, 
    .product:hover .btn-add-to-cart {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* تصميم الزر الخفيف والسريع */
.s-product-card-btn .btn, .btn-add-to-cart, button[type="submit"] {
    width: 100%;
    background: #980000 !important;
    color: #fff !important;
    border-radius: 12px !important;
    border: none !important;
    height: 48px;
    font-size: 17px;
    font-weight: 700;
}

/* تعديلات الجوال الخاصة بالأزرار والخطوط */
@media (max-width: 768px) {
    .s-product-card-content h3, .product-title { font-size: 16px !important; }
    .s-product-card-price, .price { font-size: 19px !important; }
    
    .s-product-card-btn, .product-footer, .btn-add-to-cart {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    .s-product-card-btn .btn, .btn-add-to-cart, button[type="submit"] {
        height: 40px;
        font-size: 14px;
    }
}

/* إخفاء العناصر غير الضرورية لزيادة سرعة التحميل */
.s-product-card-rating, .s-product-card-sale-badge, .s-product-card-wishlist-btn {
    display: none !important;
}

/* =========================================
   Marquee (شريط الإعلانات السلس)
========================================= */
.sami-marquee {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, #0047ab, #0066ff, #0047ab);
    padding: 12px 0;
    direction: rtl;
}

.sami-marquee-track {
    display: flex;
    width: max-content;
    animation: tickerMove 25s linear infinite;
}

.sami-marquee span {
    color: white;
    font-size: 18px;
    font-weight: 800;
    margin: 0 35px;
    white-space: nowrap;
}

@keyframes tickerMove {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(50%, 0, 0); }
}

/* =========================================
   Professional Footer (تذييل الصفحة السريع)
========================================= */
footer, .footer, .store-footer {
    background: linear-gradient(90deg, #0f172a, #111827, #0f172a) !important;
    color: #fff !important;
    padding-top: 50px;
    border-top: 4px solid #2563eb;
}

footer .container, .footer .container, .store-footer .container { max-width: 1300px; }
footer .row > div { margin-bottom: 30px; }

footer h3, footer h4, .footer-title {
    color: #fff !important;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
}

footer h3::after, footer h4::after, .footer-title::after {
    content: "";
    width: 45px;
    height: 3px;
    background: #38bdf8;
    position: absolute;
    bottom: -8px;
    right: 0;
    border-radius: 10px;
}

footer a {
    color: #d1d5db !important;
    transition: color .2s ease;
    font-size: 14px;
    display: inline-block;
}

footer a:hover { color: #38bdf8 !important; }
footer p, footer span, footer li { color: #cbd5e1 !important; line-height: 1.8; }

.social-icons a, .footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    color: #fff !important;
}

footer .phone, footer .contact-phone { font-size: 17px; font-weight: bold; color: #38bdf8 !important; }

.sub-footer, .copyright-footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 30px;
    padding: 15px 0;
    text-align: center;
    color: #94a3b8 !important;
    font-size: 13px;
}

@media (max-width: 768px) {
    footer, .footer, .store-footer { text-align: center; }
    footer h3::after, footer h4::after, .footer-title::after { right: 50%; transform: translateX(50%); }
    .social-icons, .footer-social { display: flex; justify-content: center; }
}