/* =============================================
   TAVOLA GALLERY - GLOBAL PRODUCT CARD STYLES
   Inspired by chichomz.com layout
   ============================================= */

/* ---- الكارد الأساسي ---- */
.product-layout .product-thumb {
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: none !important;
  transform: none !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ---- الصورة - الجزء الأهم ---- */
.product-layout .image,
.product-layout .image-group .image {
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #f5f4f0 !important;
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
}

.product-layout .image .product-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.product-layout .image .product-img img.img-first {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.45s ease !important;
  display: block !important;
}

.product-layout .product-thumb:hover .image .product-img img.img-first {
  transform: scale(1.06) !important;
}

/* ---- Badge تخفيض - أحمر مدور زي chichomz ---- */
.j3-discount-badge,
.tvl-discount-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: #e53935 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 12px !important;
  border-radius: 30px !important;
  z-index: 20 !important;
  direction: rtl !important;
  box-shadow: 0 2px 8px rgba(229,57,53,0.3) !important;
  pointer-events: none !important;
  font-family: inherit !important;
}

/* ---- Labels الموجودة (New, Bestseller, etc) ---- */
.product-layout .product-labels {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  z-index: 20 !important;
}

.product-layout .product-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 30px !important;
  display: inline-block !important;
}

/* ---- Caption ---- */
.product-layout .caption {
  padding: 10px 2px 4px !important;
  direction: rtl !important;
  text-align: right !important;
  background: transparent !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ---- اسم المنتج ---- */
.product-layout .caption .name {
  margin-bottom: 5px !important;
  order: 1 !important;
}

.product-layout .caption .name a {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #1a1a1a !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.product-layout .caption .name a:hover {
  color: #c4a265 !important;
  text-decoration: none !important;
}

/* ---- السعر - زي chichomz: قديم مشطوب فوق، جديد تحت ---- */
.product-layout .caption .price {
  order: 2 !important;
  margin-bottom: 8px !important;
  direction: rtl !important;
  text-align: right !important;
}

.product-layout .caption .price > div {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
}

.product-layout .caption .price .price-old {
  font-size: 12px !important;
  color: #bbb !important;
  text-decoration: line-through !important;
  font-weight: 400 !important;
}

.product-layout .caption .price .price-new {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
}

.product-layout .caption .price .price-normal {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
}

/* ---- النجوم ---- */
.product-layout .caption .rating {
  order: 3 !important;
  margin-bottom: 8px !important;
  text-align: right !important;
}

.product-layout .caption .rating .rating-stars {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 1px !important;
}

.product-layout .caption .rating .rating-stars .fa-stack {
  font-size: 7px !important;
  width: 13px !important;
  height: 13px !important;
  line-height: 13px !important;
}

.product-layout .caption .rating .fa-star {
  color: #f5a623 !important;
}

.product-layout .caption .rating .fa-star-o {
  color: #f5a623 !important;
}

.product-layout .caption .rating.no-rating .fa-star-o {
  color: #e0e0e0 !important;
}

/* ---- إخفاء stepper و description و stats ---- */
.product-layout .caption .stepper {
  display: none !important;
}

.product-layout .caption .description {
  display: none !important;
}

.product-layout .caption .stats {
  display: none !important;
}

.product-layout .caption .price-tax {
  display: none !important;
}

/* ---- الأزرار ---- */
.product-layout .caption .buttons-wrapper {
  order: 4 !important;
  margin-top: auto !important;
}

.product-layout .caption .button-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.product-layout .caption .cart-group {
  display: flex !important;
  flex-direction: column !important;
}

/* ---- زرار اضف للعربة - زي chichomz بالظبط ---- */
.product-layout .caption .btn.btn-cart {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  padding: 10px 12px !important;
  border: 1.5px solid #1a1a1a !important;
  background: transparent !important;
  color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: background 0.22s ease, color 0.22s ease !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  direction: rtl !important;
  letter-spacing: 0.2px !important;
}

.product-layout .caption .btn.btn-cart:hover {
  background: #1a1a1a !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* ---- زراير wishlist & compare ---- */
.product-layout .caption .wish-group {
  display: flex !important;
  gap: 6px !important;
}

.product-layout .caption .wish-group .btn {
  flex: 1 !important;
  text-align: center !important;
  padding: 7px 8px !important;
  font-size: 12px !important;
  border: 1px solid #e0e0e0 !important;
  background: #f8f8f8 !important;
  color: #555 !important;
  border-radius: 6px !important;
  transition: background 0.2s !important;
}

.product-layout .caption .wish-group .btn:hover {
  background: #e8e8e8 !important;
  color: #222 !important;
}

/* ---- image-group wrapper ---- */
.product-layout .image-group {
  position: relative !important;
}

/* ---- labels-outside ---- */
.product-layout .product-labels-outside {
  margin-top: 6px !important;
}

/* ---- Grid spacing ---- */
.main-products.product-grid .product-layout,
.product-grid .product-layout {
  padding: 8px !important;
}

/* ---- Quickview button ---- */
.product-layout .quickview-button {
  position: absolute !important;
  bottom: 10px !important;
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
  z-index: 10 !important;
}

.product-layout .product-thumb:hover .quickview-button {
  opacity: 1 !important;
}

.product-layout .quickview-button .btn-quickview {
  background: rgba(255,255,255,0.92) !important;
  color: #1a1a1a !important;
  border: none !important;
  padding: 7px 20px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
  cursor: pointer !important;
}