/* WooCommerce Sale Booster Styles */

/* Reset and basics */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  margin: 5px 0;
  font-weight: normal;
}

/* Base price box styles */
.khung-gia {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s ease;
}

/* Style 1 - Default */
.khung-gia-style1 {
  background-color: #faf4f4;
  border: 1px solid #ebebeb;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.khung-gia-style1 .gia-chi-con {
  font-size: 18px;
  font-weight: bold;
  color: #ff3a3a;
  display: block;
  margin-bottom: 5px;
}

.khung-gia-style1 .gia-thi-truong {
  text-decoration: line-through;
  color: #999;
  margin-right: 10px;
  font-size: 14px;
}

.khung-gia-style1 .giam-gia {
  background-color: #ff3a3a;
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: bold;
  display: inline-block;
  margin-left: 8px;
}

/* Style 2 - Minimal */
.khung-gia-style2 {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 3px;
  box-shadow: none;
}

.khung-gia-style2 .gia-chi-con {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 3px;
}

.khung-gia-style2 .gia-thi-truong {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
  font-size: 13px;
}

.khung-gia-style2 .giam-gia {
  background-color: #f0f0f0;
  color: #666;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  margin-left: 6px;
}

/* Style 3 - Highlight */
.khung-gia-style3 {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 2px solid #ff3a3a;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 58, 58, 0.1);
}

.khung-gia-style3 .gia-chi-con {
  font-size: 24px;
  font-weight: 800;
  color: #ff3a3a;
  display: block;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(255, 58, 58, 0.1);
}

.khung-gia-style3 .gia-thi-truong {
  text-decoration: line-through;
  color: #999;
  margin-right: 12px;
  font-size: 16px;
}

.khung-gia-style3 .giam-gia {
  background: linear-gradient(45deg, #ff3a3a, #ff6b6b);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
  margin-left: 10px;
  box-shadow: 0 2px 4px rgba(255, 58, 58, 0.2);
}

/* Discount badge */
.sale-badge,
.phan-tram-km {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16%;
  background-color: #ff3a3a;
  color: white;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 3px;
  z-index: 99;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure badge displays correctly in product list */
.products .product {
  position: relative;
}

/* Ensure badge displays correctly as in the reference image */
.woocommerce ul.products li.product .phan-tram-km {
  top: 10px;
  right: 10px;
  background-color: #ff3a3a;
  color: white;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 14px;
}

/* Price display on list pages */
.woocommerce ul.products li.product .price {
  color: #ff3a3a;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 0;
}

.woocommerce ul.products li.product .price del {
  color: #999;
  font-weight: normal;
  font-size: 14px;
  display: block;
  margin-bottom: 3px;
}

.woocommerce ul.products li.product .price ins {
  text-decoration: none;
  font-weight: bold;
}

/* Flash sale badge */
.flash-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(45deg, #ff6b6b, #ff0000);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 13px;
  z-index: 99;
  animation: flash-pulse 1.5s infinite;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes flash-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* Sale countdown */
.sale-countdown {
  margin: 15px 0;
  padding: 15px;
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Style-specific countdown variations */
.sale-countdown-style1 {
  background-color: #fff4f4;
  border: 1px solid #ffcaca;
}

.sale-countdown-style2 {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
}

.sale-countdown-style3 {
  background-color: #fff5f5;
  border: 2px solid var(--countdown-color, #ff3a3a);
  box-shadow: 0 4px 12px rgba(255, 58, 58, 0.1);
}

.countdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px dashed #e0e0e0;
  padding-bottom: 8px;
}

.countdown-end-date {
  font-size: 12px;
  color: #777;
}

.countdown-label {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.countdown-label .dashicons {
  margin-right: 5px;
  color: var(--countdown-color, #ff3a3a);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  padding: 5px 0;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 2px;
}

.countdown-value {
  background: var(--countdown-color, #ff3a3a);
  color: white;
  border-radius: 4px;
  padding: 8px 10px;
  min-width: 36px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.countdown-label-small {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}

.countdown-separator {
  font-size: 20px;
  font-weight: bold;
  color: var(--countdown-color, #ff3a3a);
  margin: 0 2px;
  align-self: flex-start;
  padding-top: 8px;
}

@media (max-width: 480px) {
  .countdown-value {
    font-size: 14px;
    padding: 6px 8px;
    min-width: 30px;
  }

  .countdown-separator {
    font-size: 16px;
  }

  .countdown-label-small {
    font-size: 10px;
  }
}

/* Promotions */
.product-promo-tag {
  margin-top: 15px;
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  background: var(--background, #faf4f4);
  border: 1px solid var(--border-color, #ebebeb);
  color: var(--color, #cc1af0);
}

.product-promotion {
  margin-top: 20px;
}

.product-promotion__heading {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.product-promotion__heading img {
  margin-right: 10px;
}

.promotion-box {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.promotion-box li {
  padding: 8px 0 8px 25px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
}

.promotion-box li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 16px;
  height: 16px;
  background-image: url("../images/check-circle.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Ensure there's space after the promotion box */
.product-promotion:last-child {
  margin-bottom: 15px;
}

/* Utility classes */
.huan-price del {
  opacity: 0.7;
}

.huan-price ins {
  text-decoration: none;
}

/* Common styles for all price boxes */
.tiet-kiem {
  font-size: 13px;
  color: #444;
  margin-top: 5px;
  margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gia-chi-con {
    font-size: 16px;
  }

  .phan-tram-km,
  .sale-badge,
  .flash-sale-badge {
    font-size: 12px;
    padding: 2px 6px;
  }
}

/* Styles for promotion box without price information */
.khung-gia:empty {
  margin-top: 0;
}

.mr-2 {
  margin-right: 8px;
}
