/* ===========================================
   FULL FIXED PRODUCT CARD (NO HTML CHANGES)
   Modern UI + Smooth Animations + Price Effects
   =========================================== */

/* Hide hover overlays (your behavior) */
.ec-product-inner:hover .ec-product-hover,
.ec-product-inner:hover .pro-hidden-block {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Remove rating (your behavior) */
.ec-product-inner .ec-pro-content .ec-pro-rating {
  display: none !important;
  margin-bottom: 5px;
  overflow: hidden;
  height: 30px;
  line-height: 30px;
  align-items: center;
  justify-content: center;
}

/* Column layout inner wrapper */
.ec-product-inner .ec-pro-content .ec-pro-rat-pri-inner {
  height: auto !important;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.3s ease;
}

/* disable pointer events only for overlay images (safe) */
.ec-product-inner .ec-product-hover,
.ec-product-inner .hover-image {
  pointer-events: none;
}

/* new price base */
.ec-product-inner .ec-pro-content .ec-price span.new-price {
  font-size: 14px !important;
  color: var(--primary-color);
  font-weight: 700;
}

/* icons size */
.ec-pro-actions svg {
  height: 19px !important;
}

/* actions position */
.ec-product-inner .ec-pro-image .ec-pro-actions .wishlist,
.ec-product-inner .ec-pro-image .ec-pro-actions .add-to-cart {
  right: 0 !important;
}

/* ===============================
   ✅ MAIN CARD (FULL FIXED)
   =============================== */
.ec-product-inner {
  display: flex;
  align-items: flex-start;
  flex-direction: column;

  /* IMPORTANT: it was pointer-events:none => hover never works */
  pointer-events: auto !important;

  /* modern look */
  padding: 0px !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 16px !important;
  background-color: #fff !important;
  overflow: hidden !important;

  /* modern shadow */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10) !important;

  position: relative;
  isolation: isolate;
  transform: translateZ(0);

  max-width: 97vw;
  margin: auto;

  transition: transform 0.28s cubic-bezier(.2,.85,.2,1),
              box-shadow 0.28s cubic-bezier(.2,.85,.2,1),
              border-color 0.28s cubic-bezier(.2,.85,.2,1);
}

/* soft premium glow overlay */
.ec-product-inner::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(900px 240px at 15% 0%,
      rgba(52,116,212,0.16),
      rgba(255,255,255,0) 55%),
    radial-gradient(700px 240px at 95% 110%,
      rgba(255,132,0,0.10),
      rgba(255,255,255,0) 55%);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(.2,.85,.2,1);
  z-index: 0;
  pointer-events: none;
}

/* keep content above glow */
.ec-product-inner .ec-pro-image,
.ec-product-inner .ec-pro-image-outer,
.ec-product-inner .ec-pro-content {
  position: relative;
  z-index: 1;
}

/* hover / focus / tap */
@media (hover:hover) {
  .ec-product-inner:hover,
  .ec-product-inner:focus-within {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 18px 55px rgba(0,0,0,0.16) !important;
    border-color: rgba(52,116,212,0.18) !important;
  }

  .ec-product-inner:hover::before,
  .ec-product-inner:focus-within::before {
    opacity: 1;
  }
}

/* tap feedback */
.ec-product-inner:active {
  transform: scale(0.995);
}

/* Keep actions visible and clickable (your behavior) */
.ec-product-inner:hover .ec-pro-image .ec-pro-actions {
  transform: none;
}

.ec-product-inner .ec-pro-image a.quickview,
.ec-product-inner .ec-pro-image .ec-pro-actions {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

/* ===============================
   IMAGE AREA (WITH SHINE ANIMATION)
   =============================== */
.ec-product-inner .ec-pro-image {
  position: relative;
  overflow: hidden;
  object-fit: contain;
  margin: 0 auto;
}

.ec-product-inner .ec-pro-image .image {
  position: relative;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 220px;
}

.ec-product-inner .ec-pro-image .image.loaded {
  background-color: transparent !important;
}

/* shimmer loader */
.ec-product-inner .ec-pro-image .image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(245, 245, 245, 0.1) 0%,
    rgba(230, 230, 230, 0.8) 50%,
    rgba(245, 245, 245, 0.1) 100%
  );
  animation: shimmer 2s infinite;
  z-index: 1;
}

.ec-product-inner .ec-pro-image .image.loaded::before {
  display: none;
}

.ec-product-inner .ec-pro-image .image img {
  z-index: 1;
  max-width: 100%;
  transition: transform 0.5s cubic-bezier(.2,.85,.2,1);
  object-fit: contain;
  display: none;
  height: 95% !important;
}

.ec-product-inner .ec-pro-image .image.loaded img {
  display: inline-block;
}

.ec-product-inner .ec-pro-image .image img.hover-image {
  position: absolute;
  z-index: 9;
  top: 0;
  left: 0;
  opacity: 0;
}

/* outer wrapper */
.ec-product-inner .ec-pro-image-outer {
  transition: all 0.3s ease 0s;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 32%;
  width: 100%;
}

/* shine sweep */
.ec-product-inner .ec-pro-image-outer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.35) 38%,
    rgba(255,255,255,0) 70%
  );
  transform: translateX(-140%);
  transition: transform 0.65s cubic-bezier(.2,.85,.2,1);
  pointer-events: none;
  z-index: 2;
}

@media (hover:hover) {
  .ec-product-inner:hover .ec-pro-image-outer::after {
    transform: translateX(140%);
  }

  .ec-product-inner:hover .ec-pro-image .image img {
    transform: scale(1.06);
  }
}

/* hover layer stays hidden (your behavior) */
.ec-product-inner .ec-product-hover {
  transition: all 0.3s ease-in-out;
  position: absolute;
  inset: 0;
  visibility: hidden;
  background-color: #fff;
  opacity: 0;
  border-radius: 14px;
  z-index: 9;
  border: 1px solid #d9d9d9;
}

/* ===============================
   CONTENT AREA (MODERN)
   =============================== */
.ec-product-inner .ec-pro-content {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 12px 10px 10px !important;
  transition: all 0.3s ease 0s;
}

/* hidden block */
.ec-product-inner .pro-hidden-block {
  transition: all 0.3s ease-in-out;
  position: absolute;
  top: calc(100% - 4px);
  right: 0;
  left: 0;
  visibility: hidden;
  opacity: 0;
}

/* actions */
.ec-product-inner .ec-pro-actions {
  display: flex;
  align-items: center;
  margin: 11px auto 0;
  justify-content: space-evenly;
}

.ec-product-inner .ec-pro-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
  color: #202020;
  margin: 0;
  border-radius: 10px;
}

@media (hover:hover) {
  .ec-product-inner .ec-pro-actions a:hover {
    transform: translateY(-2px);
  }
}

/* title */
.ec-product-inner .ec-pro-content .ec-pro-title {
  margin: 0 0 3px;
  font-family: "Tajawal-Bold";
  font-size: 14px;
}

.ec-product-inner .ec-pro-content .ec-pro-title a {
  width: 100%;
  text-decoration: none;
  color: #202020;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-size: 13.3px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.ec-product-inner .ec-pro-content .ec-pro-title a:hover {
  color: #0d4fcf;
}

/* subtitle */
.ec-product-inner .ec-pro-content .ec-pro-stitle {
  text-decoration: none;
  color: #202020;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-size: 12px;
}

/* ===============================
   PRICE (COOL ANIMATIONS)
   =============================== */
.ec-product-inner .ec-pro-content .ec-price {
  overflow: hidden;
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d4fcf;
  gap: 10px;
}

/* NEW price: pop + gradient text */
.ec-product-inner .ec-pro-content .ec-price span.new-price {
  display: inline-block;
  font-weight: 900 !important;
  transform: translateY(12px) scale(0.94);
  opacity: 0;
  animation: pricePop 0.55s cubic-bezier(.2,.85,.2,1) forwards;
  animation-delay: 0.08s;

  background: linear-gradient(90deg,#111827 0%, var(--primary-color) 55%, #111827 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

/* OLD price: line draws instead of default */
.ec-product-inner .ec-pro-content .ec-price span.old-price {
  font-size: 14px;
  color: #4b5563;
  margin-left: 9px;
  text-decoration: none !important;

  position: relative;
  display: inline-block;
  transform: translateY(10px);
  opacity: 0;
  animation: oldFade 0.45s cubic-bezier(.2,.85,.2,1) forwards;
  animation-delay: 0.18s;
}

html[dir="ltr"] .ec-product-inner .ec-pro-content .ec-price span.old-price {
  margin-right: 9px;
  margin-left: 0;
}

/* animated strike line */
.ec-product-inner .ec-pro-content .ec-price span.old-price::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 50%;
  height: 1.6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(75,85,99,0.08) 0%,
    rgba(75,85,99,0.75) 16%,
    rgba(75,85,99,0.75) 84%,
    rgba(75,85,99,0.08) 100%
  );
  box-shadow: 0 0 0.4px rgba(75,85,99,0.6);
  transform-origin: right center;
  transform: translateY(-50%) scaleX(0) rotate(-2deg);
  animation: strikeDraw 0.55s cubic-bezier(.2,.85,.2,1) forwards;
  animation-delay: 0.26s;
}

html[dir="ltr"] .ec-product-inner .ec-pro-content .ec-price span.old-price::after {
  transform-origin: left center;
}

/* rat price block */
.ec-product-inner .ec-pro-content .ec-pro-rat-price {
  overflow: hidden;
  height: 30px;
  line-height: 30px;
}

/* description */
.ec-product-inner .ec-pro-content .ec-pro-desc {
  line-height: 22px;
  color: #999;
  letter-spacing: 0.2px;
  font-size: 12px;
}

.ec-product-inner .ec-pro-content .btn {
  margin: 0 auto;
  border-radius: 30px;
  height: 40px;
  line-height: 40px;
  font-size: 10px;
  padding: 0 10px;
}

/* loading overlay */
.ec-product-inner .ec-pro-image.pro-loading:before {
  position: absolute;
  z-index: 98;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  content: "";
  opacity: 0.5;
}

/* percentage badge */
.percentage {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  font-size: 12px;
  line-height: 24px;
  padding: 0 10px;
  text-align: center;
  text-transform: uppercase;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

html[dir="ltr"] .percentage {
  left: auto;
  right: 10px;
}

/* Wishlist */
a.wishlist .svg_img.pro_svg {
  height: 19px;
}
.wishlist {
  pointer-events: all;
}

/* ===============================
   LIST VIEW (KEEP YOUR BEHAVIOR)
   =============================== */
.list-view .dataAll {
  grid-template-columns: 1fr !important;
}

.list-view .ec-product-inner {
  align-items: center;
  flex-direction: row;
  column-gap: 5px;
  height: 100%;
  position: relative;
}

.list-view .ec-product-inner .ec-pro-image .image {
  height: 110px !important;
}

.list-view .percentage {
  top: 8px;
  right: 8px;
  border-radius: 6px;
  padding: 4px 8px;
}
html[dir="ltr"] .list-view .percentage {
  right: auto;
  left: 8px;
  border-radius: 6px;
  padding: 4px 8px;
}


  .list-view .wishlist {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
html[dir="ltr"] .list-view .wishlist {
    right: 16px;
    left: initial;
    transform: translateY(-50%);
}

html[dir="rtl"] .list-view .ec-pro-content {
    margin-left: 48px;
}

html[dir="ltr"] .list-view .ec-pro-content {
    margin-right: 48px;
}

.list-view .catProduct {
  height: 170px;
}

/* title clamp in list view + category */
.list-view .ec-product-inner .ec-pro-content .ec-pro-title a,
.ec-product-inner.categProduct .ec-pro-content .ec-pro-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  max-height: 36px;
  overflow: hidden;
  line-height: 18px;
}

.ec-product-inner.categProduct .ec-pro-content .ec-pro-title a {
  min-height: 36px;
}

/* grid */
.shop-pro-inner .dataAll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
  margin-top: 0px !important;
}
.shop-pro-inner .dataAll > * {
  min-width: 0;
}
@media (min-width: 786px) {
  .shop-pro-inner .dataAll {
    grid-template-columns: repeat(auto-fill, minmax(33%, 1fr));
  }
}

/* daily offers title + price sizing (your custom) */
#daily_offers .ec-product-inner .ec-pro-content .ec-pro-title a {
  font-size: 15.3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  min-height: 2.3em;
  max-height: 2.3em;
}
#daily_offers .ec-product-inner .ec-pro-content .ec-price span.new-price {
  font-size: 16px !important;
}

/* ===============================
   ANIMATIONS
   =============================== */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes pricePop {
  0% { opacity: 0; transform: translateY(14px) scale(0.93); filter: blur(2px); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.02); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes oldFade {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes strikeDraw {
  0% { transform: translateY(-50%) scaleX(0) rotate(-2deg); opacity: 0.2; }
  100% { transform: translateY(-50%) scaleX(1) rotate(-2deg); opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ec-product-inner,
  .ec-product-inner::before,
  .ec-product-inner .ec-pro-image-outer::after,
  .ec-product-inner .ec-pro-content .ec-price span.new-price,
  .ec-product-inner .ec-pro-content .ec-price span.old-price,
  .ec-product-inner .ec-pro-content .ec-price span.old-price::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .ec-product-inner .ec-pro-image-outer::after {
    display: none !important;
  }
}
