/* ✅ تنسيق البطاقة */
.product-box a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.3s ease;
  height: 100%;
  background: transparent !important;
  box-shadow: none !important;
}
.product-box a.card:hover {
  transform: scale(1.02);
}

.product-box .card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1; /* مربع دائمًا */
  display: block;
  border-radius: 0.5rem 0.5rem;
}
#modalProductPrice del {
  color: #fff !important;
  opacity: .7;
}


.product-box .card-body {
  padding: 10px 5px 5px 5px;
  margin: 0;
  text-align: center;
  background: transparent !important;
}

.product-box .card-title {
  color: #005685;
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
  text-shadow: none;
}

.product-box .card-price {
  color: #005685;
  font-weight: bold;
  margin: 0.5rem 0;
}



.favorite-btn {
  font-size: 20px;
  color: #dc3545;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.favorite-btn:hover {
  transform: scale(1.2);
  color: #b51d1d;
}

.disabled-product {
    filter: grayscale(1);
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.disabled-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #888;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    z-index: 2;
}

/* ====== بطاقة المنتج ====== */
.product-box .card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0e0b12;
  filter: none !important;
}

.product-box .card .card-media {
  position: relative;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  filter: none !important;
}

/* الصورة رمادية */
.disabled-product .card-img-top,
.card-img-top.grayscale-img {
  filter: grayscale(1) brightness(.82);
}

/* طبقة تعتيم خفيفة */
.disabled-product .card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,0));
  z-index: 2;
  pointer-events: none;
}

/* ====== الشريط يبقى ملوّن ====== */
.corner-ribbon {
  position: absolute;
  top: 12px;
  right: -36px;
  transform: rotate(45deg);
  z-index: 10;
  pointer-events: none;
  filter: none !important;
  opacity: 1 !important;
  isolation: isolate;
}
.corner-ribbon > span {
  display: block;
  width: 150px;
  padding: 6px 0;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg,#ff2a86,#c4005d) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  border-radius: 2px;
  filter: none !important;
  opacity: 1 !important;
}

/* ====== الاسم والسعر للمعطّل ====== */
.disabled-product .card-title {
  color: #aaa !important;   /* رمادي أفتح */
}

.disabled-product .card-price {
  color: #bbb !important;   /* رمادي واضح للسعر */
  font-weight: 600;
}

/* ====== موبايل ====== */
@media (max-width: 420px){
  .corner-ribbon {
    top: 8px; 
    right: -22px;
  }
  .corner-ribbon > span {
    width: 100px;       /* عرض أصغر */
    font-size: 10px;    /* خط أصغر */
    padding: 4px 0;     /* سماكة أقل */
  }
}
@media (max-width: 576px){
  .corner-ribbon {
    top: 8px; 
    right: -22px;
  }
  .corner-ribbon > span {
    width: 100px;
    font-size: 10px;
    padding: 4px 0;
  }
}
