/* Product card A — صورة كبيرة متناسقة + سعر/زر بلا تداخل */
/* يغلب قواعد company.css / home-page.css للشبكة الرئيسية */

body.cmp .product-card.product-card--a,
body.cmp .home-products-grid .product-card.product-card--a,
body.cmp .hh-prod-rail .product-card.product-card--a,
body.cmp .store-page .product-grid .product-card.product-card--a,
body.cmp .category-product-carousel .product-card.product-card--a,
body.cmp .category-product-carousel .swiper-slide .product-card.product-card--a,
body.cmp .hh-store-grid .product-card.product-card--a{
  width:100%!important;max-width:none!important;flex:none!important;height:100%!important;
  margin:0!important;padding:0!important;
  display:flex!important;flex-direction:column!important;
  background:#fff!important;
  border:1.5px solid #CBD5E1!important;border-radius:16px!important;
  box-shadow:0 6px 16px rgba(15,23,42,.05)!important;
  overflow:hidden!important;direction:rtl!important;text-align:start!important;
  transform:none!important
}
body.cmp .product-card.product-card--a:hover,
body.cmp .home-products-grid .product-card.product-card--a:hover{
  border-color:#94A3B8!important;
  box-shadow:0 10px 22px rgba(15,23,42,.09)!important;
  transform:none!important
}
body.cmp .product-card.product-card--a.is-unavailable{opacity:.78}

/* —— صورة كبيرة تملأ أعلى البطاقة —— */
body.cmp .product-card--a .product-image-link,
body.cmp .home-products-grid .product-card--a .product-image-link,
body.cmp .hh-prod-rail .product-card--a .product-image-link{
  display:block!important;flex:0 0 auto!important;text-decoration:none!important;color:inherit!important;
  margin:0!important;padding:0!important
}

body.cmp .product-card--a .image-container,
body.cmp .home-products-grid .product-card--a .image-container,
body.cmp .hh-prod-rail .product-card--a .image-container,
body.cmp .category-product-carousel .product-card--a .image-container,
body.cmp .store-page .product-grid .product-card--a .image-container{
  position:relative!important;
  margin:0!important;padding:0!important;
  width:100%!important;height:auto!important;min-height:0!important;
  aspect-ratio:1 / 1!important;
  border:0!important;border-radius:0!important;border-bottom:1px solid #E2E8F0!important;
  background:#F8FAFC!important;
  display:block!important;overflow:hidden!important;
  align-items:stretch!important;justify-content:stretch!important
}

body.cmp .product-card--a .main-product-image,
body.cmp .home-products-grid .product-card--a .main-product-image,
body.cmp .hh-prod-rail .product-card--a .main-product-image,
body.cmp .category-product-carousel .product-card--a .main-product-image{
  width:100%!important;height:100%!important;
  max-width:none!important;max-height:none!important;
  object-fit:contain!important;object-position:center!important;
  display:block!important;border-radius:0!important;
  padding:6px!important;box-sizing:border-box!important;
  transform:none!important
}

body.cmp .product-card--a .product-image-ph{
  width:100%;height:100%;min-height:140px;
  display:grid;place-items:center;color:#94A3B8;background:#F1F5F9
}

/* شارات مستطيلة: خصم / عرض أعلى · التوفر أسفل */
body.cmp .product-card--a .pc-sale{
  position:absolute;z-index:4;top:0;inset-inline-start:0;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;padding:6px 9px;
  border-radius:0;
  border-end-end-radius:8px;
  background:#E11D2E;color:#fff;
  font-size:11px;font-weight:900;line-height:1;
  box-shadow:0 2px 8px rgba(225,29,46,.22);
  pointer-events:none
}

body.cmp .product-card--a .pc-promo{
  position:absolute;z-index:4;top:0;inset-inline-end:0;
  display:inline-flex;align-items:center;max-width:48%;
  padding:6px 10px;
  border-radius:0;
  border-end-start-radius:8px;
  background:var(--pc-promo,#0F172A);color:#fff;
  font-size:11px;font-weight:800;line-height:1.15;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  box-shadow:0 2px 8px rgba(15,23,42,.14);
  text-shadow:0 1px 1px rgba(0,0,0,.25);
  pointer-events:none
}
body.cmp .product-card--a .pc-promo--new{background:#1D4ED8;color:#fff}

body.cmp .product-card--a .pc-stock{
  position:absolute;z-index:4;bottom:0;inset-inline-start:0;
  display:inline-flex;align-items:center;justify-content:center;
  padding:5px 10px;
  border-radius:0;
  border-start-end-radius:8px;
  font-size:11px;font-weight:800;line-height:1.15;
  color:#fff;border:0;
  box-shadow:0 2px 8px rgba(15,23,42,.12);
  pointer-events:none
}
body.cmp .product-card--a .pc-stock::before{display:none!important;content:none!important}
body.cmp .product-card--a .pc-stock--ok{background:#15803D;color:#fff}
body.cmp .product-card--a .pc-stock--off{background:#DC2626;color:#fff}
body.cmp .pc-added-lock,
body.pc-added-lock{overflow:hidden}

body.cmp .product-card--a .pc-badges,
body.cmp .product-card--a .pc-pill{display:none!important}
body.cmp .product-card--a .badge-promo,
body.cmp .product-card--a .badge-promo--float,
body.cmp .product-card--a .badge-stock,
body.cmp .product-card--a .badge-stock--img,
body.cmp .product-card--a .badge-soon{display:none!important}

/* نافذة تأكيد الإضافة للسلة */
.pc-added{
  position:fixed;inset:0;z-index:240;
  display:flex;align-items:center;justify-content:center;
  padding:18px;opacity:0;pointer-events:none;
  transition:opacity .2s ease
}
.pc-added.is-on{opacity:1;pointer-events:auto}
.pc-added-bg{
  position:absolute;inset:0;background:rgba(15,23,42,.48);
  backdrop-filter:blur(2px)
}
.pc-added-card{
  position:relative;z-index:1;width:min(360px,100%);
  background:#fff;border:1.5px solid #CBD5E1;border-radius:20px;
  padding:26px 20px 18px;text-align:center;
  box-shadow:0 24px 48px rgba(15,23,42,.22);
  transform:translateY(14px) scale(.96);
  transition:transform .28s cubic-bezier(.2,.85,.2,1)
}
.pc-added.is-on .pc-added-card{transform:none}
.pc-added-tick{
  width:64px;height:64px;margin:0 auto 14px;border-radius:50%;
  background:linear-gradient(145deg,#22C55E,#15803D);
  display:grid;place-items:center;
  box-shadow:0 10px 24px rgba(21,128,61,.28);
  animation:pcAddedPop .45s cubic-bezier(.2,.85,.2,1) both
}
.pc-added-tick svg{width:30px;height:30px;stroke:#fff;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.pc-added-tick svg path{stroke-dasharray:36;stroke-dashoffset:36;animation:pcAddedDraw .35s .18s ease forwards}
.pc-added h3{
  margin:0 0 6px;font:800 18px/1.3 Cairo,sans-serif;color:#0F172A
}
.pc-added p{
  margin:0;font:600 13.5px/1.5 Cairo,sans-serif;color:#64748B;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.pc-added-actions{
  display:flex;gap:8px;margin-top:16px
}
.pc-added-actions a,
.pc-added-actions button{
  flex:1;min-height:46px;border-radius:12px;border:0;
  font:800 13.5px Cairo,sans-serif;cursor:pointer;text-decoration:none;
  display:inline-flex;align-items:center;justify-content:center
}
.pc-added-go{background:#E11D2E;color:#fff}
.pc-added-go:hover{background:#C3101F;color:#fff}
.pc-added-keep{background:#F1F5F9;color:#0F172A;border:1px solid #E2E8F0!important}
.pc-added-keep:hover{background:#E2E8F0}
@keyframes pcAddedPop{from{transform:scale(.6);opacity:.4}to{transform:none;opacity:1}}
@keyframes pcAddedDraw{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){
  .pc-added,.pc-added-card,.pc-added-tick,.pc-added-tick svg path{animation:none!important;transition:none!important}
  .pc-added.is-on .pc-added-card{transform:none}
}

/* —— جسم مضغوط تحت الصورة —— */
body.cmp .product-card--a .product-info,
body.cmp .home-products-grid .product-card--a .product-info,
body.cmp .hh-prod-rail .product-card--a .product-info,
body.cmp .category-product-carousel .swiper-slide .product-card--a .product-info{
  display:flex!important;flex-direction:column!important;gap:8px!important;
  padding:10px 11px 11px!important;margin:0!important;
  flex:1 1 auto!important;min-width:0!important;min-height:0!important;
  position:relative!important;background:#fff!important
}

body.cmp .product-card--a .product-title,
body.cmp .home-products-grid .product-card--a .product-title,
body.cmp .hh-prod-rail .product-card--a .product-title,
body.cmp .category-product-carousel .swiper-slide .product-card--a .product-title{
  margin:0!important;padding:0!important;
  min-height:0!important;max-height:none!important;
  font-size:12.5px!important;font-weight:800!important;line-height:1.35!important;
  color:#0F172A!important;text-align:start!important;
  display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;
  overflow:hidden!important;text-overflow:ellipsis!important
}
body.cmp .product-card--a .product-title a{
  color:inherit!important;text-decoration:none!important
}
body.cmp .product-card--a .product-title a:hover{color:#E11D2E!important}

/* صف السعر + الزر — flex عادي، الزر أيقونة فقط */
body.cmp .product-card--a .pc-foot{
  display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:space-between!important;
  gap:10px!important;width:100%!important;min-width:0!important;
  margin-top:auto!important;direction:rtl!important;position:relative!important
}

body.cmp .product-card--a .price-container,
body.cmp .home-products-grid .product-card--a .price-container,
body.cmp .hh-prod-rail .product-card--a .price-container,
body.cmp .category-product-carousel .swiper-slide .product-card--a .price-container{
  display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
  align-items:flex-start!important;justify-content:center!important;gap:2px!important;
  margin:0!important;padding:0!important;width:auto!important;max-width:none!important;
  min-width:0!important;flex:1 1 auto!important;min-height:0!important;
  background:transparent!important;border-radius:0!important;height:auto!important;
  overflow:visible!important;direction:rtl!important;position:static!important
}

body.cmp .product-card--a .current-price,
body.cmp .home-products-grid .product-card--a .current-price,
body.cmp .hh-prod-rail .product-card--a .current-price,
body.cmp .category-product-carousel .swiper-slide .product-card--a .current-price{
  display:inline-flex!important;flex-direction:row!important;align-items:baseline!important;
  gap:4px!important;order:0!important;margin:0!important;
  color:#E11D2E!important;font-size:18px!important;font-weight:900!important;
  line-height:1.15!important;white-space:nowrap!important;
  direction:rtl!important;unicode-bidi:isolate!important;
  position:static!important;font-variant-numeric:tabular-nums
}
body.cmp .product-card--a .current-price .hh-amt,
body.cmp .home-products-grid .product-card--a .hh-amt{
  color:inherit!important;font:inherit!important;font-weight:900!important;
  visibility:visible!important;opacity:1!important;
  direction:ltr!important;unicode-bidi:isolate!important
}
body.cmp .product-card--a .old-price,
body.cmp .home-products-grid .product-card--a .old-price{
  display:inline-flex!important;align-items:baseline!important;gap:2px!important;
  margin:0!important;color:#94A3B8!important;font-size:11.5px!important;font-weight:700!important;
  line-height:1.1!important;text-decoration:line-through!important;white-space:nowrap!important;
  direction:rtl!important;order:1!important;position:static!important
}
body.cmp .product-card--a .hh-cur{font-size:.72em!important;font-weight:800!important;margin-inline-start:2px}
body.cmp .product-card--a .badge-wholesale{
  display:inline-flex;padding:2px 6px;border-radius:6px;
  background:#DBEAFE;color:#1D4ED8;font-size:10px;font-weight:800
}

/* كسر width:100% من company.css على النموذج والزر */
body.cmp .product-card--a .card-add-form,
body.cmp .home-products-grid .product-card--a .card-add-form,
body.cmp .hh-prod-rail .product-card--a .card-add-form,
body.cmp .product-card--a .product-info > .card-add-btn,
body.cmp .home-products-grid .product-card--a .product-info > .card-add-btn,
body.cmp .hh-prod-rail .product-card--a .product-info > .card-add-btn{
  margin:0!important;padding:0!important;width:auto!important;max-width:none!important;
  flex:0 0 auto!important;position:static!important;inset:auto!important;
  display:block!important
}

body.cmp .product-card--a .card-add-btn.card-add-btn--icon,
body.cmp .product-card--a a.card-add-btn.card-add-btn--icon,
body.cmp .home-products-grid .product-card--a .card-add-btn.card-add-btn--icon,
body.cmp .home-products-grid .product-card--a a.card-add-btn.card-add-btn--icon,
body.cmp .hh-prod-rail .product-card--a .card-add-btn.card-add-btn--icon,
body.cmp .hh-prod-rail .product-card--a a.card-add-btn.card-add-btn--icon,
body.cmp .category-product-carousel .product-card--a .card-add-btn.card-add-btn--icon{
  width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;
  max-width:38px!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:11px!important;
  background:#E11D2E!important;color:#fff!important;
  display:grid!important;place-items:center!important;
  box-shadow:0 2px 8px rgba(225,29,46,.2)!important;
  text-decoration:none!important;position:static!important;inset:auto!important;
  flex-shrink:0!important;gap:0!important;font-size:0!important;line-height:0!important
}
body.cmp .product-card--a .card-add-btn.card-add-btn--icon:hover,
body.cmp .home-products-grid .product-card--a .card-add-btn.card-add-btn--icon:hover{
  background:#C3101F!important;color:#fff!important;filter:none!important
}
body.cmp .product-card--a .card-add-btn-muted{
  background:#F1F5F9!important;color:#64748B!important;border:1px solid #E2E8F0!important;box-shadow:none!important
}

/* إخفاء ورقة قديمة إن وُجدت */
body.cmp .product-card--a .pc-sheet{display:none!important}

@media (max-width:800px){
  body.cmp .product-card--a .product-info,
  body.cmp .home-products-grid .product-card--a .product-info{
    padding:9px 10px 10px!important;gap:7px!important
  }
  body.cmp .product-card--a .product-title{font-size:12px!important}
  body.cmp .product-card--a .current-price,
  body.cmp .home-products-grid .product-card--a .current-price{font-size:17px!important}
  body.cmp .product-card--a .main-product-image,
  body.cmp .home-products-grid .product-card--a .main-product-image{padding:4px!important}
  body.cmp .product-card--a .card-add-btn.card-add-btn--icon,
  body.cmp .home-products-grid .product-card--a .card-add-btn.card-add-btn--icon{
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;max-width:36px!important;border-radius:10px!important
  }
}
