/* =========================================================
   Stylclo Header – Rating + Units + Badges (AdilQ style)
   ========================================================= */

/* Hide default Woo rating row – we show our own */
.single-product .woocommerce-product-rating {
  display: none;
}

/* Rating row ABOVE title */
.single-product .stylclo-rating-row-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #111;
  margin-bottom: 6px;
}

/* Clickable link that scrolls to reviews */
.single-product .stylclo-rating-link {
  text-decoration: none;
  color: #1b6fb3;
  display: inline-flex;
  align-items: center;
}
.single-product .stylclo-rating-link:hover,
.single-product .stylclo-rating-link:focus {
  text-decoration: underline;
  color: #155a93;
}

/* Star + numbers */
.single-product .stylclo-star-icon {
  font-size: 16px;
  color: #f5b301;
  line-height: 1;
  margin-right: 4px;
}
.single-product .stylclo-rating-avg {
  font-weight: 700;
  margin-right: 4px;
}
.single-product .stylclo-rating-count {
  font-weight: 600;
  margin-left: 4px;
  font-size: 14px;
  color: #555;
}

/* Separator between ratings and units */
.single-product .stylclo-sep {
  margin: 0 10px;
  color: #ccc;
  font-weight: 600;
}

/* Units Sold pill (green) */
.single-product .stylclo-units-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #444;
}
.single-product .stylclo-units-highlight {
  font-weight: 800;
  color: #1b8f6f;
  background: #e8f7f2;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11,138,91,0.08);
  font-size: 13px;
}
.single-product .stylclo-units-label {
  color: #666;
  font-weight: 600;
  font-size: 13px;
}

/* Badges row UNDER title – green pills */
.single-product .stylclo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.single-product .stylclo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b8f6f;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.04);
}
.single-product .stylclo-badge::before {
  content: "\2714";
  font-size: 11px;
  opacity: 0.95;
  color: #fff;
}

/* Small helper for consistent letter spacing */
.tm-badge,
.stylclo-badge {
  letter-spacing: 0.1px;
}

/* Responsive tweaks for header row */
@media (max-width: 991px) {
  .single-product .stylclo-rating-row-wrapper {
    font-size: 14px;
    gap: 6px;
  }
  .single-product .stylclo-badge {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* =========================================================
   % OFF badge + In Stock pill styling
   ========================================================= */

/* % OFF pill (orange) */
.price .stylclo-price-off-badge,
.woocommerce-Price-amount .stylclo-price-off-badge,
.stylclo-price-off-badge {
  display: inline-block !important;
  margin-left: 10px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, #ff9f1c 0%, #ff7b00 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  vertical-align: middle !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 3px 8px rgba(255,165,0,0.25),
              inset 0 1px 1px rgba(255,255,255,0.2) !important;
  z-index: 9999 !important;
  animation: stylcloPricePulse 2.6s ease-in-out infinite;
}

@keyframes stylcloPricePulse {
  0%   { box-shadow: 0 3px 8px rgba(255,165,0,0.25); transform: scale(1); }
  50%  { box-shadow: 0 6px 18px rgba(255,165,0,0.4); transform: scale(1.04); }
  100% { box-shadow: 0 3px 8px rgba(255,165,0,0.25); transform: scale(1); }
}

.price .stylclo-price-off-badge:hover,
.stylclo-price-off-badge:focus {
  background: linear-gradient(135deg, #ffa92d 0%, #ff8c00 100%) !important;
  box-shadow: 0 6px 18px rgba(255,165,0,0.45) !important;
  transform: scale(1.05);
  transition: all 0.2s ease !important;
}

/* "In Stock" pill (green) */
.single-product .stylclo-instock,
.single-product .stock.in-stock {
  display: inline-block !important;
  background: linear-gradient(135deg,#00b36b 0%,#00925b 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,0.05) !important;
  box-shadow: 0 3px 8px rgba(0,179,107,0.25) !important;
  margin-top: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
  vertical-align: middle;
  transform-origin: center;
  animation: stylcloInStockPulse 3s ease-in-out infinite;
}

@keyframes stylcloInStockPulse {
  0%   { box-shadow: 0 3px 8px rgba(0,179,107,0.20); transform: scale(1); }
  50%  { box-shadow: 0 6px 16px rgba(0,179,107,0.30); transform: scale(1.03); }
  100% { box-shadow: 0 3px 8px rgba(0,179,107,0.20); transform: scale(1); }
}

.single-product .stylclo-instock:hover,
.single-product .stock.in-stock:hover {
  background: linear-gradient(135deg,#00c47a 0%,#00925b 100%) !important;
  box-shadow: 0 6px 16px rgba(0,179,107,0.38) !important;
  transform: scale(1.04);
  transition: all 0.18s ease-in-out !important;
}

/* Outline variant if needed */
.single-product .stock.in-stock.badge-outline {
  background: transparent !important;
  color: #00925b !important;
  border: 2px solid #00925b !important;
  padding: 4px 10px !important;
}

/* Keep price/title inline so pills sit nicely */
.product_title,
.price {
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 767px) {
  .price .stylclo-price-off-badge,
  .stylclo-price-off-badge {
    font-size: 13px !important;
    padding: 5px 8px !important;
    margin-left: 8px !important;
  }
  .single-product .stylclo-instock,
  .single-product .stock.in-stock {
    font-size: 13px !important;
    padding: 5px 9px !important;
    animation: none !important;
  }
}
