/* ===================== Products ===================== */
.products-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:20px;
}

@media (max-width: 768px) {
  .products-grid{
    grid-template-columns:repeat(2,1fr);
    gap:12px;
  }
  
  .product-card{
    padding:12px !important;
  }
  
  .product-name{
    font-size:11px !important;
    height:32px !important;
    margin-bottom:2px !important;
    line-height:1.3 !important;
  }
  
  .price-row{
    margin-top:0px !important;
  }
  
  .add-cart{
    padding:10px 0 !important;
    font-size:13px !important;
  }
  
  .product-rating{
    margin-top:0px !important;
    margin-bottom:0px !important;
  }
  
  .product-img{
    padding:3px !important;
  }
  
  .product-card > div:first-of-type{
    padding:3px !important;
  }
}

.product-card{
  background:linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius:24px;
  padding:16px;
  box-shadow:0 4px 20px rgba(138, 0, 74, 0.08),
             0 2px 8px rgba(0,0,0,0.04);
  position:relative;
  transition:all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  overflow:hidden;
  border:1px solid rgba(233, 30, 99, 0.05);
  display: flex;
  flex-direction: column;
}

.product-card.out-of-stock{
  opacity:0.7;
  filter:grayscale(100%);
}

.product-card.out-of-stock::after{
  content:'الكمية منتهية';
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  background:rgba(0,0,0,0.8);
  color:white;
  padding:12px 24px;
  border-radius:12px;
  font-weight:700;
  font-size:16px;
  z-index:100;
  white-space:nowrap;
}

.product-card::before{
  content:'';
  position:absolute;
  top:-50%;
  right:-50%;
  width:200%;
  height:200%;
  background:radial-gradient(circle, rgba(233, 30, 99, 0.05) 0%, transparent 70%);
  opacity:0;
  transition:opacity 0.4s ease;
}

.product-card:hover::before{
  opacity:1;
}

.product-card:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:0 12px 40px rgba(138, 0, 74, 0.15),
             0 4px 16px rgba(233, 30, 99, 0.1);
  border-color:rgba(233, 30, 99, 0.2);
}

.product-img{
  width:100%;
  height:200px;
  object-fit:cover;
  margin-bottom:0;
  border-radius:0;
  transition:transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background:linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding:4px;
  display:block;
  box-sizing:border-box;
}

.product-card:hover .product-img{
  transform:scale(1.05) rotate(1deg);
}

.discount-label{
  position:absolute;
  top:10px;
  right:10px;
  background:linear-gradient(135deg, #E91E63 0%, #c2185b 100%);
  color:#fff;
  display:inline-block;
  padding:5px 12px;
  font-size:12px;
  border-radius:20px;
  margin-bottom:6px;
  font-weight:700;
  box-shadow:0 4px 12px rgba(233, 30, 99, 0.3);
  position:relative;
  overflow:hidden;
  z-index: 10;
}

.discount-label::before{
  content:'';
  position:absolute;
  top:0;
  left:-100%;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition:left 0.5s;
}

.product-card:hover .discount-label::before{
  left:100%;
}

.product-name{
  font-size:14px;
  font-weight:700;
  color:#2c3e50;
  height:40px;
  overflow:hidden;
  margin-bottom:4px;
  line-height:1.4;
  transition:color 0.3s ease;
}

.product-card:hover .product-name{
  color:#8a004a;
}

.price-box{
  margin-top:6px;
  margin-bottom: 8px;
}

.price-final{
  font-size:18px;
  font-weight:800;
  color:#d60000;
}

.price-original{
  font-size:13px;
  text-decoration:line-through;
  color:#999;
  margin-bottom:6px;
}

.old-price{
  font-size:13px;
  color:#999;
  text-decoration:line-through;
  margin-bottom:3px;
}

.new-price{
  font-size:17px;
  font-weight:bold;
  color:#d00055;
}

.add-cart{
  background:linear-gradient(135deg, #E91E63 0%, #c2185b 100%);
  color:#fff;
  border:none;
  width:100%;
  margin-top: auto;
  padding:12px 0;
  border-radius:14px;
  font-size:15px;
  cursor:pointer;
  font-weight:700;
  box-shadow:0 4px 16px rgba(233, 30, 99, 0.35);
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.add-cart span{
  display:inline-block;
  line-height:1;
}

.add-cart span:first-child{
  font-size:18px;
}

.add-cart::before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:0;
  height:0;
  border-radius:50%;
  background:rgba(255,255,255,0.2);
  transform:translate(-50%, -50%);
  transition:width 0.6s, height 0.6s;
}

.add-cart:hover::before{
  width:300px;
  height:300px;
}

.add-cart:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 28px rgba(233, 30, 99, 0.5);
}

.add-cart:active{
  transform:translateY(0);
}

.add-cart.loading{
  pointer-events:none;
  opacity:0.85;
}

.add-cart.loading::after{
  content:'';
  width:18px;
  height:18px;
  border:2.5px solid rgba(255,255,255,0.3);
  border-top-color:#fff;
  border-radius:50%;
  animation:spin 0.8s linear infinite;
  display:inline-block;
  position:absolute;
}

.add-cart.added {
  background:#8a004a !important;
  color:white !important;
  transform:scale(1.05);
  transition:0.2s;
}

#productAddBtn {
  background: linear-gradient(135deg, #E91E63 0%, #c2185b 100%);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 32px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

#productAddBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(233, 30, 99, 0.5);
}

#productAddBtn.added {
  background: linear-gradient(135deg, #8a004a 0%, #6a0038 100%) !important;
  color: white !important;
}

#productAddBtn.loading {
  pointer-events: none;
  opacity: 0.85;
}

#productAddBtn.loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  position: absolute;
}

.more-btn{
  display:block;
  margin:20px auto;
  background:#8a004a;
  color:#fff;
  padding:10px 20px;
  font-size:14px;
  border-radius:12px;
  cursor:pointer;
  border:none;
}



