/* =========================
   Velvet Prestige – Car Rental Theme
   Premium Purple Edition
   ========================= */

:root {
  /* الألوان الأساسية */
  --vp-bg: #0b0f17;
  --vp-card: #0f1626;
  --vp-card-hover: #151d2e;
  --vp-border: rgba(255, 255, 255, 0.10);
  --vp-border-hover: rgba(255, 255, 255, 0.18);
  
  /* النصوص */
  --vp-text-primary: rgba(255, 255, 255, 0.95);
  --vp-text-secondary: rgba(255, 255, 255, 0.68);
  --vp-text-muted: rgba(255, 255, 255, 0.45);
  
  /* البنفسجي */
  --vp-purple: #7c3aed;
  --vp-purple-light: #a78bfa;
  --vp-purple-dark: #5b21b6;
  --vp-purple-glow: rgba(124, 58, 237, 0.35);
  
  /* حالات التوفر */
  --vp-success: #22c55e;
  --vp-error: #ef4444;
  
  /* الظلال */
  --vp-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --vp-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --vp-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --vp-shadow-purple: 0 10px 30px rgba(124, 58, 237, 0.35);
}

/* =========================
   خلفية الموقع
   ========================= */
body {
  background: 
    radial-gradient(1000px 300px at 20% 0%, rgba(124, 58, 237, 0.15), transparent 60%),
    radial-gradient(1000px 300px at 80% 10%, rgba(167, 139, 250, 0.10), transparent 60%),
    radial-gradient(800px 300px at 50% 100%, rgba(91, 33, 182, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, transparent 45%, rgba(124, 58, 237, 0.05) 100%),
    var(--vp-bg) !important;
  color: var(--vp-text-primary);
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   كروت المنتجات والسلة
   ========================= */
[class*="product-card"],
[class*="product"] [class*="card"],
[class*="products"] [class*="item"],
.product-entry,
.product-item,
.s-product-card-vertical,
[class*="cart"] [class*="item"],
[class*="checkout"] [class*="item"] {
  background: 
    linear-gradient(145deg, rgba(124, 58, 237, 0.05) 0%, rgba(124, 58, 237, 0.02) 50%, transparent 100%),
    var(--vp-card) !important;
  border: 1px solid var(--vp-border) !important;
  border-radius: 22px !important;
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  overflow: visible !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  backdrop-filter: blur(10px);
}

[class*="product-card"]:hover,
[class*="products"] [class*="item"]:hover,
.product-entry:hover,
.s-product-card-vertical:hover {
  background: 
    linear-gradient(145deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 100%),
    var(--vp-card-hover) !important;
  border-color: var(--vp-border-hover) !important;
  transform: translateY(-8px) scale(1.01);
  box-shadow: 
    0 25px 65px rgba(0, 0, 0, 0.5),
    0 10px 25px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* شريط بنفسجي علوي احترافي */
[class*="product-card"]::before,
.product-entry::before,
[class*="cart"] [class*="item"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--vp-purple) 25%, 
    var(--vp-purple-light) 50%, 
    var(--vp-purple) 75%, 
    transparent 100%);
  opacity: 0.8;
  border-radius: 22px 22px 0 0;
}

/* =========================
   صور المنتجات الدائرية
   ========================= */
[class*="product"] img,
.product-entry img,
.s-product-card-image img,
[class*="product-card"] img {
  border-radius: 50% !important;
  border: 3px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

[class*="product"]:hover img,
.product-entry:hover img,
.s-product-card-vertical:hover img {
  transform: scale(1.05) rotate(2deg);
  border-color: rgba(167, 139, 250, 0.25) !important;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(124, 58, 237, 0.15);
}

/* =========================
   العناوين والنصوص
   ========================= */
h1, h2, h3, h4, h5, h6,
[class*="title"],
[class*="heading"],
.product-title,
.s-product-card-title {
  color: var(--vp-text-primary) !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.3em; }
h3 { font-size: 1.8em; }

p, span,
[class*="desc"],
[class*="description"],
[class*="summary"],
[class*="text"] {
  color: var(--vp-text-secondary) !important;
  line-height: 1.7;
}

/* =========================
   الأسعار - تصميم بنفسجي
   ========================= */
[class*="price"],
.price,
.s-product-card-price,
[class*="amount"] {
  background: linear-gradient(135deg, 
    var(--vp-purple) 0%, 
    var(--vp-purple-dark) 50%, 
    var(--vp-purple) 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 12px 30px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 24px var(--vp-purple-glow),
    0 2px 8px rgba(124, 58, 237, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

[class*="price"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

[class*="product"]:hover [class*="price"]::before {
  left: 100%;
}

/* السعر القديم */
del, s,
[class*="compare"],
[class*="old-price"],
.compare-price {
  color: var(--vp-error) !important;
  font-weight: 600 !important;
  opacity: 0.7;
}

/* =========================
   الأزرار
   ========================= */
button, .btn,
[class*="button"],
.s-button-btn,
input[type="submit"],
input[type="button"] {
  border-radius: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 14px 32px;
  text-transform: uppercase;
  font-size: 0.95em;
}

/* الزر الأساسي - بنفسجي */
button:not(.ghost):not([disabled]), 
.btn:not(.ghost):not([disabled]),
.btn-primary,
.s-button-primary,
[class*="button"]:not(.ghost):not([disabled]) {
  background: linear-gradient(135deg, 
    var(--vp-purple) 0%, 
    var(--vp-purple-dark) 100%) !important;
  border: 1px solid rgba(167, 139, 250, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 
    0 10px 28px var(--vp-purple-glow),
    0 4px 12px rgba(124, 58, 237, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

button:not(.ghost):not([disabled])::before,
.btn:not(.ghost):not([disabled])::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button:not(.ghost):not([disabled]):hover::before,
.btn:not(.ghost):not([disabled]):hover::before {
  width: 300px;
  height: 300px;
}

button:not(.ghost):not([disabled]):hover,
.btn:not(.ghost):not([disabled]):hover,
.s-button-primary:hover {
  background: linear-gradient(135deg, 
    var(--vp-purple-light) 0%, 
    var(--vp-purple) 100%) !important;
  transform: translateY(-3px);
  box-shadow: 
    0 15px 40px rgba(124, 58, 237, 0.5),
    0 6px 16px rgba(124, 58, 237, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

button:not(.ghost):not([disabled]):active,
.btn:not(.ghost):not([disabled]):active {
  transform: translateY(-1px);
}

/* الأزرار الثانوية */
.btn-secondary,
.btn.ghost,
button.ghost {
  background: transparent !important;
  border: 1px solid var(--vp-border) !important;
  color: var(--vp-text-primary) !important;
  box-shadow: none;
}

.btn-secondary:hover,
.btn.ghost:hover,
button.ghost:hover {
  background: rgba(124, 58, 237, 0.1) !important;
  border-color: rgba(167, 139, 250, 0.3) !important;
}

/* الأزرار المعطلة */
button[disabled],
.btn[disabled],
.btn-disabled,
.s-button-disabled {
  background: linear-gradient(135deg, #52525b 0%, #71717a 100%) !important;
  color: #a1a1aa !important;
  border: 1px solid rgba(160, 160, 176, 0.2) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* =========================
   حالات التوفر
   ========================= */

/* المنتج المتوفر - بنفسجي مميز */
[class*="available"]:not([class*="unavailable"]),
[data-available="true"],
[class*="in-stock"],
.stock.available,
.product-card.available,
.in-stock-badge {
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.25) 0%, 
    rgba(167, 139, 250, 0.15) 100%) !important;
  border: 1px solid rgba(167, 139, 250, 0.5) !important;
  color: #f5f3ff !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 
    0 6px 20px rgba(124, 58, 237, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  letter-spacing: 0.3px;
  font-size: 0.9em;
}

/* أيقونة التوفر */
[class*="available"]::before,
[class*="in-stock"]::before {
  content: "●";
  color: var(--vp-purple-light);
  font-size: 1.2em;
}

/* المنتج غير المتوفر */
[class*="unavailable"],
[data-available="false"],
[class*="out-of-stock"],
.stock.unavailable,
.out-of-stock-badge {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #fee2e2 !important;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
  letter-spacing: 0.3px;
  font-size: 0.9em;
}

[class*="unavailable"]::before,
[class*="out-of-stock"]::before {
  content: "●";
  color: var(--vp-error);
  font-size: 1.2em;
}

/* =========================
   حقول الإدخال
   ========================= */
input, select, textarea,
.input, .form-control {
  background: rgba(15, 22, 38, 0.8) !important;
  border: 1px solid rgba(167, 139, 250, 0.25) !important;
  color: var(--vp-text-primary) !important;
  border-radius: 14px;
  padding: 12px 18px;
  transition: all 0.3s ease;
  font-size: 1em;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: var(--vp-text-muted) !important;
}

input:focus, 
select:focus, 
textarea:focus,
.input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--vp-purple) !important;
  box-shadow: 
    0 0 0 4px rgba(124, 58, 237, 0.15) !important,
    0 4px 12px rgba(124, 58, 237, 0.2) !important;
  background: rgba(15, 22, 38, 0.95) !important;
}

/* =========================
   ملخص السلة والطلب
   ========================= */
[class*="summary"],
[class*="totals"],
[class*="order-summary"],
.cart-summary,
.checkout-summary {
  background: 
    linear-gradient(145deg, 
      rgba(124, 58, 237, 0.08) 0%, 
      transparent 70%),
    rgba(15, 22, 38, 0.9) !important;
  border: 1px solid rgba(167, 139, 250, 0.25) !important;
  border-radius: 20px !important;
  padding: 25px !important;
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
}

[class*="summary"] [class*="total"],
[class*="totals"] [class*="total"],
.total-price {
  color: var(--vp-purple-light) !important;
  font-weight: 800 !important;
  font-size: 1.5em;
}

/* =========================
   الرموز والأيقونات
   ========================= */
[class*="icon"],
.icon,
i {
  color: var(--vp-text-secondary);
  transition: all 0.3s ease;
}

button:hover [class*="icon"],
.btn:hover .icon {
  color: #ffffff;
  transform: scale(1.1);
}

/* =========================
   الشارات والعلامات
   ========================= */
.badge, 
[class*="badge"],
.tag,
[class*="tag"] {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-primary,
.badge.primary {
  background: linear-gradient(135deg, var(--vp-purple) 0%, var(--vp-purple-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--vp-purple-glow);
}

.badge-success,
.badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--vp-success);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-error,
.badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--vp-error);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* =========================
   الروابط
   ========================= */
a {
  color: var(--vp-purple-light);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: #c4b5fd;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--vp-purple) 0%, var(--vp-purple-light) 100%);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

/* =========================
   الهيدر والفوتر
   ========================= */
header {
  background: rgba(11, 15, 23, 0.98) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--vp-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

footer {
  background: 
    linear-gradient(180deg, transparent 0%, rgba(11, 15, 23, 0.98) 25%);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--vp-border);
  padding-top: 60px;
}

/* =========================
   استجابة للشاشات الصغيرة
   ========================= */
@media (max-width: 768px) {
  h1 { font-size: 2.2em; }
  h2 { font-size: 1.8em; }
  h3 { font-size: 1.4em; }
  
  [class*="product-card"],
  .product-entry {
    border-radius: 18px !important;
  }
  
  button, .btn {
    padding: 12px 24px;
    font-size: 0.9em;
  }
}

/* =========================
   تحسينات الأداء
   ========================= */
* {
  scroll-behavior: smooth;
}

[class*="product-card"],
.product-entry {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}