/**
 * Product card — layout + theme (desktop + mobile)
 * Colors/spacing tie to layout.jinja :root (--product-card-*, --outlit-card-*).
 */

:root {
  --hk-card-green: #1e7e34;
  --hk-card-text: #111111;
  --hk-card-muted: #6b6b6b;
  --hk-card-border: #e8e8e8;
  --hk-card-star: #edb900;
  --hk-card-discount-bg: #fce7f3;
  --hk-card-discount-text: #4a4a4a;
  --hk-card-rating-pill-bg: #ececec;
}
.slick-track .outlit-product-card  {
  height: auto !important;
  display: flex !important;
}

.outlit-product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px;
  background: var(--product-card-bg, #ffffff);
  border-radius: var(--product-card-radius, 12px);
  border: 0px solid var(--hk-card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  color: var(--hk-card-text);
}

.outlit-product-card__media {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.outlit-product-card__img-wrap {
  position: relative;
  width: 100%;
  height: var(--outlit-card-img-height, 252px);
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
}

.outlit-product-card__img-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.outlit-product-card__img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.outlit-product-card__swiper {
  width: 100%;
  height: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
}

.outlit-product-card__swiper .swiper-wrapper {
  height: 100%;
}

.outlit-product-card__swiper .swiper-slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.outlit-product-card__slide-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.outlit-product-card__img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: var(--outlit-card-object-fit, contain);
  object-position: center;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Pagination — أسفل منتصف منطقة الصورة؛ النشطة كبسولة خضراء */
.outlit-product-card__pagination {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 10px !important;
  top: auto !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: center !important;
  z-index: 5;
  margin: 0 !important;
  padding: 0 8px !important;
  box-sizing: border-box;
  pointer-events: none;
}

.outlit-product-card__pagination .swiper-pagination-bullet {
  pointer-events: auto;
  position: relative;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px;
  min-height: 24px;
  margin: 0 2px !important;
  opacity: 1 !important;
  background: transparent !important;
  border-radius: 50% !important;
  transition: none;
}

.outlit-product-card__pagination .swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #d4d4d4;
  border-radius: 50%;
  transition:
    width 0.25s ease,
    border-radius 0.25s ease,
    background 0.2s ease;
}

.outlit-product-card__pagination .swiper-pagination-bullet-active::before {
  width: 12px;
  border-radius: 999px !important;
  background: var(--product-card-add-to-cart-bg, var(--hk-card-green)) !important;
}

/* Badge (جديد) — أعلى يمين منطقة الصورة، فوق السوايبر */
.outlit-product-card__badge-slot {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: none;
}

.outlit-product-card__badge-slot * {
  pointer-events: auto;
}

.outlit-product-card__badge-slot .badge-name,
.outlit-product-card__badge-slot .badge-name-product-card {
  position: relative !important;
  margin: 0 !important;
  padding: 5px 14px !important;
  border: none !important;
  border-radius: 999px !important;
  background: var(--hk-card-green) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  box-shadow: none !important;
}

.outlit-product-card__badge-slot .badge-name svg,
.outlit-product-card__badge-slot .badge-name-product-card svg {
  display: none !important;
}

/* Wishlist — أعلى يسار منطقة الصورة، قلب مخطط رمادي فوق السوايبر */
.outlit-product-card__wishlist {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.outlit-product-card__wishlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 14;
}

/* قلب بحد رفيع رمادي — يغلب على ألوان الصفحة العامة */
.outlit-product-card .outlit-product-card__wishlist-btn.icon-heart-mask {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  background-image: var(--heart-outlined-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-color: transparent !important;
  opacity: 1;
}

.outlit-product-card .outlit-product-card__wishlist-btn.icon-heart-mask.filled {
  background-image: var(--heart-filled-icon);
  background-color: transparent !important;
}

.outlit-product-card__wishlist .loader {
  position: absolute;
}

/* التقييم — أسفل يمين منطقة الصورة (فوق النقاط) */
.outlit-product-card__rating-pill {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0px;
  z-index: 9;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #f5f5f5;
  border-radius: 999px;
  min-height: 28px;
  line-height: 1;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  direction: ltr;
  unicode-bidi: isolate;
}

.outlit-product-card__rating-star {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.outlit-product-card__rating-value {
  font-weight: 500;
  font-size: 12px;
  color: #494949;
  line-height: 1;
}

.outlit-product-card__rating-count {
  font-weight: 400;
  font-size: 12px;
  color: #6b6b6b;
  line-height: 1;
}

/* Body */
.outlit-product-card__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  text-align: end;
  gap: 8px;
  padding: 4px 0 4px;
  flex: 1;
}

[dir="rtl"] .outlit-product-card__body {
  text-align: start;
}

.outlit-product-card__vendor {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--hk-card-muted);
}

.outlit-product-card__vendor a {
  color: inherit;
  text-decoration: none;
}

.outlit-product-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.outlit-product-card__title a {
  color: var(--product-card-title-color, var(--hk-card-text));
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: var(--product-card-title-lines, 2);
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: break-spaces;
}

.outlit-product-card__title a:hover {
  color: var(--primary-color, var(--hk-card-green));
}

.outlit-product-card__price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 2px;
}

[dir="rtl"] .outlit-product-card__price-wrap {
  align-items: flex-start;
}

.outlit-product-card__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row-reverse;
  gap: 5px;
  row-gap: 6px;
}


.outlit-product-card__price--current {
  font-size: 17px;
  font-weight: 700;
  color: var(--product-card-price-color, var(--hk-card-green));
}

.outlit-product-card__price--old {
  font-size: 13px;
  font-weight: 400;
  text-decoration: line-through;
  color: var(--product-card-compare-price-color, var(--hk-card-muted));
}

.outlit-product-card__discount {
  font-size: 12px;
  font-weight: 400;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--product-card-discount-bg, var(--hk-card-discount-bg));
  color: var(--product-card-discount-color, var(--hk-card-discount-text));
  line-height: 1.2;
}

/* Actions: primary add + quick view */
.outlit-product-card__actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

/* RTL: DOM [add-slot][quick-view] → زر أخضر يمين، عين يسار | rtl: عكس بصري */
[dir="ltr"] .outlit-product-card__actions {
  flex-direction: row-reverse;
}

.outlit-product-card__add-slot {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.outlit-product-card__quick-view {
  flex-shrink: 0;
  width: 43px;
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 2px solid var(--product-card-add-to-cart-bg, var(--hk-card-green));
  border-radius: 12px;
  background: #fff;
  color: var(--product-card-add-to-cart-bg, var(--hk-card-green));
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.outlit-product-card__quick-view:hover {
  background: rgba(40, 167, 69, 0.06);
  color: var(--product-card-add-to-cart-bg, var(--hk-card-green));
}

.outlit-product-card__quick-view svg {
  width: 22px;
  height: 22px;
}

/* Add to cart — full pill */
.outlit-product-card__add-cart-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.outlit-product-card__add-cart-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.outlit-product-card__add-cart-btn {
  flex: 1;
  min-width: 0;
  min-height: 43px;
  padding: 0 8px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: 12px;
  background: var(--product-card-add-to-cart-bg, var(--hk-card-green));
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease;
}

[dir="rtl"] .outlit-product-card__add-cart-btn {
  flex-direction: row-reverse;
}

.outlit-product-card__add-cart-btn:hover {
  opacity: 0.92;
  color: #fff;
  text-decoration: none;
}

.outlit-product-card__add-cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--product-card-add-to-cart-icon-color, #ffffff);
}

.outlit-product-card__add-cart-icon svg {
  width: 100%;
  height: 100%;
}

.outlit-product-card__add-cart-btn--disabled {
  display: none;
}

.outlit-product-card__add-cart-btn {
  position: relative;
}

/* Loading dots */
.outlit-product-card__add-cart-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.outlit-product-card__add-cart-points span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: hk-card-points-bounce 0.6s ease-in-out infinite both;
}
.outlit-product-card__add-cart-points span:nth-child(1) {
  animation-delay: 0s;
}
.outlit-product-card__add-cart-points span:nth-child(2) {
  animation-delay: 0.15s;
}
.outlit-product-card__add-cart-points span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes hk-card-points-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.6;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Quantity strip */
.outlit-product-card__quantity-wrap {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--product-card-add-to-cart-bg, var(--hk-card-green));
  color: #fff;
  border: none;
}

.outlit-product-card__quantity-wrap .outlit-product-card__qty-btn,
.outlit-product-card__quantity-wrap .outlit-product-card__qty-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background:transparent;
  color: inherit;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.outlit-product-card__quantity-wrap .outlit-product-card__qty-num {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.outlit-product-card__quantity-wrap .outlit-product-card__qty-remove svg {
  width: 18px;
  height: 18px;
}

.outlit-product-card__add-cart-wrap .outlit-product-card__add-cart-btn.d-none + .outlit-product-card__quantity-wrap,
.outlit-product-card__add-cart-wrap .outlit-product-card__quantity-wrap:not(.d-none) {
  display: inline-flex;
}

.outlit-product-card__add-cart-wrap .outlit-product-card__quantity-wrap.d-none {
  display: none !important;
}

.btn-product-card-out-of-stock {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  color: #fff;
  padding: 0px 8px;
  border-radius: 12px;
  font-size: 16px;
  min-height: 43px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.outlit-product-card__out-of-stock-cta {
  margin-top: 8px;
  width: 100%;
}

.outlit-product-card--out-of-stock .outlit-product-card__img-wrap {
  filter: grayscale(1);
  opacity: 0.92;
}

.outlit-product-card--out-of-stock .outlit-product-card__actions:not(.outlit-product-card__actions--out-of-stock) {
  display: none;
}

.outlit-product-card__actions--out-of-stock {
  margin-top: auto;
}

.outlit-product-card__actions--out-of-stock .outlit-product-card__out-of-stock-cta {
  margin-top: 0;
}

/* Slider track helper (product grids) */
.slick-track {
  display: flex !important;
}
.prod-col.slick-slide {
  height: auto !important;
}

.outlit-product-card {
  height: 100%;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .outlit-product-card {
    padding: 8px;
    border-radius: var(--product-card-radius, 8px);
  }

  .outlit-product-card__img-wrap {
    height: var(--outlit-card-img-height-mobile, var(--outlit-card-img-height, 168px));
    border-radius: 10px;
  }

  .outlit-product-card__title {
    font-size: 15px;
  }

  .outlit-product-card__price--current {
    font-size: 14px;
  }

  .outlit-product-card__add-cart-btn {
    font-size: 14px;
    min-height: 46px;
    padding: 0 6px;
  }

  .outlit-product-card__quick-view {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .outlit-product-card__pagination {
    bottom: 8px !important;
  }

  .outlit-product-card__rating-pill {
    bottom: 15px;
    inset-inline-end: 0px;
    min-height: 20px;
    padding: 2px;
  }



 
}

/* Sale period countdown (purchase_restrictions.sale_price_period_*) */
.outlit-product-card .product-sale-countdown--card {
  margin-top: 8px;
  width: 100%;
}

.outlit-product-card .product-sale-countdown--card[hidden] {
  display: none !important;
}

.outlit-product-card .product-sale-countdown__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
  background: #fff0ef;
  border-radius: 10px;
  @media (max-width: 768px) {
    gap: 4px;
    padding: 4px !important;
  }
}

.outlit-product-card .product-sale-countdown__label {
  font-size: 11px;
  text-align: center;
  font-weight: 500;
  color: #cb0a20;
  line-height: 1.2;
}

.outlit-product-card .product-sale-countdown__timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  direction: ltr;
  @media (max-width: 450px) {
    gap: 0px;
  }
}

.outlit-product-card .product-sale-countdown__unit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 2px 2px;
  background: #cb0a20;
  color: #fff;
  border-radius: 1px;
  line-height: 1.1;
}

.outlit-product-card .product-sale-countdown__unit span {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.outlit-product-card .product-sale-countdown__unit small {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.outlit-product-card .product-sale-countdown__sep {
  color: #cb0a20;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

@media (max-width: 576px) {
  .outlit-product-card__add-cart-icon {
    width: 18px !important;
    height: 18px !important;
}
  .outlit-product-card__quantity-wrap .outlit-product-card__qty-remove svg {
    width: 16px !important;
    height: 16px !important;
}
  .outlit-product-card__quantity-wrap {
 
    padding: 0 5px !important;
}
  .btn-product-card-out-of-stock {
    padding: 0px 8px;
    min-height: 35px;
    font-size: 14px;
  }
  
  .outlit-product-card__quantity-wrap .outlit-product-card__qty-btn, .outlit-product-card__quantity-wrap .outlit-product-card__qty-remove {
    width: 25px;
    height: 25px;
    font-size: 15px;

}
  .outlit-product-card__quantity-wrap {
    min-height: 35px;
    gap: 4px;

  }
  .outlit-product-card__add-cart-btn {
    min-height: 35px;
}
  .outlit-product-card__quick-view {
    height: 35px;
}
  .outlit-product-card__price--old {
    font-size: 12px;
}
  .outlit-product-card__actions {

    gap: 4px;

}
  .outlit-product-card__quick-view {
    width: 40px;
  }
}
@media (max-width: 450px) {
  .outlit-product-card__add-cart-icon {

    display: none !important;
}
}
@media (max-width: 380px) {
  .outlit-product-card__add-cart-icon {
    display: none !important;
}
  .outlit-product-card__quick-view {
    width: 30px;
}
  .outlit-product-card__quick-view svg {
    width: 20px;
    height: 20px;
  }
  .outlit-product-card {
    padding: 6px;
  }

  .outlit-product-card__actions {
    gap: 4px !important;
  }

  .outlit-product-card__add-cart-btn {
    font-size: 12px;
    gap: 4px;
  }
}
