/* === Salla - Custom CSS for Car Parts Store (RTL) ===
   Paste in "Custom CSS" in Salla design settings
   Author: Provided to بندر - pragmatic, no bs
*/

/* Import Google Font (Tajawal) - remove if blocked */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;600;700;900&display=swap');

/* Global */
:root{
  --accent:#ff7200;           /* برتقالي نداء */
  --accent-dark:#e05f00;
  --bg:#ffffff;
  --card:#fafafa;
  --muted:#6b6b6b;
  --dark:#121318;             /* رمادي قاتم */
  --border:#e6e6e6;
  --success:#2aa44f;
}

html,body{
  direction:rtl;
  font-family:'Tajawal', system-ui, Arial, sans-serif !important;
  background:var(--bg);
  color:var(--dark);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Header */
.header, .site-header {
  background:linear-gradient(90deg, #0f1720 0%, #1b2630 100%);
  color:#fff;
  border-bottom:4px solid rgba(255,255,255,0.03);
}
.header a, .site-header a, .header .logo, .site-header .logo{
  color:#fff !important;
  text-decoration:none;
}
.header .search-input, .site-header .search-input{
  background:#111419;
  border:1px solid rgba(255,255,255,0.04);
  color:#ddd;
  padding:8px 12px;
  border-radius:6px;
}

/* Hero / Banner */
.hero, .store-hero {
  background:linear-gradient(180deg, rgba(18,19,24,0.8), rgba(255,255,255,0)) , url('/assets/hero-car.jpg') center/cover no-repeat;
  color:#fff;
  padding:42px 18px;
  border-radius:6px;
  margin-bottom:18px;
}
.hero h1, .hero .title { font-size:28px; font-weight:800; margin:0 0 6px; letter-spacing:.2px; }
.hero p { color:rgba(255,255,255,0.9); margin:0; }

/* Product grid & card */
.product-list, .products-grid {
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:18px;
  margin:0;
  padding:0;
}

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

.product-card, .product-item {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(16,20,24,0.04);
  transition:transform .14s ease, box-shadow .14s ease;
  display:flex;
  flex-direction:column;
  min-height:330px;
}

.product-card:hover{
  transform:translateY(-6px);
  box-shadow:0 18px 40px rgba(16,20,24,0.08);
}

/* Image area */
.product-card .image, .product-item .image {
  background:#f4f4f4;
  height:200px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid var(--border);
}
.product-card img, .product-item img{
  max-width:88%;
  max-height:88%;
  object-fit:contain;
}

/* Content */
.product-card .meta, .product-item .meta {
  padding:12px 14px;
  flex:1;
  display:flex;
  flex-direction:column;
}
.product-card .title, .product-item .title {
  font-weight:700;
  font-size:15px;
  color:var(--dark);
  margin-bottom:8px;
  line-height:1.2;
}
.product-card .sku { font-size:12px; color:var(--muted); margin-bottom:8px; }

/* Price & actions */
.price-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.price {
  font-weight:800;
  color:var(--dark);
  font-size:18px;
}
.price .old {
  font-weight:600;
  font-size:13px;
  text-decoration:line-through;
  color:var(--muted);
  margin-left:8px;
}

/* Add to cart button */
.btn-add {
  display:inline-block;
  background:var(--accent);
  color:#fff;
  padding:10px 14px;
  border-radius:8px;
  text-align:center;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition:background .12s ease, transform .08s ease;
  box-shadow:0 6px 14px rgba(240,120,40,0.12);
}
.btn-add:hover{ background:var(--accent-dark); transform:translateY(-2px); }

/* Small text under card */
.product-card .meta .muted {
  font-size:13px;
  color:var(--muted);
  margin-top:10px;
}

/* Badges: جديد - خصم - متوفر */
.badge {
  position:absolute;
  top:12px;
  left:12px; /* since RTL, left shows on visual right */
  background:var(--accent);
  color:#fff;
  padding:6px 10px;
  border-radius:6px;
  font-weight:700;
  font-size:13px;
  box-shadow:0 6px 12px rgba(0,0,0,0.06);
}
.badge.discount { background:#d63031; } /* خصم */
.badge.new { background:#0b6b3a; }      /* جديد */
.badge.out { background:#888; }         /* نفذ */

/* Product page */
.product-page .product-gallery { display:flex; gap:14px; flex-wrap:wrap; }
.product-page .product-info { padding:18px; background:var(--bg); border-radius:8px; border:1px solid var(--border); }
.product-page .product-info h1 { font-size:20px; margin:0 0 8px; font-weight:900; }
.product-page .specs { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:12px; }
@media (max-width:760px){ .product-page .specs { grid-template-columns:1fr; } }

/* Filters / sidebar */
.sidebar { background:var(--card); border:1px solid var(--border); padding:12px; border-radius:8px; }
.filter-title { font-weight:800; margin-bottom:8px; font-size:14px; }
.filter-item { display:flex; align-items:center; justify-content:space-between; padding:8px 6px; border-radius:6px; cursor:pointer; }
.filter-item:hover{ background:rgba(0,0,0,0.02); }

/* Cart summary mini */
.mini-cart {
  background:linear-gradient(180deg,#fff,#fafafa);
  border:1px solid var(--border);
  padding:10px;
  border-radius:8px;
  box-shadow:0 12px 24px rgba(16,20,24,0.04);
}
.mini-cart .checkout-btn {
  width:100%;
  display:block;
  padding:10px;
  border-radius:8px;
  text-align:center;
  font-weight:800;
  background:var(--accent);
  color:#fff;
  border:none;
}

/* Footer */
.site-footer {
  background:#0b0f12;
  color:#cfcfcf;
  padding:26px 12px;
  font-size:13px;
}

/* Accessibility & small tweaks */
a, button { outline-color:var(--accent); }
input, select, textarea { border:1px solid var(--border); padding:10px; border-radius:6px; font-size:14px; }

/* Mobile fixes */
@media (max-width:420px){
  .hero h1 { font-size:20px; }
  .product-card .image { height:160px; }
  .btn-add { padding:8px 10px; font-size:14px; }
  .product-list { gap:12px; }
}

/* Utility */
.text-center { text-align:center; }
.small { font-size:13px; color:var(--muted); }

/* === End of CSS === */