/* ============================================================
   PRODUCT CARD — custom CSS
   Paste into: المتجر ← تصميم المتجر ← تعديل الأكواد ← CSS
   Works together with product-card.js
   ============================================================ */

:root {
  --pc-radius: 14px;
  --pc-border: #EAEAEA;
  --pc-border-hover: #DCDCDC;
  --pc-bg: #FFFFFF;
  --pc-title: #3A3A3A;
  --pc-price: #1A1A1A;
  --pc-muted: #9B9B9B;
  --pc-badge-bg: #1C1C1C;
  --pc-badge-text: #FFFFFF;
  --pc-sale: #D42B2B;
}

body.trans_header.slider_has_overlay .store-header .main-nav-container.fixed-header :not(custom-salla-product-card *) {
    background: white;
}

.footer-is-custom .store-footer .store-footer__curve {
    display: none;
}

:root {
    --color-primary-reverse: #fff !important;
}

html,
body {
    --color-primary-reverse: #fff !important;
}

/* ---------- Card shell ---------- */
custom-salla-product-card.product-card,
.product-card.pc-ready {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
  height: 100%;
  background: var(--pc-bg) !important;
  border: 1px solid var(--pc-border) !important;
  border-radius: var(--pc-radius) !important;
  overflow: hidden !important;
  box-shadow: none !important;
  transition: border-color .25s ease, box-shadow .25s ease;
}

custom-salla-product-card.product-card:hover,
.product-card.pc-ready:hover {
  border-color: var(--pc-border-hover) !important;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .28) !important;
}

/* ---------- Media ---------- */
.product-card .product-card__image {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1.16;
  overflow: hidden !important;
  background: #F6F6F6;
  border-radius: 0 !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

.product-card .product-card__image > a {
  display: block !important;
  width: 100%;
  height: 100%;
}

.product-card .product-card__image img.main-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top;
  display: block;
  border-radius: 0 !important;
  transition: transform .5s ease;
}

custom-salla-product-card.product-card:hover .product-card__image img.main-image {
  transform: scale(1.035);
}

/* ---------- Badge ---------- */
.product-card .product-card__badge {
  position: absolute !important;
  top: 8px;
  left: 8px;
  right: auto;
  z-index: 3;
  display: inline-flex !important;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  background: var(--pc-badge-bg);
  color: var(--pc-badge-text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
}

.product-card .product-card__badge--sale {
  background: var(--pc-sale);
}

/* Theme's own promotion / labels are replaced by .product-card__badge */
.product-card .product-card__promotion,
.product-card .promotion-title,
.product-card .s-product-card-promotion-title,
.product-card .product-card__promotion-title,
.product-card .product-card__discount {
  display: none !important;
}

/* ---------- Floating actions (wishlist / quick view) ---------- */
.product-card .product-card__image .product-card__actions {
  position: absolute !important;
  top: 8px;
  right: 8px;
  left: auto;
  bottom: auto;
  z-index: 3;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .22s ease, transform .22s ease;
}

custom-salla-product-card.product-card:hover .product-card__image .product-card__actions,
custom-salla-product-card.product-card:focus-within .product-card__image .product-card__actions {
  opacity: 1;
  transform: translateY(0);
}

.product-card .product-card__image .product-card__actions .s-button-element {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid var(--pc-border) !important;
  border-radius: 8px !important;
  color: #1C1C1C !important;
  font-size: 14px !important;
  box-shadow: none !important;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.product-card .product-card__image .product-card__actions .s-button-element:hover {
  background: #1C1C1C !important;
  border-color: #1C1C1C !important;
  color: #FFFFFF !important;
}

.product-card .product-card__image .product-card__actions .btn--wishlist.favorited,
.product-card .product-card__image .product-card__actions .btn--wishlist.is-added {
  color: var(--pc-sale) !important;
}

/* Duplicate blocks shipped by the theme stay in the DOM (functionality)
   but are not part of this layout */
.product-card .product-card__content .product-card__buttons,
.product-card .product-card__enhanced-mini-cart,
.product-card .product-card__normal-cart,
.product-card > .product-card__buttons {
  display: none !important;
}

/* ---------- Content ---------- */
.product-card .product-card__content {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 9px 10px 10px !important;
  min-height: 56px;
  text-align: right;
}

.product-card .product-card__content-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: right;
}

.product-card .product-card__title {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  min-height: 0 !important;
  text-align: right !important;
}

.product-card .product-card__title a {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: var(--pc-title) !important;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  transition: color .2s ease;
}

.product-card .product-card__title a:hover {
  color: #000000 !important;
}

.product-card .product-options:empty,
.product-card .product-card__subtitle,
.product-card .product-card__rating,
.product-card .s-product-card-content-sub {
  display: none !important;
}

/* ---------- Price ---------- */
.product-card .product-card__price {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  line-height: 1;
}

.product-card .product-card__price .starting-or-normal-price,
.product-card .product-card__price .price_is_on_sale {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.product-card .product-card__price .price_is_on_sale.hidden,
.product-card .product-card__price .starting-or-normal-price.hidden {
  display: none !important;
}

.product-card .product-card__price .total-price {
  margin: 0 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--pc-price) !important;
  line-height: 1 !important;
}

.product-card .product-card__price .total-price.text-red-600 {
  color: var(--pc-sale) !important;
}

.product-card .product-card__price .before-price {
  font-size: 11px !important;
  font-weight: 400 !important;
  color: var(--pc-muted) !important;
  text-decoration: line-through;
  line-height: 1 !important;
}

.product-card .product-card__price i {
  font-size: .86em;
}

/* ---------- Inline cart button ---------- */
.product-card .product-card__cart {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.product-card .product-card__cart .s-button-element {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #1C1C1C !important;
  box-shadow: none !important;
  transition: background .2s ease;
}

.product-card .product-card__cart .s-button-element i {
  font-size: 19px !important;
  line-height: 1;
}

.product-card .product-card__cart .s-button-element:hover {
  background: #F2F2F2 !important;
}

.product-card .product-card__cart .s-button-element:active {
  background: #E8E8E8 !important;
}

.product-card .product-card__cart .s-button-element:focus-visible,
.product-card .product-card__image .product-card__actions .s-button-element:focus-visible,
.product-card .product-card__title a:focus-visible,
.product-card .product-card__image > a:focus-visible {
  outline: 2px solid #1C1C1C !important;
  outline-offset: 2px;
}

/* ---------- Out of stock ---------- */
.product-card.out-of-stock .product-card__image img.main-image {
  opacity: .55;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  custom-salla-product-card.product-card,
  .product-card.pc-ready {
    border-radius: 12px !important;
  }
  .product-card .product-card__content {
    padding: 8px 8px 9px !important;
    gap: 8px !important;
    min-height: 52px;
  }
  .product-card .product-card__title a {
    font-size: 12px !important;
  }
  .product-card .product-card__price .total-price {
    font-size: 13px !important;
  }
  .product-card .product-card__cart .s-button-element {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }
  .product-card .product-card__cart .s-button-element i {
    font-size: 17px !important;
  }
  .product-card .product-card__badge {
    height: 20px;
    padding: 0 8px;
    font-size: 10px;
  }
  .product-card .product-card__image .product-card__actions {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  custom-salla-product-card.product-card,
  .product-card .product-card__image img.main-image,
  .product-card .product-card__image .product-card__actions,
  .product-card .product-card__cart .s-button-element {
    transition: none !important;
    transform: none !important;
  }
}