/*
 * ============================================================
 *  ROL Store — product.css (توزيع سكاي ستور المطور)
 * ============================================================
 */

/* ===== LAYOUT الرئيسي (يمين: صورة | وسط: وصف | يسار: دفع) ===== */
.product-detail-layout-v3 {
  display: grid;
  /* تقسيم المساحة: 1.1 للصورة، 1.2 للوصف، 320px ثابت للشراء */
  grid-template-columns: 1.1fr 1.2fr 320px;
  gap: 2.5rem;
  align-items: start;
  direction: rtl; /* التأكد من الاتجاه العربي */
}

/* عمود الصورة (يمين) */
.detail-image-col .image-sticky-wrap {
  position: sticky;
  top: 100px;
}
.detail-image-col img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* عمود المعلومات (منتصف) */
.detail-info-col h1 {
  font-size: 2.4rem;
  margin: 0 0 10px;
  color: #fff;
}
.product-info-badges {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}
.loyalty-badge {
  background: rgba(255, 212, 0, 0.1);
  color: #ffd400;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 900;
}

/* التبويبات */
.detail-tabs-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 26px;
  min-height: 400px;
}
.tabs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}
.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.3s;
}
.tab-btn.active {
  background: #3b82f6; /* لون أزرق احترافي مثل سكاي ستور */
  border-color: #3b82f6;
}
.description-content {
  line-height: 1.9;
  color: #e0e0e0;
  font-size: 1.1rem;
}
.detail-specs-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.detail-specs-list li {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

/* عمود الشراء (يسار) */
.detail-payment-col {
  position: sticky;
  top: 100px;
}
.payment-card-v3 {
  background: rgba(20, 5, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-price-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 18px;
  border-radius: 16px;
  text-align: center;
}
.side-price-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.side-price-top strong {
  font-size: 2.2rem;
  color: var(--cyan);
}
.discount-badge {
  background: rgba(138, 251, 215, 0.15);
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}
.side-price-bottom {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 8px;
}
.old-price-text { text-decoration: line-through; opacity: 0.7; }

/* أزرار الأكشن */
.action-buttons { display: grid; gap: 10px; }
.buy-btn, .cart-btn { width: 100%; height: 52px; border-radius: 14px; }
.cart-btn { background: rgba(255,255,255,0.05) !important; }

/* قسم طرق الدفع (أيقونات رسمية) */
.trust-pay-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  text-align: center;
}
.pay-title { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; font-weight: 900; }
.payment-logos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}.apple-pay { background-image: url('https://upload.wikimedia.org/wikipedia/commons/b/b0/Apple_Pay_logo.svg'); }
.google-pay { background-image: url('https://upload.wikimedia.org/wikipedia/commons/f/f2/Google_Pay_Logo.svg'); background-size: 50%; }
.mada { background-image: url('https://upload.wikimedia.org/wikipedia/commons/8/85/Mada_Logo.svg'); }
.visa 
.pay-logo {
  height: 38px;
  background-color: #fff; /* خلفية بيضاء للأيقونات لتظهر بوضوح */
  border-radius: 8px;
  background-size: 65%;
  background-position: center;
  background-repeat: no-repeat;
}
/* الروابط الرسمية للأيقونات */

/* استجابة الجوال */
@media (max-width: 1050px) {
  .product-detail-layout-v3 {
    grid-template-columns: 1fr;
  }
  .detail-image-col, .detail-payment-col { position: static; }
}

/* ============================================================
   الجزء الجديد: تنسيق السلة وطرق الدفع (Eneba Style)
   ============================================================ */

/* حاوية السلة (توزيع عمودين) */
.cart-checkout-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    align-items: start;
    margin-top: 20px;
}

/* بطاقات الأقسام داخل السلة */
.cart-section-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.cart-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
}

/* شكل المنتج العرضي (Horizontal) */
.cart-items-list-v2 { display: grid; gap: 15px; }
.cart-item-v2 {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.cart-item-v2 img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { margin: 0 0 5px; font-size: 1.1rem; color: #fff; }
.cart-item-info p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.cart-item-price-v2 { text-align: left; font-weight: 900; font-size: 1.2rem; color: var(--cyan); }

/* قائمة اختيار طرق الدفع (Radio) */
.payment-methods-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 👈 هنا السر */
  gap: 15px;
  margin-top: 15px;
}.pay-method-item { cursor: pointer; }
.pay-method-item input { display: none; } /* إخفاء زر الراديو التقليدي */

.pay-method-content {
  display: flex;
  align-items: center;
  justify-content: center; /* 👈 يخلي الصورة بالنص */
  gap: 10px;
  background: #f3f3f3; /* 👈 نفس لون المربعات */
  padding: 15px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: 0.2s;
}

/* عند اختيار طريقة الدفع */
.pay-method-item input:checked + .pay-method-content {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.radio-circle {
    width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-radius: 50%; position: relative;
}

.pay-method-item input:checked + .pay-method-content .radio-circle {
    border-color: #3b82f6;
}

.pay-method-item input:checked + .pay-method-content .radio-circle::after {
    content: ''; position: absolute; width: 10px; height: 10px; background: #3b82f6; border-radius: 50%; top: 3px; left: 3px;
}

/* أيقونات الدفع داخل القائمة */
.pay-method-content img { height: 26px; min-width: 45px; object-fit: contain; background: #fff; padding: 3px; border-radius: 4px; }

/* الملخص الجانبي (Sidebar) */
.cart-sidebar-summary { position: sticky; top: 100px; }
.summary-card-v2 {
    background: rgba(25, 10, 45, 0.95);
    border: 2px solid #3b82f6;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
}
.summary-line { display: flex; justify-content: space-between; margin-bottom: 15px; color: #ddd; }
.total-line { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; color: #fff; font-size: 1.5rem; font-weight: 900; }

.checkout-btn-v2 { 
    width: 100%; height: 55px; font-size: 1.2rem; margin-top: 20px; 
    background: #3b82f6 !important; border: none; border-radius: 12px; color: #fff; font-weight: 900; cursor: pointer;
}

/* خانة الكوبون */
.coupon-section { display: flex; gap: 10px; margin: 20px 0; }
.coupon-section input { flex: 1; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 10px; border-radius: 8px; color: #fff; }
.coupon-section button { background: rgba(255,255,255,0.1); border: none; padding: 0 15px; border-radius: 8px; color: #fff; cursor: pointer; }

@media (max-width: 900px) {
    .cart-checkout-container { grid-template-columns: 1fr; }
}
/* ============================================================
   FIX: توحيد شكل طرق الدفع في صفحة المنتج والسلة
   ============================================================ */
.payment-methods-selector,
.payment-display-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin-top: 15px !important;
}

.pay-method-item {
  display: block !important;
  cursor: pointer !important;
}

.pay-method-item input {
  display: none !important;
}

.pay-method-content {
  width: 100% !important;
  height: 58px !important;
  background: #fff !important;
  border-radius: 10px !important;
  border: 2px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.pay-method-content img {
  max-width: 115px !important;
  max-height: 34px !important;
  object-fit: contain !important;
  display: block !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pay-method-content strong,
.pay-method-content .radio-circle {
  display: none !important;
}

.pay-method-item input:checked + .pay-method-content {
  border-color: #9c3cff !important;
}
