/* ===== Single Product — Modern, clean, RTL-friendly ===== */

/* Design tokens (عدّل الألوان لتناسب الهوية) */
:root{
  --brand:#6b74ff;           /* أساسي */
  --brand-2:#7a4be1;         /* تدرّج */
  --accent:#22c55e;          /* أخضر للتأكيد */
  --danger:#ef4444;
  --text:#1f2937;
  --muted:#6b7280;
  --bg:#f6f7fb;
  --card:#ffffff;
  --radius:16px;
  --shadow:0 10px 30px rgba(15, 23, 42, .06);
}

html[dir="rtl"] .woocommerce, body.rtl .woocommerce { direction: rtl; }

/* Wrapper */
.bein-single-product{
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 24px 0;
  overflow: hidden;
}

/* Grid Layout */
.product-container{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:32px;
  padding:32px;
  background:var(--card);
}

@media (max-width: 992px){
  .product-container{ grid-template-columns: 1fr; padding:22px; gap:22px; }
}

/* Gallery */
.product-gallery-section .product-images{
  background: #fbfbfd;
  border:1px solid #eef0f5;
  border-radius: calc(var(--radius) - 4px);
  padding: 18px;
  min-height: 420px;
  display:flex; align-items:center; justify-content:center;
}
.product-gallery-section img{
  width:100%; height:auto; object-fit:contain !important; aspect-ratio:auto !important;
  border-radius: 12px;
}

/* Title + Rating */
.product-summary-section{ padding-block:4px; }
.product-title-section{
  border-bottom:1px dashed #eceff3;
  padding-bottom:16px; margin-bottom:16px;
}
.product_title{
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
  color: var(--text); font-weight:800; margin:0 0 10px;
}
.product-rating{ display:flex; align-items:center; gap:10px; color:var(--muted); }
.product-rating .star-rating{ transform: translateY(1px); }
.rating-count{ font-size:.9rem; color:#9aa3af; }

/* Price (يعرضه Woo) */
.product-price-section .price{
  display:inline-flex; align-items:baseline; gap:8px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--brand-2); font-weight:800;
}
.price del{ opacity:.55; font-weight:600; }
.price ins{ text-decoration:none; }

/* Short description */
.product-short-description{
  margin:18px 0 24px;
  background:#fbfbfd; border:1px solid #eef0f5; border-inline-start:4px solid var(--brand);
  color:#475569; line-height:1.8; padding:14px 16px; border-radius:12px;
}

/* Subscription options */
.subscription-options-section{ margin: 12px 0 24px; }
.subscription-options-title{
  font-size:1.05rem; font-weight:700; color:var(--text);
  margin:0 0 10px; text-align: start;
}

/* Segmented buttons (الفصل بين الأزرار بشكل جذاب) */
.subscription-periods{
  display:flex; gap:10px;
}
.subscription-option input[type="radio"]{ display:none; }
.subscription-label.wl-attr-btn{
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center;
  min-width: 140px; padding:12px 14px;
  border:1px solid #e5e7eb; border-radius:12px; background:#fff;
  cursor:pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  box-shadow: 0 4px 16px rgba(15,23,42,.03);
}
.subscription-label.wl-attr-btn:hover {
    transform: translateY(-1px);
    border-color: #d1d5db;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}
.subscription-label.wl-attr-btn.is-active,
.subscription-option input[type="radio"]:checked + .subscription-label{
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color:#fff; box-shadow: 0 10px 24px rgba(107,116,255,.25);
}
.period-text{ font-weight:800; font-size: .98rem; }
.period-note{ font-size:.82rem; opacity:.85; margin-top:2px; }

/* Features list */
.product-features{
  background:#fbfbfd; border:1px solid #eef0f5; border-radius:12px; padding:16px; margin: 16px 0 24px;
}
.product-features h4{ margin:0 0 10px; font-size:1.05rem; font-weight:800; color:var(--text); }
.features-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.features-list li{
  display:flex; align-items:center; gap:10px; color:#475569; padding:6px 0;
  border-bottom:1px dashed #eef0f5;
}
.features-list li:last-child{ border-bottom:none; }
.features-list i{ color:var(--accent); }

/* Add to cart card */
.product-add-to-cart-section{
  background:#fff; border:1px solid #eef0f5; border-radius:12px; padding:16px;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
}

/* Woo default form tweaks */
/*.variations{ margin-bottom:12px; }*/
/*.variations td{ padding:6px 0; vertical-align:middle; }*/
/*.variations .label label{ font-weight:700; color: var(--text); }*/
/*.variations select{*/
/*  width:100%; border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px;*/
/*  background:#fff;*/
/*}*/
.reset_variations{ font-size:.85rem; color:#64748b; text-decoration:underline dotted; }

.single_add_to_cart_button{
  width:100%; border:none; border-radius:12px; padding:14px 18px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color:#fff; font-weight:800; letter-spacing:.2px; box-shadow: 0 10px 26px rgba(107,116,255,.35);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.single_add_to_cart_button:hover{ transform: translateY(-2px); box-shadow: 0 16px 34px rgba(107,116,255,.4); }
.single_add_to_cart_button[disabled],
.single_add_to_cart_button[aria-disabled="true"]{ opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }

/* Trust */
.trust-signals{
  display:flex; gap:16px; align-items:center; justify-content:space-between;
  margin-top:14px; padding:12px 14px; background:#fbfbfd; border:1px solid #eef0f5; border-radius:12px;
}
.trust-item{ display:flex; align-items:center; gap:8px; color:#6b7280; font-weight:600; }
.trust-item i{ color:var(--brand); }

/* Tabs/related */
.product-tabs-section{
  background:var(--card); margin-top:18px; border-radius: var(--radius);
  box-shadow: var(--shadow); padding:22px;
}

/* Focus states (accessibility) */
:where(.subscription-label.wl-attr-btn, .single_add_to_cart_button):focus-visible{
  outline: 2px solid #0000; box-shadow: 0 0 0 3px rgba(107,116,255,.35);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}


/* ===== Related Products — clean cards ===== */
.bein-related{
  margin-top: 28px;
  padding:0;
}
.bein-related__head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin-bottom:14px;
}
.bein-related__title{
  margin:0; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight:800; color:#1f2937;
}
.bein-related__sub{
  margin:0; color:#6b7280; font-size:.95rem;
}

/* عدّل شبكة ووكومرس الافتراضية لتكون بطاقات مرتبة */
.related.products ul.products,
.up-sells.upsells ul.products{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:18px;
  padding:0;
}

@media (max-width: 992px){
  .related.products ul.products{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .related.products ul.products{ grid-template-columns: 1fr; }
}

/* بطاقة المنتج */
.related.products ul.products li.product{
  background:#fff;
  border:1px solid #eef0f5;
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
  transition: transform .12s ease, box-shadow .12s ease;
  display:flex; flex-direction:column;
}
.related.products ul.products li.product:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15,23,42,.10);
}

/* الصورة */
.related.products ul.products li.product a.woocommerce-LoopProduct-link img{
  width:100%; height:auto; object-fit:contain; aspect-ratio:auto;
  background: #fbfbfd;
}

/* العنوان */
.related.products ul.products li.product .woocommerce-loop-product__title{
  font-weight:800; font-size:1rem; color:#111827; padding:10px 14px 0; margin:0;
}

/* السعر */
.related.products ul.products li.product .price{
  padding:4px 14px 10px; color:#7a4be1; font-weight:800;
}

/* زر الإضافة للسلة */
.related.products ul.products li.product .button{
  margin: 8px 14px 14px;
  width: calc(100% - 28px);
  text-align:center;
  border-radius:10px;
  background: linear-gradient(135deg, #6b74ff 0%, #7a4be1 100%);
  color:#fff; border:none; font-weight:700;
  box-shadow: 0 10px 22px rgba(107,116,255,.25);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.related.products ul.products li.product .button:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(107,116,255,.32);
}

/* إخفاء الوصف/العناصر الزائدة داخل البطاقة إن وُجدت */
.related.products ul.products li.product .star-rating{ margin-inline:14px; }

/* إخفاء بصري فقط مع بقاء العنصر لذوي الاحتياجات */
.sr-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* خيار: أخفِ سطر الـreset لو بتحب */
.variations{
  display: none !important;
}


/* أقسام السيناريو */
.bein-scn-h2{ font-size:clamp(1.4rem,2.2vw,1.8rem); font-weight:800; margin:10px 0 14px; }
.bein-info-section{
  background:#fbfbfd; border:1px solid #eef0f5; border-radius:14px; padding:16px; margin:16px 0;
}
.bein-info-section .sec-title{ margin:0 0 10px; font-size:1.05rem; font-weight:800; color:#111827; }

/* قوائم */
.check-list,.cross-list,.dot-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.check-list li,.cross-list li{ display:flex; align-items:center; gap:10px; }
.check-list i{ color:#22c55e; } .cross-list i{ color:#ef4444; }
.dot-list li::before{ content:'•'; color:#7a4be1; margin-inline:6px; font-weight:900; }

/* كبسولات */
.pill-list{ list-style:none; display:flex; flex-wrap:wrap; gap:10px; margin:0; padding:0; }
.pill-item{
  background:#fff; border:1px solid #e5e7eb; border-radius:999px; padding:8px 12px; font-weight:700;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}

/* جدول */
.specs-table{ width:100%; border-collapse:separate; border-spacing:0; }
.specs-table th,.specs-table td{ padding:10px 12px; border-bottom:1px dashed #e5e7eb; vertical-align:top; }
.specs-table th{ width:36%; color:#374151; font-weight:700; }
.specs-table tr:last-child th,.specs-table tr:last-child td{ border-bottom:none; }

/* كول آوت */
.scn-callout{
  background:#eef2ff; border:1px solid #c7d2fe; color:#111827; font-weight:700;
  padding:12px 14px; border-radius:10px; margin:8px 0;
}
/* Tabs */
.wl-tabs{ background:#fff; border:1px solid #eef0f5; border-radius:14px; box-shadow:0 8px 20px rgba(15,23,42,.06); }
.wl-tabs__nav{ display:flex; gap:8px; list-style:none; margin:0; padding:10px; border-bottom:1px solid #eef0f5; flex-wrap:wrap; }
.wl-tabs__link{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:10px; font-weight:800; color:#374151; text-decoration:none;
  background:#f8fafc; border:1px solid #e5e7eb; transition:.15s;
}
.wl-tabs__link:hover{ background:#eef2ff; border-color:#c7d2fe; }
.wl-tabs__link.is-active{ background:linear-gradient(135deg,#667eea,#7a4be1); color:#fff; border-color:transparent; }

.wl-tabs__panel{ display:none; padding:16px; }
.wl-tabs__panel.is-active{ display:block; }


/* ====== Reviews (scoped) ====== */
.wl-reviews{
  background:#fff; border:1px solid #eef0f5; border-radius:14px;
  padding:16px; box-shadow:0 8px 20px rgba(15,23,42,.06);
}
.wl-reviews *{ box-sizing:border-box; }

/* Header summary */
.wl-reviews__head{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px;
}
.wl-reviews__title{ margin:0; font-weight:800; color:#111827; font-size:1.15rem; }
.wl-reviews__summary{ display:flex; align-items:center; gap:8px; }
.wl-reviews__avg{ font-weight:800; color:#7a4be1; }

/* Star rating (for average & each review item) */
.wl-reviews .star-rating{
  position:relative; width:5.6em; height:1.1em; line-height:1; display:inline-block;
  font-size:1rem; overflow:hidden; color:#d1d5db;
}
.wl-reviews .star-rating::before{ content:"★★★★★";}
.wl-reviews .star-rating > span{
  position:absolute; right:0; top:0; height:100%; overflow:hidden; color:#f59e0b; white-space:nowrap;
}
.wl-reviews .star-rating > span::before{ content:"★★★★★";}

/* List */
.wl-reviews__list,
.wl-reviews ol.commentlist{
  list-style:none; margin:0; padding:0; display:grid; gap:12px;
}
.wl-reviews ol.commentlist li{ margin:0; }
.wl-reviews .comment_container{
  background:#fbfbfd; border:1px solid #eef0f5; border-radius:12px; padding:12px;
  display:grid; grid-template-columns:48px 1fr; gap:12px;
}
.wl-reviews .comment_container img.avatar{
  width:48px; height:48px; border-radius:50%; object-fit:cover;
}
.wl-reviews .comment-text{ margin:0; }
.wl-reviews .meta{
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  color:#6b7280; font-size:.92rem; margin:0 0 6px;
}
.wl-reviews .woocommerce-review__author{ font-weight:800; color:#111827; }
.wl-reviews .woocommerce-review__verified{ color:#10b981; font-weight:700; }
.wl-reviews .description{ color:#374151; line-height:1.65; }

/* Pagination */
.wl-reviews .woocommerce-pagination{ margin-top:10px; display:flex; justify-content:center; }
.wl-reviews .woocommerce-pagination ul{ list-style:none; display:flex; gap:6px; padding:0; margin:0; }
.wl-reviews .woocommerce-pagination li a,
.wl-reviews .woocommerce-pagination li span{
  display:inline-flex; min-width:36px; height:36px; align-items:center; justify-content:center;
  padding:0 10px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; color:#374151; text-decoration:none;
}
.wl-reviews .woocommerce-pagination li .current{
  background:linear-gradient(135deg,#667eea,#7a4be1); color:#fff; border-color:transparent;
}

/* Form: inputs */
.wl-reviews #review_form_wrapper{ margin-top:16px; }
.wl-reviews #review_form_wrapper .comment-reply-title{
  display:flex; align-items:center; gap:10px; margin:0 0 8px; font-weight:800; color:#111827;
}
.wl-reviews #review_form_wrapper p{ margin:0 0 10px; }

.wl-reviews #review_form_wrapper input[type="text"],
.wl-reviews #review_form_wrapper input[type="email"],
.wl-reviews #review_form_wrapper textarea,
.wl-reviews #review_form_wrapper select{
  width:100%; border:1px solid #e5e7eb; border-radius:12px; padding:12px 14px; background:#f9fafb;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.wl-reviews #review_form_wrapper textarea{ min-height:170px; resize:vertical; font-size:15px; line-height:1.6; }
.wl-reviews #review_form_wrapper input:focus,
.wl-reviews #review_form_wrapper textarea:focus,
.wl-reviews #review_form_wrapper select:focus{
  outline:0; background:#fff; border-color:#7a4be1; box-shadow:0 0 0 3px rgba(124,58,237,.12);
}
.wl-reviews #review_form_wrapper .comment-form-rating label{
  display:block; margin-bottom:8px; color:#4b5563; font-weight:700; font-size:.95rem;
}

/* Submit */
.wl-reviews #review_form_wrapper .form-submit .submit{
  width:100%; border:none; border-radius:14px; padding:12px 18px; cursor:pointer;
  background:linear-gradient(135deg,#667eea,#7a4be1); color:#fff; font-weight:800; font-size:16px;
  box-shadow:0 10px 26px rgba(107,116,255,.28); transition:transform .12s ease, box-shadow .12s ease;
}
.wl-reviews #review_form_wrapper .form-submit .submit:hover{
  transform:translateY(-1px); box-shadow:0 14px 30px rgba(107,116,255,.36);
}

/* Custom star widget (mirror select#rating) */
.wl-reviews .wl-rating-stars{
  display:flex; gap:6px; align-items:center; margin:8px 0 14px;
}
.wl-reviews .wl-rating-stars button{
  width:34px; height:34px; border:0; border-radius:8px; cursor:pointer;
  background:#f3f4f6; position:relative; padding:0;
  transition:transform .12s ease, background .12s ease;
}
.wl-reviews .wl-rating-stars button::before{
  content:"★"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:22px; color:#d1d5db; transition:color .15s ease;
}
.wl-reviews .wl-rating-stars button:hover{ transform:translateY(-1px); background:#eef2ff; }
.wl-reviews .wl-rating-stars button:hover::before{ color:#fbbf24; }
.wl-reviews .wl-rating-stars button.is-active::before,
.wl-reviews .wl-rating-stars button.is-filled::before{ color:#f59e0b; }

/* RTL tweaks */
html[dir="rtl"] .wl-reviews .comment_container{ grid-template-columns:1fr 48px; }
html[dir="rtl"] .wl-reviews .comment_container img.avatar{ order:2; }
html[dir="rtl"] .wl-reviews .comment-text{ order:1; }

/* عنوان قسم المراجعات */
.wl-reviews #review_form_wrapper .comment-reply-title{
  margin: 0 0 10px;
  font-weight: 800;
  color: #111827;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* كتلة التقييم */
.wl-reviews .comment-form-rating{
  margin: 10px 0 16px;
}
.wl-reviews .comment-form-rating label{
  display:block;
  margin-bottom:8px;
  color:#4b5563;
  font-weight:700;
  font-size:.95rem;
}

/* أخفِ نجوم Woo الافتراضية نهائياً */
.wl-reviews .comment-form-rating p.stars{ display:none !important; }

.wl-reviews .wl-rating-stars button{
  width:38px; height:38px; border:0; border-radius:10px; cursor:pointer;
  background:#f3f4f6; position:relative; padding:0;
  transition:transform .12s ease, background .12s ease;
}
.wl-reviews .wl-rating-stars button::before{
  content:"★"; position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; color:#d1d5db; transition:color .15s ease;
}
.wl-reviews .wl-rating-stars button:hover{ transform:translateY(-1px); background:#eef2ff; }
.wl-reviews .wl-rating-stars button:hover::before{ color:#fbbf24; }
.wl-reviews .wl-rating-stars button.is-active::before,
.wl-reviews .wl-rating-stars button.is-filled::before{ color:#f59e0b; }

/* حقل التقييم select (مخفي لكنه موجود للارسال/التحقق) */
.wl-reviews #rating{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  clip:rect(0 0 0 0); overflow:hidden; border:0;
}

/* مربع النص */
.wl-reviews #comment{
  width:100%;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px 16px;
  min-height:170px;
  font-size:15px; line-height:1.6;
  box-shadow:inset 0 1px 0 rgba(17,24,39,.03);
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.wl-reviews #comment::placeholder{ color:#9ca3af; }
.wl-reviews #comment:focus{
  background:#fff; outline:0; border-color:#7a4be1;
  box-shadow:0 0 0 3px rgba(124,58,237,.12);
}

/* زر الإرسال (عندك مناسب – فقط تأكيد الهوفر) */
.wl-reviews #review_form_wrapper .form-submit .submit:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(107,116,255,.36);
}

/* تلوين كل النجوم حتى النجمة المـُشار إليها */
.wl-reviews .wl-rating-stars button.is-hover::before{
  color:#fbbf24; /* لون الهوفر */
}
.wl-reviews .wl-rating-stars button.is-hover{ 
  background:#eef2ff;
}

.wl-reviews .comment-form-author input, .wl-reviews .comment-form-email input{
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(17, 24, 39, .03);
    transition: border-color .15s  ease, box-shadow .15s  ease, background .15s  ease;
}
