/* ==========================================================
   SHZ — Wishlist & Manage (Unified, Clean, Responsive)
   هوية ألوان شازار + تناسق كامل بين جدول الرغبات وجدول الإدارة
   ========================================================== */

/* -------------------------
   0) توكنز وهوية الألوان
   ------------------------- */
:root{
  --shz-radius: 14px;
  --shz-btn: #084F5D;
  --shz-btn-active: #B2905F;
  --shz-border: #084F5D;
  --shz-muted: #F2DBAD;
  --shz-text: #084F5D;
  --shz-bg: #FFFFFF;
}

/* حارس عام */
.shz-wl-wrap, .shz-wl-wrap *,
.shz-wl-manage, .shz-wl-manage * { box-sizing: border-box; }

/* -------------------------
   1) عناصر عامة/قديمة (مُنظَّفة)
   ------------------------- */
.shz-wl-btn{
  border:2px solid var(--shz-btn);
  background:transparent;
  padding:.5rem .8rem;
  border-radius:8px;
  cursor:pointer;
  color:var(--shz-btn);
  
}


.shz-wl-btn:hover{ border-color:var(--shz-btn-active); color:var(--shz-btn-active); }

.shz-wl-toast{
  position:fixed; z-index:99999; right:1rem; bottom:1rem;
  padding:.6rem .8rem; border-radius:10px;
  background:#111; color:#fff; opacity:.95;
}

/* زرار/روابط عامة داخل الودجت واللوحات */
.shz-wl-wrap .button, .shz-wl-wrap button,
.shz-wl-manage .button, .shz-wl-manage button,
.shz-wl-actions .btn{
  background:transparent !important;
  color:var(--shz-btn) !important;
  border:2px solid var(--shz-btn) !important;
  border-radius:var(--shz-radius) !important;
  padding:4px 8px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.35rem;
  box-shadow:none !important;
  transition:all .15s ease-in-out !important;
}
.shz-wl-wrap .button:hover, .shz-wl-wrap button:hover,
.shz-wl-manage .button:hover, .shz-wl-manage button:hover,
.shz-wl-actions .btn:hover{
  color:var(--shz-btn-active) !important;
  border-color:var(--shz-btn-active) !important;
}

/* -------------------------
   2) أيقونة القلب على الصور (نسخة واحدة فقط)
   ------------------------- */
.products .product,
.woocommerce-product-gallery{ position:relative; }

.shz-wl-heart-wrap{
  position:absolute; bottom:4px; inset-inline-end:10px; z-index:9;
}
.shz-wl-heart{
  background:transparent; border:none; box-shadow:none;
  width:auto; height:auto; padding:0; border-radius:0; cursor:pointer;
}
.shz-wl-heart i.fa-heart{ font-size:22px; line-height:1; color:var(--shz-btn); }
.shz-wl-heart.in-wl i.fa-heart{ color:#D33; }

/* نسخة المنتج الفردي */
.shz-wl-heart--single{ bottom:14px; inset-inline-end:14px; }

/* -------------------------
   3) غلاف صفحة الرغبات + الجدول
   ------------------------- */
.shz-wl-wrap.shz-wl--shazar{
  border:1px solid var(--shz-border);
  border-radius:var(--shz-radius);
  background:var(--shz-bg);
  overflow:hidden;                 /* لمنع نزيف الزوايا مع الجدول */
  box-shadow:0 6px 18px rgba(0,0,0,.04);
  margin-top:25px;
}

/* أساس الجدول */
table.shz-wl{
  width:100% !important;
  border-collapse:collapse;
  table-layout:fixed;              /* منع التمدد الأفقي */
  font-size:9px;                  /* قاعدة ودّية للقراءة */
}
table.shz-wl th, table.shz-wl td{
  text-align:center !important;
  vertical-align:middle !important;
  padding:2px 2px;
  border-bottom:1px solid #eee;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* رأس الجدول */
table.shz-wl thead th{
  background:var(--shz-muted) !important;
  color:var(--shz-text) !important;
  font-weight:700;
}

/* آخر صف بدون حد سفلي */
table.shz-wl tbody tr:last-child td{ border-bottom:none; }

/* أعمدة مقترحة (6 أعمدة: صورة/اسم/سعر/توفر/كمية/إجراءات) على الديسكتوب */
@media (min-width:1024px){
  table.shz-wl colgroup col:nth-child(1){ width:12% !important; }
  table.shz-wl colgroup col:nth-child(2){ width:12% !important; }
  table.shz-wl colgroup col:nth-child(3){ width:12% !important; }
  table.shz-wl colgroup col:nth-child(4){ width:12% !important; }
  table.shz-wl colgroup col:nth-child(5){ width:12% !important; }
  table.shz-wl colgroup col:nth-child(6){ width:12% !important; }
}

/* صورة المنتج */
td.shz-wl-cell-thumb{ width:72px; }
td.shz-wl-cell-thumb .shz-wl-thumb,
.shz-wl-thumb{
  display:block; margin:0 auto;
  width:64px; height:64px; max-width:100%;
  object-fit:cover; border-radius:6px;
}

/* عنوان المنتج */
.shz-wl-cell-title .shz-wl-title,
.shz-wl-title{
  font-weight:600;
  font-size:0.9em;
  line-height:1.3;
}

/* السعر داخل الخلية */
.shz-wl-cell-price .price,
.shz-wl-cell-price .amount,
.shz-wl-cell-price .woocommerce-Price-amount,
.shz-wl-cell-price bdi{ font-size:0.5em; line-height:1.2; }

/* كمية */
.shz-wl-cell-qty input.shz-wl-qty{
  height:34px; padding:0 2px;
  border-radius:6px !important;
  font-size:13px; text-align:center;
  width:30px;
  border-color: solid var(--shz-border) !important;

}

/* أزرار الإجراءات داخل الجدول (مُصغَّرة قليلاً) */
.shz-wl-actions{ padding-top:2px; }
.shz-wl-actions .button, .shz-wl-actions .btn{
  padding:2px 2px !important;
  font-size:7px !important;
  border-radius:8px !important;
  max-width:100% !important;
  font-size:5px !important;
}

/* نسخة مضغوطة اختيارية: أضف .shz-wl-compact لخفض الحشوات قليلاً */
.shz-wl-compact th, .shz-wl-compact td{ padding:6px 8px !important; }
.shz-wl-compact{ font-size:7.5px; }
.shz-wl-compact .shz-wl-cell-price .price,
.shz-wl-compact .shz-wl-title{ font-size:0.2em; }

/* -------------------------
   4) شريط المشاركة/الرابط
   ------------------------- */
.shz-wl-share{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.shz-wl-share input,
.shz-wl-share-input,
.shz-wl-sharebar input{
  flex:1 1 240px; min-width:0;
  border:1.5px solid var(--shz-border) !important;
  border-radius:12px !important;
  background:#fff !important;
  min-height:38px; padding:8px 12px !important;
  font-size:10px !important; outline:none !important;
}
.shz-wl-share .button, .shz-wl-share .btn, .shz-wl-share button{
  min-height:34px !important;
  padding:4px 8px !important;
  border-radius:8px !important;
}

/* -------------------------
   5) صفحة إدارة القوائم (متناسقة مع جدول الرغبات)
   ------------------------- */
.shz-wl-manage{ display:grid; gap:16px; align-items:start; }
@media (min-width:1024px){ .shz-wl-manage{ grid-template-columns:280px 1fr; } }
@media (max-width:1023.98px){ .shz-wl-manage{ grid-template-columns:1fr; } }

/* صندوق القوائم (العمود الجانبي) */
.shz-wl-lists{
  border:1px solid var(--shz-border);
  border-radius:var(--shz-radius);
  background:#fff; padding:10px;
  width:100%; max-width:100%; overflow:hidden;
}
.shz-wl-lists .row{
  display:flex; justify-content:space-between; align-items:center;
  gap:8px; flex-wrap:wrap;
  padding:8px 10px !important;
  border-bottom:1px dashed rgba(0,0,0,.1);
}
.shz-wl-lists .row:last-child{ border-bottom:none; }
.shz-wl-lists .row.active{ background:rgba(8,79,93,.06); border-radius:10px; }
.shz-wl-lists .row .name{
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-weight:600;
}

/* لوحة المحتوى */
.shz-wl-panel{
  border:1px solid var(--shz-border);
  border-radius:var(--shz-radius);
  background:#fff; padding:12px;
  width:100%; max-width:100%; overflow:hidden;
}

/* شريط علوي */
.shz-wl-topbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; gap:10px; flex-wrap:wrap; }

/* جدول داخل لوحة الإدارة بنفس تنسيق جدول الرغبات */
.shz-wl-manage table.shz-wl{
  font-size:13px !important; table-layout:fixed !important; width:100% !important;
}
.shz-wl-manage table.shz-wl th,
.shz-wl-manage table.shz-wl td{
  padding:8px 10px !important;
  line-height:1.25 !important;
  text-align:center !important;
  vertical-align:middle !important;
}

/* أدوات التحكم */
.shz-wl-manage .button, .shz-wl-manage .btn, .shz-wl-manage button{
  padding:6px 10px !important; min-height:34px !important;
  font-size:12.5px !important; border-radius:10px !important;
}

/* كتلة فتح/إغلاق إدارة القوائم (إن وجدت) */
.shz-wl-manage-block{ margin-top:60px; margin-bottom:20px; }
.shz-wl-manage-toggle{
  border:2px solid var(--shz-btn);
  background:#fff; color:var(--shz-btn);
padding:.55rem .95rem; border-radius:var(--shz-radius,14px); font-weight:600;
  cursor:pointer; display:inline-flex; align-items:center; gap:.4rem; line-height:1;
}
.shz-wl-manage-toggle:hover, .shz-wl-manage-toggle.is-open{
  border-color:var(--shz-btn-active); color:var(--shz-btn-active);
}
.shz-wl-manage-panel{
  margin-top:10px; border:1px dashed #e5e7eb; border-radius:12px; padding:10px;
}

/* -------------------------
   6) تحسينات الاستجابة (موبايل/لاب توب)
   ------------------------- */

/* لابتوب: تقليل الحشوات قليلاً */
@media (min-width:1024px) and (max-width:1439.98px){
  .shz-wl-compact th, .shz-wl-compact td,
  table.shz-wl th, table.shz-wl td{ padding:6px 8px !important; }
}

/* ≤ 600px: خط أصغر وحشوات أقل وصور أصغر */
@media (max-width:600px){
  table.shz-wl{ font-size:12px; }
  table.shz-wl th, table.shz-wl td{ padding:6px 6px !important; }

  td.shz-wl-cell-thumb{ width:56px; }
  td.shz-wl-cell-thumb .shz-wl-thumb,
  .shz-wl-thumb{ width:48px; height:48px; border-radius:6px; }

  .shz-wl-title{ font-size:.9em !important; }
  .shz-wl-cell-qty input.shz-wl-qty{ height:30px; font-size:12px; border-radius:6px !important; }

  /* أعمدة متساوية لو لم يوجد colgroup مضبوط */
  .shz-wl-wrap table.shz-wl colgroup col{ width:16.6667% !important; }
  .shz-wl-wrap table.shz-wl thead th:nth-child(n),
  .shz-wl-wrap table.shz-wl tbody td:nth-child(n){ width:16.6667% !important; }

  .shz-wl-share input{ min-height:36px; border-radius:12px !important; }
  .shz-wl-manage .button, .shz-wl-manage .btn, .shz-wl-manage button{
    padding:5px 9px !important; min-height:32px !important; font-size:12px !important; border-radius:8px !important;
  }
}

/* ≤ 480px: ضغط إضافي خفيف بدون كسر قابلية القراءة */
@media (max-width:480px){
  table.shz-wl{ font-size:11px; }
  table.shz-wl th, table.shz-wl td{ padding:5px 6px !important; }
  .shz-wl-actions .button, .shz-wl-actions .btn{ font-size:11px !important; padding:5px 8px !important; }
}

/* ≥ 1440px: مساحة تنفّس مريحة */
@media (min-width:1440px){
  table.shz-wl{ font-size:14px; }
  table.shz-wl th, table.shz-wl td{ padding:10px 12px; }
}

/* -------------------------
   7) تعديلات صغيرة متّسقة
   ------------------------- */
.shz-wl-mini{ display:inline-flex; gap:6px; align-items:center; }
.shz-wl-mini .icon{ font-size:18px; }
.shz-wl-mini .count{ font-weight:700; }

/* إزالة أي هوامش صلبة قديمة كانت تسبب عدم اتساق */
.shz-wl-actions .button, .shz-wl-actions .btn{ margin-top:4px; }

/* توست/إشعارات الأزرار في المشاركة */
.shz-wl-sharebar{ font-size:13px; line-height:1.2; text-align:center; }

/* حدود ناعمة ثابتة */
.shz-wl-lists, .shz-wl-panel, .shz-wl-wrap{ border-color:var(--shz-border); }








/* ==========================================================
   SHZ — إصلاح عام: اسمح باللف داخل خلايا جدول الرغبات
   ضع هذا السطر قرب نهاية الملف قبل كتل الـ @media
   ========================================================== */
.shz-wl-wrap table.shz-wl th,
.shz-wl-wrap table.shz-wl td{
  white-space: normal !important;    /* اسمح بالأسطر المتعددة */
  overflow: visible !important;      /* لا تقطع المحتوى */
  text-overflow: initial !important; /* ألغِ … */
  word-break: break-word;            /* اكسر الكلمات الطويلة إن لزم */
  hyphens: auto;                     /* واصل الكلمات العربية/الإنجليزية */
}

/* ==========================================================
   1) الجوال فقط (≤600px) — استبدل الكتلة القديمة بهذه
   ========================================================== */
@media (max-width: 600px){

  /* محتوى الجدول أصغر قليلاً */
  .shz-wl-wrap table.shz-wl{
    font-size: 8px !important;
  }
  .shz-wl-wrap table.shz-wl th,
  .shz-wl-wrap table.shz-wl td{
    padding: 2px 2px !important;
  }

  /* عناوين المنتجات: لفّ طبيعي بدون قص */
  .shz-wl-title,
  .shz-wl-cell-title{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    line-height: 1.25 !important;
  }

  /* تنسيق السعر: واضح، قابل للّف، والسعر المخفض/الأساسي على سطرين */
  .shz-wl-cell-price .price{
    display: flex !important;
    flex-direction: column !important;  /* سطر فوق سطر */
    align-items: center !important;
    line-height: 1.25 !important;
    gap: 2px !important;
    white-space: normal !important;     /* مهم جداً لمنع القص */
  }
  /* السعر الحالي */
  .shz-wl-cell-price .price ins{
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1em !important;          /* يبقى مقروءاً مع 8px الأساسي */
    order: 0;
  }
  /* السعر القديم (إن وُجد) */
  .shz-wl-cell-price .price del{
    opacity: .75;
    font-size: .9em !important;
    order: 1;
  }
  /* وحدة/رمز العملة أصغر قليلاً */
  .shz-wl-cell-price .woocommerce-Price-currencySymbol{
    font-size: .85em !important;
    opacity: .9;
  }
  /* أيضاً اسمح للداخل باللف */
  .shz-wl-cell-price .amount,
  .shz-wl-cell-price .woocommerce-Price-amount,
  .shz-wl-cell-price bdi{
    white-space: normal !important;
    word-break: break-word !important;
  }

  
  /* الأزرار أصغر + بعرض كامل */
  .shz-wl-actions .button,
  .shz-wl-actions .btn{
    font-size: 7px !important;
    padding: 2px 2px !important;
    min-height: 20px !important;
    width: 100% !important;
    border-width: 2px !important;
    height: auto !important;             /* بدلاً من height:10px */

  }

/* فallback لو متصفح ما يدعم gap في flex */
  .shz-wl-actions > * + *{
    margin-top: 5px !important;
  }


  /* ترتيب صريح: إضافة بالأعلى، إزالة بالأسفل */
  .shz-wl-actions a[href*="add"],
  .shz-wl-actions .add_to_cart_button,
  .shz-wl-actions .btn--add{ order: 1 !important; }

  .shz-wl-actions a[href*="remove"],
  .shz-wl-actions button[name*="remove"],
  .shz-wl-actions .remove,
  .shz-wl-actions .btn--remove{ order: 2 !important; }
}

/* ==========================================================
   2) الكمبيوتر فقط (≥1024px) — يمكنك استبدال كتلتك بهذه
   تكبير "اسم المنتج" فقط + السماح باللف للعنوان
   ========================================================== */
@media (min-width: 1024px){
  .shz-wl-cell-title .shz-wl-title,
  .shz-wl-title{
    font-size: 1.2em !important;    /* أكبر من السابق */
    line-height: 1.35 !important;
    white-space: normal !important;  /* حتى لو كان هناك قواعد قديمة للقص */
    overflow: visible !important;
    text-overflow: initial !important;
  }
}










/* ==========================================================
   SHZ — إدارة الرغبات: زوايا مدوّرة + تصغير الكمية والخصوصية
   ضع هذا البلوك في "نهاية الملف"
   ========================================================== */

/* 1) تدوير زوايا جدول إدارة الرغبات */
.shz-wl-manage table.shz-wl{
  border: 1.5px solid var(--shz-border, #084F5D);
  border-radius: var(--shz-radius, 14px);
  overflow: hidden;                         /* لإظهار التدوير */
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff;
}
.shz-wl-manage table.shz-wl tbody tr:last-child td{ border-bottom:none !important; }
.shz-wl-manage table.shz-wl thead th:first-child{ border-top-right-radius: var(--shz-radius, 14px); }
.shz-wl-manage table.shz-wl thead th:last-child{  border-top-left-radius:  var(--shz-radius, 14px);  }

/* 2) الجوال فقط (≤600px) — تصغير حقول الكمية و"اختر/الخصوصية" */
@media (max-width: 600px){

  /* الكمية (نلتقط أشهر الأسماء) */
  .shz-wl-manage table.shz-wl td.shz-wl-cell-qty input,
  .shz-wl-manage table.shz-wl td .shz-wl-qty,
  .shz-wl-manage table.shz-wl td input.qty,
  .shz-wl-manage table.shz-wl td input[type="number"]{
    width: 30px !important;          /* أضيق */
    height: 20px !important;         /* أقل ارتفاعًا */
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  /* إخفاء أسهم أرقام المتصفح */
  .shz-wl-manage table.shz-wl td input[type="number"]::-webkit-outer-spin-button,
  .shz-wl-manage table.shz-wl td input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none !important; margin:0 !important;
  }
  .shz-wl-manage table.shz-wl td input[type="number"]{ -moz-appearance:textfield !important; }

  /* select الخصوصية/إلى القائمة — الكلاس الذي ذكرتَه */
  .shz-wl-manage table.shz-wl td.shz-wl-cell-move select.shz-wl-move-select,
  .shz-wl-manage table.shz-wl td select.shz-wl-move-select{
    min-width: 20px !important;
    max-width: 50px !important;
    width: auto !important;
    height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    box-sizing: border-box !important;
  }

}


/* === Select2 على shz-wl-move-select (داخل الميديا فقط) === */
@media (max-width: 600px){
  .shz-wl-manage select.shz-wl-move-select + .select2 .select2-selection--single{
    min-height: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
  }
  .shz-wl-manage select.shz-wl-move-select + .select2 .select2-selection__rendered{
    line-height: 24px !important;
    font-size: 11px !important;
    padding-inline: 8px !important;
  }
  .shz-wl-manage select.shz-wl-move-select + .select2 .select2-selection__arrow{
    height: 24px !important;
  }
}

/* === SHZ WL Gate (Login/Register prompt for guests) === */
:root{
  --shz-btn: #084F5D;
  --shz-border: #084F5D;
  --shz-muted: #F2DBAD;
  --shz-text: #084F5D;
  --shz-radius: 14px;
}

.shz-wl-gate{
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem;
}
.shz-wl-gate__card{
  border: 1px solid var(--shz-border);
  border-radius: var(--shz-radius);
  padding: 1.25rem;
  background: #fff;
  color: var(--shz-text);
}
.shz-wl-gate__title{
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  color: var(--shz-text);
}
.shz-wl-gate__text{
  margin: 0 0 1rem;
  line-height: 1.7;
}
.shz-wl-gate__benefits{
  margin:.25rem 0 0;
  padding-inline-start: 1.25rem;
}
.shz-wl-gate__benefits li{ margin: .25rem 0; }

/* أزرار البوابة: توسيط + حجم صغير + لون موحّد + ثابتة بدون تصغير/دوران */
.shz-wl-gate__actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:.5rem;
  margin:.75rem 0 1rem;
}
.shz-btn{
  display:inline-block;
  padding:.45rem .9rem;       /* حجم أصغر */
  font-size:.9rem;            /* حجم خط أصغر */
  border-radius:var(--shz-radius);
  border:2px solid var(--shz-btn);
  color:var(--shz-btn);
  background:transparent;
  text-decoration:none;
  font-weight:600;
  line-height:1;
  transition:none !important; /* منع أي انتقال */
  transform:none !important;  /* منع أي تحوّل (تصغير/دوران) */
}
.shz-btn:hover,
.shz-btn:focus{
  background:#f6f9fb;         /* تباين خفيف فقط */
  color:var(--shz-btn);
  border-color:var(--shz-btn);
  outline:none;
}
.shz-btn:active{
  transform:none !important;  /* ثابت عند الضغط */
  animation:none !important;
}



/* SHZ WL — Centered title for public wishlist page */
.shz-wl-page-title{
  text-align: center !important;
  font-size: 1.15rem;
  margin: 8px 0 16px;
  color: var(--shz-text);
}



.shz-wl--shazar .shz-wl-list-header{
  text-align:center; margin:10px 0 14px;
  color:var(--shz-text);
  font-weight:700;
}
.shz-wl--shazar .shz-wl-list-header .name{
  font-size:0.9rem; margin:0 6px;
}
.shz-wl--shazar .shz-wl-list-header .count{
  display:inline-block; margin-inline-start:6px;
  padding:2px 2px; font-size:.65rem; line-height:1.1;
 
}
.shz-wl--shazar .shz-wl-list-header .heart{
  margin-inline-start:5px; font-size:2rem;
}


/* === SHZ WL — Remove border from mini-copy beside list names === */
.shz-wl--shazar .shz-wl-lists .shz-wl-mini-copy{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  line-height:1 !important;
}


/* === SHZ WL — Manage: Sharebar vertical + centered (2025-10-09) === */
.shz-wl--shazar .shz-wl-sharebar{ text-align:center; }
.shz-wl--shazar .shz-wl-sharebar-row{
  display:flex; flex-direction:column; align-items:center; gap:5px;
}
.shz-wl--shazar .shz-wl-share-input{
  max-width:300px; width:100%; margin-inline:auto;
  text-align:center;
  min-height:8px;
   max-height:10px;
   border-radius:6px !important;
}
.shz-wl--shazar .shz-wl-sharebar-row .button,
.shz-wl--shazar .shz-wl-sharebar-row .shz-btn{
  min-height:15px !important; padding:4px 10px !important; font-size:12px !important;
  border-radius:8px !important;
   max-height:20px;
}

