/* Add custom CSS styles below */
/* =================================================================
   CAR PART KSA - DIAMOND EDITION (تصميم هندسي فاخر)
   ================================================================= */

:root {
  --car-red: #d32f2f;          /* أحمر رياضي */
  --car-black: #111;           /* أسود الإطارات */
  --tech-bg: #f5f7fa;          /* لون الخلفية الأساسي */
  --glass-effect: rgba(255, 255, 255, 0.85); /* تأثير الزجاج */
  --card-radius: 12px;
  --main-font: 'Tajawal', sans-serif;
}

/* 1. الخلفية الهندسية المميزة (Tech Grid Background) */
/* تعطي إيحاء بمخططات هندسية دقيقة لقطع الغيار */
body {
  background-color: var(--tech-bg) !important;
  background-image: radial-gradient(#d32f2f 0.5px, transparent 0.5px), radial-gradient(#d32f2f 0.5px, var(--tech-bg) 0.5px);
  background-size: 20px 20px; /* تباعد النقاط */
  background-position: 0 0, 10px 10px;
  background-attachment: fixed; /* الخلفية ثابتة والمنتجات تتحرك */
  font-family: var(--main-font) !important;
}

/* 2. الهيدر الزجاجي (Glassmorphism Header) */
.s-header {
  background: var(--glass-effect) !important;
  backdrop-filter: blur(10px); /* تغبيش ما خلف الهيدر */
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(211, 47, 47, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* 3. تأثير "النبض" لشارات الخصم والعروض (Pulse Animation) */
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(211, 47, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

.s-product-card-sale-badge, .product-label--sale, .s-product-card-badge {
  background-color: var(--car-red) !important;
  border-radius: 4px !important;
  animation: pulse-red 2s infinite; /* تشغيل النبض باستمرار */
  font-weight: bold;
}

/* 4. تصميم الأقسام (صناديق عائمة) */
.s-block--categories .swiper-slide,
.s-block--categories .s-slider-block__item {
    background: #fff;
    border: 1px solid #fff;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* ظل ناعم */
    transition: all 0.4s ease;
    padding: 15px;
}
.s-block--categories .swiper-slide:hover,
.s-block--categories .s-slider-block__item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--car-red) !important;
    box-shadow: 0 15px 30px rgba(211, 47, 47, 0.15); /* ظل أحمر خفيف */
}
.s-block--categories img {
    border-radius: 0 !important; 
    max-height: 70px; 
    object-fit: contain;
}

/* 5. بطاقات المنتجات (نظيفة وبارزة) */
.s-product-card-entry {
  background: #fff;
  border: none;
  border-radius: var(--card-radius) !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03) !important;
  transition: all 0.3s ease;
  overflow: hidden;
}
.s-product-card-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1) !important;
}
/* خط أحمر يظهر أسفل البطاقة عند المرور */
.s-product-card-entry::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0%; height: 3px;
    background: var(--car-red);
    transition: 0.4s;
}
.s-product-card-entry:hover::after { width: 100%; }

/* الأسعار */
.s-product-card-content .s-product-card-price {
  color: var(--car-red) !important;
  font-weight: 900; font-size: 1.2rem;
}

/* 6. الأزرار (تأثير النيترو - Auto Shine) */
@keyframes shine-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.s-button-element, .btn-checkout, .cart-nav-submit, .btn--primary, #checkout-submit {
    /* تدرج لوني متحرك */
    background: linear-gradient(45deg, #111, #333, #111, #d32f2f) !important;
    background-size: 300% 300% !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    animation: shine-move 6s ease infinite; /* حركة مستمرة للألوان */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.s-button-element:hover, .btn-checkout:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.4);
}

/* 7. تحسينات شاملة لصفحة الدفع والسلة */
.checkout-block, .cart-summary, .cart-product-item, .checkout-section {
    background: #fff;
    border-radius: 15px !important;
    box-shadow: 0 5px 25px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 20px;
    padding: 25px;
}

/* حقول الإدخال */
input[type="text"], input[type="tel"], select, .form-control {
    background: #fdfdfd;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    height: 48px !important;
    transition: 0.3s;
}
input:focus, select:focus, .form-control:focus {
    border-color: var(--car-red) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1); /* هالة حمراء */
}

/* تمييز السعر النهائي في صفحة الدفع */
.checkout-summary-block {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: #fff;
    border-radius: 15px;
    padding: 20px;
}
.checkout-summary-block * { color: #fff !important; }
.checkout-summary-block .total-amount { color: var(--car-red) !important; font-size: 1.5rem; }

/* شريط التمرير */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fff; }
::-webkit-scrollbar-thumb { background: var(--car-black); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--car-red); }

/* --- END DIAMOND EDITION --- */