/* ===== JAM Cart – Minimal Clean, RTL, All fonts weight 200 ===== */

/* טעינת פונטים (דק ועדין) */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@200;400;700&family=Poppins:wght@200&display=swap');

/* הסתרת כותרת עמוד */
body.woocommerce-cart .entry-title,
body.woocommerce-cart .elementor-widget-theme-page-title,
body.woocommerce-cart .page-title,
body.woocommerce-cart h1.elementor-heading-title { display:none !important; }

/* עטיפה ראשית */
body.woocommerce-cart .jam-cart,
body.woocommerce-cart .jam-cart * { box-sizing: border-box; }

/* FIX: מניעת גלילה אופקית בעגלת הקניות בלבד */
body.woocommerce-cart,
body.woocommerce-cart html,
body.woocommerce-cart body { overflow-x: hidden; }

/* FIX: לכל ילדים בתוך העגלה – אל תכריחו מינימום רוחב */
body.woocommerce-cart .jam-cart,
body.woocommerce-cart .jam-cart * { min-width: 0; }

body.woocommerce-cart .jam-cart {
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --border-strong:#d1d5db;
  --row:#f1f5f9;
  --bg:#fff;

  background:var(--bg); color:var(--text);
  max-width:1140px; margin:0 auto; padding:0; direction:rtl;
  font-family:'Heebo','Poppins',system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  font-weight:200; letter-spacing:0;
  opacity:0; transform:translateY(8px); animation:jamFadeUp .35s ease-out forwards;

  /* FIX: אל תתן לעטיפה לדחוף את הדף לרוחב */
  overflow-x: clip;
}
@keyframes jamFadeUp { to { opacity:1; transform:translateY(0); } }

/* כותרות – דק */
body.woocommerce-cart .jam-cart h1,
body.woocommerce-cart .jam-cart h2,
body.woocommerce-cart .jam-cart h3,
body.woocommerce-cart .jam-cart .cart_totals h2 {
  font: 200 1rem/1.6 'Heebo','Poppins',system-ui;
  color:#111827; margin:0 0 12px;
}

/* ===== טבלה – מסגרת/רדיוס כמו Cart totals + קווי 1px ===== */
body.woocommerce-cart .jam-cart .shop_table{
  width:100%;
  table-layout:fixed;
  border-collapse:separate !important; border-spacing:0 !important;
  border:1px solid var(--border) !important; border-radius:14px;
  background:#fff !important;

  /* FIX: אם משהו רחב מדי – שיגלל בתוך הטבלה, לא כל הדף */
  display:block;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

/* איפוס בורדרים/שדואו מהתבנית */
body.woocommerce-cart .jam-cart .shop_table, 
body.woocommerce-cart .jam-cart .shop_table * { box-shadow:none !important; }
body.woocommerce-cart .jam-cart .shop_table td,
body.woocommerce-cart .jam-cart .shop_table th { border:0 !重要; }

/* יישור וגובה שורה */
body.woocommerce-cart .jam-cart thead th,
body.woocommerce-cart .jam-cart .cart_item > td{
  vertical-align:middle; text-align:right;
  padding:14px 12px !important; line-height:1.6;

  /* FIX: אל תגלוש מתוך התא גם אם שם מוצר ארוך */
  max-width:100%;
}

/* כותרות */
body.woocommerce-cart .jam-cart thead th{
  color:#111827; background:#fff !important; font-weight:200;
  border-bottom:1px solid var(--row) !important;
}

/* תאים */
body.woocommerce-cart .jam-cart .cart_item > td{
  background:#fff !important; border-bottom:1px solid var(--row) !important;
}

/* קווי הפרדה אנכיים דקים */
body.woocommerce-cart .jam-cart thead th + th{ border-left:1px solid var(--row) !important; }
body.woocommerce-cart .jam-cart tbody td + td{ border-left:1px solid var(--row) !important; }

/* בלי קו תחתון לשורה האחרונה */
body.woocommerce-cart .jam-cart tbody tr:last-child > td{ border-bottom:0 !important; }

/* ===== רוחבי עמודות (Desktop) ===== */
@media (min-width: 993px){
  body.woocommerce-cart .jam-cart th.product-remove,
  body.woocommerce-cart .jam-cart td.product-remove{ width:48px !important; }
  body.woocommerce-cart .jam-cart th.product-thumbnail,
  body.woocommerce-cart .jam-cart td.product-thumbnail{ width:92px !important; }

  body.woocommerce-cart .jam-cart th.product-price,
  body.woocommerce-cart .jam-cart td.product-price{ width:120px !important; text-align:right; }

  body.woocommerce-cart .jam-cart th.product-subtotal,
  body.woocommerce-cart .jam-cart td.product-subtotal{ width:140px !important; text-align:right; }

  /* Quantity רחבה כדי שלא ייחתך */
  body.woocommerce-cart .jam-cart th.product-quantity,
  body.woocommerce-cart .jam-cart td.product-quantity{
    width:220px !important; min-width:220px !important;
    white-space:nowrap !important; text-align:right;
  }

  /* Product מצומצם */
  body.woocommerce-cart .jam-cart th.product-name,
  body.woocommerce-cart .jam-cart td.product-name{
    width:30% !important; max-width:30% !important;
    white-space:normal !important; word-break:break-word !important;
    overflow-wrap: anywhere; /* FIX: שבירת שורה בטוחה */
  }
}

/* שורת פעולות (קופון/עדכון) */
body.woocommerce-cart .jam-cart .actions{
  background:#fff !important; border-top:1px solid var(--row) !important;
  padding:14px 12px !important;

  /* FIX: אם יש flex הורי – אל תגלוש */
  max-width:100%;
  overflow-x: clip;
}

/* תמונת מוצר */
body.woocommerce-cart .jam-cart .product-thumbnail img{
  width:78px; height:78px; object-fit:cover;
  border-radius:10px; border:1px solid var(--border);
  max-width:100%; /* FIX */
}

/* שם מוצר */
body.woocommerce-cart .jam-cart .product-name a{
  color:#0f172a !important; font-weight:200 !important; text-decoration:none;
  word-break: break-word; /* FIX */
}
body.woocommerce-cart .jam-cart .product-name a:hover{ text-decoration:underline; }

/* מחיר/ביניים */
body.woocommerce-cart .jam-cart .product-price,
body.woocommerce-cart .jam-cart .product-subtotal{ color:#111827; font-weight:200; }

/* הסרה – עדין */
body.woocommerce-cart .jam-cart a.remove{
  width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--border); border-radius:8px; color:#ef4444 !important;
  text-decoration:none !important; font-size:18px; line-height:1;
}
body.woocommerce-cart .jam-cart a.remove:hover{ background:#fff; filter:brightness(0.98); }
body.woocommerce-cart .jam-cart a.remove:focus{ outline:2px solid #dbeafe; outline-offset:2px; }

/* ===== כמות – קפסולה עדינה ===== */
:root{ --qty-h:28px; --qty-gap:6px; }

body.woocommerce-cart .jam-cart td.product-quantity{ white-space:nowrap !important; }

body.woocommerce-cart .jam-cart td.product-quantity .jam-qty{
  display:inline-flex !important; align-items:center !important;
  gap:var(--qty-gap) !important; padding:3px 8px !important;
  border:1px solid var(--border-strong) !important; background:#fff !important;
  border-radius:9999px !important; width:auto !important; max-width:100% !important;
  box-shadow:none !important;
}

/* קלט הכמות – בלי מסגרת פנימית */
body.woocommerce-cart .jam-cart td.product-quantity .jam-qty input.qty,
body.woocommerce-cart .jam-cart td.product-quantity .quantity input.qty{
  width:46px !important; height:var(--qty-h) !important;
  line-height:var(--qty-h) !important; font-size:13px !important; font-weight:200 !important;
  border:0 !important; border-radius:0 !important;
  text-align:center; padding:0 !important; background:transparent !important; color:#111827 !important;
  box-shadow:none !important; outline:none !important;
}

/* כפתורי +/− – טקסט בלבד */
body.woocommerce-cart .jam-cart td.product-quantity .jam-qty .jam-btn{
  height:var(--qty-h) !important;
  min-width:24px !important;
  padding:0 6px !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  color:#111827 !important;
  font-size:14px !important; line-height:var(--qty-h) !important; font-weight:200 !important;
  box-shadow:none !important; cursor:pointer;
}
body.woocommerce-cart .jam-cart td.product-quantity .jam-qty .jam-btn:hover{ opacity:.85; }

/* מסתיר כפתורי תבנית ברירת־מחדל אם קיימים */
body.woocommerce-cart td.product-quantity .qty_button,
body.woocommerce-cart td.product-quantity .plus,
body.woocommerce-cart td.product-quantity .minus{ display:none !important; }

/* מנטרל ספינרים */
body.woocommerce-cart .jam-cart input[type=number]::-webkit-outer-spin-button,
body.woocommerce-cart .jam-cart input[type=number]::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
body.woocommerce-cart .jam-cart input[type=number]{ -moz-appearance:textfield; }

/* ===== אזור פעולות/קופון ===== */
body.woocommerce-cart .jam-cart .coupon{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap; background:#fff; padding:0; border:0;
  max-width:100%; /* FIX */
}
body.woocommerce-cart .jam-cart .coupon .input-text{
  height:40px; padding:0 12px; border:1px solid var(--border-strong); background:#fff; color:#111827; border-radius:9999px; min-width:240px;
  font-weight:200;
}

/* ===== כפתורים ראשיים ===== */
body.woocommerce-cart .jam-cart .button,
body.woocommerce-cart .jam-cart button.button,
body.woocommerce-cart .jam-cart .wc-proceed-to-checkout .checkout-button{
  background:#fff !important; color:#111827 !important;
  border:1px solid var(--border-strong) !important; border-radius:9999px; padding:10px 20px;
  font-family:'Heebo','Poppins',system-ui; font-weight:200; letter-spacing:0;
  cursor:pointer; transition:background-color .2s ease, border-color .2s ease, transform .06s ease;
  max-width:100%; /* FIX */
}
body.woocommerce-cart .jam-cart .button:hover,
body.woocommerce-cart .jam-cart .wc-proceed-to-checkout .checkout-button:hover{
  background:#f9fafb !important; border-color:#cbd5e1 !important;
}
body.woocommerce-cart .jam-cart .button:active,
body.woocommerce-cart .jam-cart .wc-proceed-to-checkout .checkout-button:active{ transform:translateY(1px); }
body.woocommerce-cart .jam-cart .button:disabled{ opacity:.45; cursor:not-allowed; }

/* ===== Cart totals – RTL מלא + מניעת גלישה ===== */
body.woocommerce-cart .jam-cart .cart_totals{
  direction:rtl; background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:18px; margin-top:22px;
  max-width:100%;           /* FIX */
  overflow-x: clip;         /* FIX */
}
body.woocommerce-cart .jam-cart .cart_totals .shop_table{
  width:100%; border-collapse:separate !important; border-spacing:0 !important;
  display:block;            /* FIX */
  overflow-x:auto;          /* FIX */
}
body.woocommerce-cart .jam-cart .cart_totals .shop_table th,
body.woocommerce-cart .jam-cart .cart_totals .shop_table td{
  text-align:right; background:#fff !important;
  border-bottom:1px solid var(--row) !important; padding:10px 12px; font-weight:200;
  max-width:100%;           /* FIX */
}
body.woocommerce-cart .jam-cart .cart_totals .shop_table tr:last-child th,
body.woocommerce-cart .jam-cart .cart_totals .shop_table tr:last-child td{ border-bottom:0 !important; }

/* ===== מובייל ===== */
@media (max-width: 992px){
  body.woocommerce-cart .jam-cart thead{ display:none !important; }
  
  body.woocommerce-cart .jam-cart .cart_item{
    display:grid !important;
    grid-template-columns:110px 1fr !important;
    grid-template-rows:auto !important;
    gap:14px !important;
    padding:16px 2% !important;
    background:#fff !important;
    border-bottom:1px solid var(--row) !important;
    direction:ltr !important;
    align-items:start !important;
    max-width:100%;         /* FIX */
  }
  
  /* FIX: כל האייטמים בעמודה הימנית לא ידחפו את הגריד */
  body.woocommerce-cart .jam-cart .cart_item .product-name,
  body.woocommerce-cart .jam-cart .cart_item .product-price,
  body.woocommerce-cart .jam-cart .cart_item .product-quantity,
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal,
  body.woocommerce-cart .jam-cart .cart_item .product-remove{
    min-width: 0;           /* חשוב ב-grid/flex */
    overflow: hidden;       /* חתוך עודפים */
    text-overflow: ellipsis;
  }

  body.woocommerce-cart .jam-cart .cart_item .product-thumbnail{
    grid-column:1 !important;
    grid-row:1 / span 6 !important;
    display:block !important;
    align-self:stretch !important;
  }
  
  body.woocommerce-cart .jam-cart .product-thumbnail img{
    width:100% !important;
    height:140px !important;
    object-fit:cover !important;
    border-radius:10px !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item .product-name{
    grid-column:2 !important;
    grid-row:1 !important;
    direction:ltr !important;
    text-align:left !important;
    padding:0 2% !important;
    max-width:100% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item .product-price{
    grid-column:2 !important;
    grid-row:2 !important;
    direction:ltr !important;
    text-align:left !important;
    padding:0 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item .product-quantity{
    grid-column:2 !important;
    grid-row:3 !important;
    direction:ltr !important;
    text-align:left !important;
    padding:0 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal{
    grid-column:2 !important;
    grid-row:4 !important;
    direction:ltr !important;
    text-align:left !important;
    padding:0 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item .product-remove{
    grid-column:2 !important;
    grid-row:5 !important;
    text-align:left !important;
    direction:ltr !important;
    padding:0 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item > td{
    padding:4px 0 !important;
    border:0 !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_item td[data-title]:before{
    content:attr(data-title) ": " !important;
    font-weight:400 !important;
    margin-left:8px !important;
    direction:ltr !important;
  }
  
  body.woocommerce-cart .jam-cart td.product-quantity .jam-qty{
    direction:ltr !important;
    padding:2% !important;
    max-width:150px !important;
    width:fit-content !important;
  }
  
  body.woocommerce-cart .jam-cart td.product-quantity .jam-qty input.qty,
  body.woocommerce-cart .jam-cart td.product-quantity .quantity input.qty{
    width:36px !important;
  }
  
  body.woocommerce-cart .jam-cart .actions{
    grid-column:1 / -1 !important;
    direction:ltr !important;
    padding:14px 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .coupon{
    flex-direction:column !important;
    align-items:stretch !important;
  }
  
  body.woocommerce-cart .jam-cart .coupon .input-text{
    min-width:100% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_totals{
    direction:ltr !important;
    padding:18px 2% !important;
  }
  
  body.woocommerce-cart .jam-cart .cart_totals .shop_table th,
  body.woocommerce-cart .jam-cart .cart_totals .shop_table td{
    text-align:left !important;
  }
}




/* =========================
   CART PATCH – mobile + borders + bidi
   הדבקה בסוף הקובץ
   ========================= */

/* 0) אחידות מסגרות: כולם 1px */
body.woocommerce-cart .jam-cart .shop_table{
  border:1px solid var(--border) !important;
  border-radius:14px !important;
}
body.woocommerce-cart .jam-cart thead th{
  border-bottom:1px solid var(--border) !important;
}
body.woocommerce-cart .jam-cart .cart_item > td{
  border-bottom:1px solid var(--border) !important;
}
body.woocommerce-cart .jam-cart thead th + th,
body.woocommerce-cart .jam-cart tbody td + td{
  border-inline-start:1px solid var(--border) !important;
}
/* שורת פעולות/פוטר טבלה */
body.woocommerce-cart .jam-cart .actions{
  border-top:1px solid var(--border) !important;
}
/* למנוע קפיצות צבע: */
body.woocommerce-cart .jam-cart .shop_table,
body.woocommerce-cart .jam-cart .shop_table *{
  border-color:var(--border) !important;
}

/* 1) העלמת שלוש הנקודות ליד התמונה */
body.woocommerce-cart .jam-cart .product-thumbnail::before{
  content:none !important;
  display:none !important;
}

/* 2) מובייל – כיווניות חכמה + תוויות מעל הערך בלי נקודתיים */
@media (max-width: 992px){

  /* בסיס RTL לתאים במובייל */
  body.woocommerce-cart .jam-cart .cart_item{
    direction: rtl !important;
    text-align: right !important;
  }
  body.woocommerce-cart .jam-cart .cart_item .product-name,
  body.woocommerce-cart .jam-cart .cart_item .product-price,
  body.woocommerce-cart .jam-cart .cart_item .product-quantity,
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal,
  body.woocommerce-cart .jam-cart .cart_item .product-remove{
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important; /* עברית RTL, אנגלית LTR אוטומטי */
  }
  body.woocommerce-cart .jam-cart .cart_item .product-name a{
    unicode-bidi: isolate; /* שומר סימני פיסוק בקישור */
  }

  /* תוויות מובייל של WooCommerce – בלי נקודתיים, בשורה נפרדת */
  .woocommerce table.shop_table_responsive tr td::before,
  .woocommerce-page table.shop_table_responsive tr td::before,
  body.woocommerce-cart .jam-cart .cart_item td[data-title]::before{
    content: attr(data-title) !important;  /* בלי ':' */
    display:block !important;              /* מעל הערך – לא חופף */
    margin:0 0 6px 0 !important;
    font-weight:400 !important;
    color:#111827 !important;
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
    float:none !important;                 /* מניעת דחיסה לצד */
  }

  /* מספרים/מחיר – שלא יעלו על הכותרת */
  body.woocommerce-cart .jam-cart .cart_item > td{
    padding-top: 2px !important;
  }

  /* אחידות מסגרות גם במצב ה-grid של המובייל */
  body.woocommerce-cart .jam-cart .cart_item{
    border-bottom:1px solid var(--border) !important;
  }
  body.woocommerce-cart .jam-cart .product-thumbnail{
    border-inline-start:1px solid transparent !important; /* מונע כפילות קווים בגריד */
  }
}

/* 3) RTL כללי לאזורי סיכום/קופון במובייל, בלי נקודתיים */
@media (max-width: 992px){
  body.woocommerce-cart .jam-cart .actions,
  body.woocommerce-cart .jam-cart .coupon,
  body.woocommerce-cart .jam-cart .cart_totals{
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
  }
  /* טבלת totals – קו דק 1px */
  body.woocommerce-cart .jam-cart .cart_totals{
    border:1px solid var(--border) !important;
  }
  body.woocommerce-cart .jam-cart .cart_totals .shop_table th,
  body.woocommerce-cart .jam-cart .cart_totals .shop_table td{
    text-align:right !important;
    border-bottom:1px solid var(--border) !important;
  }
  body.woocommerce-cart .jam-cart .cart_totals .shop_table tr:last-child th,
  body.woocommerce-cart .jam-cart .cart_totals .shop_table tr:last-child td{
    border-bottom:0 !important;
  }
}

/* ===== רווח שווה מלמטה לכל שורה בעגלת הקניות במובייל ===== */
@media (max-width: 992px) {
  body.woocommerce-cart .jam-cart .cart_item .product-name,
  body.woocommerce-cart .jam-cart .cart_item .product-price,
  body.woocommerce-cart .jam-cart .cart_item .product-quantity,
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal {
    margin-bottom: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  /* הסתרת הרווח / קו מיותר מתחת למוצר האחרון במובייל */
  body.woocommerce-cart .jam-cart .cart_item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* הסתרת פס/תמונה מיותרת מתחת לטבלה במובייל */
  body.woocommerce-cart .jam-cart .woocommerce-cart-form::after {
    display: none !important;
    content: none !important;
  }

  /* הסתרת כל תוכן "ריק" שמגיע אחרי שורת המוצר במובייל */
  body.woocommerce-cart .jam-cart .cart_item td:empty {
    display: none !important;
  }

  /* לוודא שכל אלמנט ריק או שורה מיותרת אחרי הכמות לא מוצגים */
  body.woocommerce-cart .jam-cart .cart_item + tr {
    display: table-row !important;
  }
}
/* ===== Cart: הסרת הקו המיותר במובייל בלבד ===== */
@media (max-width: 992px) {
  /* 1) מבטלים קו תחתון גלובלי על השורה והתאים */
  body.woocommerce-cart .jam-cart .shop_table tr,
  body.woocommerce-cart .jam-cart .shop_table tr::after,
  body.woocommerce-cart .jam-cart .shop_table td {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  /* 2) משאירים קווים רק מתחת לסקשנים הרצויים (שם/מחיר/כמות/סכום ביניים) */
  body.woocommerce-cart .jam-cart .cart_item .product-name,
  body.woocommerce-cart .jam-cart .cart_item .product-price,
  body.woocommerce-cart .jam-cart .cart_item .product-quantity,
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal {
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
  }

  /* 3) אין קו אחרי האחרון – שלא יופיע פס בתחתית הכרטיס */
  body.woocommerce-cart .jam-cart .cart_item .product-subtotal,
  body.woocommerce-cart .jam-cart .cart_item .product-remove,
  body.woocommerce-cart .jam-cart .cart_item > td:last-of-type {
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* 4) למקרה שקיים hr/פס עיצובי מתבנית – מסתירים במובייל */
  body.woocommerce-cart .jam-cart hr,
  body.woocommerce-cart .jam-cart .woocommerce-cart-form::after,
  body.woocommerce-cart .jam-cart .shop_table::after {
    display: none !important;
    content: none !important;
  }
}
