.product-card {
    padding: 10px;
}

.card-overlay-btn {
    position: absolute;
    top: -180px;
    right: -180px;
    border-radius: 50%;
    box-shadow: 0 0 6px 1px var(--gray);
    width: 160px;
    height: 160px;
    transition: all .9s ease-in;
    z-index: 80;
    transform: rotate(90deg);
}
.card-overlay {
  position: absolute;
  top: -50px;
  right: -50px;
  border-radius: 50%;
  box-shadow: 0 0 6px 1px var(--gray);
  width: 100px;
  height: 100px;
  z-index: 90;
}
.card-overlay > i {
  position: absolute;
  bottom: 20px;
  left: 20px;
  transition: transform .9s ease-in;
}
.card-overlay:hover i {
    transform: rotate(360deg);
}
.card-overlay:hover + .card-overlay-btn,
.card-overlay-btn:hover {
  top: -80px;
  right: -80px;
  transform: rotate(0deg);
}
.card-overlay-btn i {
  position: absolute;
}
.card-overlay-btn .fa-heart {
  bottom: 50px;
  left: 8px;
}
.card-overlay-btn .fa-eye {
  bottom: 12px;
  left: 42px;
}


.product-image-wrapper {
    height: 317px;
    overflow: hidden;
}
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    border: var(--border-theme);
}
.view-count , .rating b , .no-review{
    font-size: 12px;
    font-weight: 600;
}
.rating b {
    padding-left: 6px;
    color: #96A3B8;
}
.no-review {
      color: #96A3B8;
}

.product-title {
    min-height: 95px;
}
.product-title * {
    font-size: 15px;
    font-weight: 600;
}

.product-price {
    min-height: 35px;
}
.product-price ins {
    text-decoration: none;
}
.regular-price ,.product-price .price {
    font-size: 23px;
    font-weight: 700;
    color: var(--green);
}
.sale-price {
    font-size: 17px;
    font-weight: 700;
    color: #96A3B8;
    text-decoration: none;
    padding-left: 10px;
}
.onsale {
  background: #e74c3c;
  color: white;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 10px;
  left: 10px;
}
a.button, button.button {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 42px;
    background-color: var(--blue);
    color: var(--white);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 1rem;
}

.add-to-cart-btn {
  height: 50px !important;
}




/* =================================================
   CARD B - Modern Glass Effect (Prefixed: atd_card_b_)
   ================================================= */

.atd_card_b_card {
  --card-bg: #ffffff;
  --card-accent: #7c3aed;
  --card-text: #1e293b;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);

  width: 100%; /* Changed from fixed 190px to fit column */
  height: 320px; /* Slightly taller for content */
  background: var(--card-bg);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin-bottom: 20px; /* Spacing between rows */
}

.atd_card_b_shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.atd_card_b_glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(124, 58, 237, 0.3) 0%,
    rgba(124, 58, 237, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}

.atd_card_b_content {
  padding: 1.25em;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  position: relative;
  z-index: 2;
}

.atd_card_b_badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #10b981;
  color: white;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  font-size: 0.7em;
  font-weight: 600;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.4s ease 0.1s;
  z-index: 10;
}

.atd_card_b_image_link {
  display: block;
  width: 100%;
}

.atd_card_b_image {
  width: 100%;
  height: 120px;
  /* Dynamic Image from PHP variable --bg-url */
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  background-color: #f3f4f6; /* Fallback color */
  border-radius: 12px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.atd_card_b_image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 30%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(139, 92, 246, 0.1) 0px,
      rgba(139, 92, 246, 0.1) 2px,
      transparent 2px,
      transparent 4px
    );
  opacity: 0.5;
}

.atd_card_b_text {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.atd_card_b_title {
  color: var(--card-text);
  font-size: 1.1em;
  margin: 0;
  font-weight: 700;
  transition: all 0.3s ease;
}

.atd_card_b_description {
  color: var(--card-text);
  font-size: 0.75em;
  margin: 0;
  opacity: 0.7;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.atd_card_b_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* Pushes footer to bottom */
}

.atd_card_b_price {
  color: var(--card-text);
  font-weight: 700;
  font-size: 1em;
  transition: all 0.3s ease;
}
.atd_card_b_price del { opacity: 0.5; font-size: 0.8em; margin-right: 5px; }
.atd_card_b_price ins { text-decoration: none; color: var(--card-accent); }

.atd_card_b_button a {
  width: 32px;
  height: 32px;
  background: var(--card-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: scale(0.9);
  text-decoration: none;
}

.atd_card_b_button svg {
  width: 16px;
  height: 16px;
}

/* --- HOVER EFFECTS --- */
.atd_card_b_card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(124, 58, 237, 0.2);
}

.atd_card_b_card:hover .atd_card_b_shine {
  opacity: 1;
  animation: shine 3s infinite;
}

.atd_card_b_card:hover .atd_card_b_glow {
  opacity: 1;
}

.atd_card_b_card:hover .atd_card_b_badge {
  transform: scale(1);
  opacity: 1;
}

.atd_card_b_card:hover .atd_card_b_image {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.atd_card_b_card:hover .atd_card_b_title {
  color: var(--card-accent);
  transform: translateX(2px);
}

.atd_card_b_card:hover .atd_card_b_description {
  opacity: 1;
  transform: translateX(2px);
}

.atd_card_b_card:hover .atd_card_b_price {
  color: var(--card-accent);
  transform: translateX(2px);
}

.atd_card_b_card:hover .atd_card_b_button a {
  transform: scale(1);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
  background: #6d28d9;
}

/* Animation Keyframes */
@keyframes shine {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Target products that have your custom discount badge */
li.product:has(.onsale) .sale-price {
    color: var(--green) !important;     /* ← Change this to your desired color (red, green, etc.) */
	font-size: 23px !important;
}

/* Keep the old/strikethrough price muted (gray) */
li.product:has(.onsale) .price del.regular-price  {
    color: #96A3B8 !important;
	font-size: 17px !important;
}

/* Target products that have the .onsale badge */
li.product:has(.onsale) .price ins {
    color: var(--green) !important;
    font-size: 23px !important;
}

/* Keep the old/strikethrough price muted */
li.product:has(.onsale) .price del {
    color: #96a3b8 !important;
    font-size: 17px !important;
}