/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0
*/
/* Grid tin tức - 1 row với scroll ngang */

/* Header CSS */

/* Test margin by CSS the site content class */
#content.site-content {
  padding-top: 86px;
  /* mobile50px /tablet 60px/ AStra/WP: mobile upto 767, tablet upto 1024  chưa tính bị wrap menu link*/
}

@media (max-width: 1024px) {
  #content.site-content {
    padding-top: 60px;
  }
}
@media (max-width: 767px) {
  #content.site-content {
    padding-top: 60px;
  }
}

.site-header {
  position: fixed;
  width: 100%;
}
.news-grid {
  display: flex;
  flex-wrap: nowrap; /* Không wrap xuống hàng */
  align-items: flex-start; /* Card không stretch cao bằng nhau */
  gap: 20px;
  /* margin: 0 -10px; */
  overflow-x: auto; /* Lăn ngang */
  padding: 10px 0;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #ccc transparent; /* Firefox */
  scroll-behavior: smooth; /* Smooth scroll */
}
.news-grid::-webkit-scrollbar {
  height: 6px; /* Chiều cao scrollbar */
}
.news-grid::-webkit-scrollbar-track {
  background: transparent;
}
.news-grid::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.news-grid::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.news-grid-item {
  width: calc(30.3% - 20px);
  min-width: 300px;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s, box-shadow 0.3s;
  background: white;
  padding-bottom: 16px;
  position: relative;
  display: flex;
  flex-direction: column; /* Đảm bảo nội dung xếp dọc */
  height: auto; /* Tự động theo nội dung */
}
.news-grid-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 123, 170, 0.18);
}
.news-grid-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 2px 8px rgba(0, 123, 170, 0.08);
  transition: filter 0.3s;
  filter: brightness(0.98) contrast(1.05);
}
.news-grid-item:hover img {
  filter: brightness(1.05) contrast(1.1) saturate(1.1);
}
.news-grid-item h2 {
  font-size: 20px;
  margin: 16px 16px 8px 16px;
  font-weight: 700;
  color: #1a355b;
  letter-spacing: 0.5px;
}
.news-grid-item p {
  font-size: 15px;
  margin: 0 16px;
  color: #3a4a5d;
  line-height: 1.6;
}
.news-grid-item a.read-more {
  display: inline-block;
  margin: 0 16px;
  padding: 8px 20px;
  background: var(--ast-global-color-0);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 123, 170, 0.08);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
  z-index: 1;
}
.news-grid-item a.read-more::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  /* overlay màu sáng hơn, chỉnh alpha hoặc đổi màu nếu cần */
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
  z-index: 0;
}
.news-grid-item a.read-more:hover {
  box-shadow: 0 4px 16px rgba(0, 123, 170, 0.18);
}
.news-grid-item a.read-more:hover::before {
  width: 100%;
}
.news-grid-item .news-date {
  margin: 0 16px 12px 16px;
  font-size: 13px;
  color: #7a8ca3;
  font-style: italic;
  letter-spacing: 0.2px;
}

/* Horizontal scroll tin nổi bật */
.news-scroll {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 10px 0;
}
.news-scroll-item {
  min-width: 300px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
}
.news-scroll-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
.news-scroll-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  padding: 2px;
}
.news-scroll-item h3 {
  font-size: 16px;
  margin: 10px;
}
.news-scroll-item a.read-more {
  display: block;
  margin: 0 10px 10px;
  color: #0073aa;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 1024px) {
  .news-grid-item {
    width: calc(50% - 20px);
  }
}
@media (max-width: 600px) {
  .news-grid-item {
    width: 100%;
    border-radius: 12px;
  }
  .news-grid-item img {
    border-radius: 12px 12px 0 0;
    height: 140px;
  }
  .news-scroll-item {
    min-width: 80%;
  }
}

/* Flash sale countdown */
#flash-countdown {
  display: flex;
  align-items: center;
  justify-content: right;
  font-family: Arial, sans-serif;
}

.flash-sale-label {
  font-size: 18px;
  font-weight: bold;
  color: #b30000; /* đỏ đậm */
  margin-right: 10px;
}
.countdown-box {
  background-color: #b30000; /* đỏ đậm */
  color: rgb(255, 255, 255);
  font-size: 20px;
  font-weight: bold;
  padding: 4px;
  border-radius: 6px;
  margin: 0 4px;
  text-align: center;
  perspective: 1000px;
  transition: transform 0.6s ease;
}

.colon {
  font-size: 24px;
  color: rgb(125, 125, 125);
  margin: 0 2px;
  font-weight: bold;
}

/* Tag onsale - Shopee style ribbon */
.onsale {
  max-height: 24px !important;
  min-height: 24px !important;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  background-color: #b30000 !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 0;
  margin: 1em -0.6em 0 0 !important;
  border-radius: 2px !important;
  border: none;
  /* Ribbon shape */
  width: 70px;
  height: 24px;
  line-height: 24px !important;
  text-align: center;

  /* Shadow và border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);

  /* Animation */
  transition: all 0.3s ease;
}

.flashsale__bottom {
  margin-bottom: 10px;
  text-align: left;
  padding: 0 5px;
}

.flashsale__label {
  font-size: 14px;
  color: #ff4d4f;
  font-weight: 600;
  margin-bottom: 4px;
}

.flashsale__progressbar {
  width: 98%;
  height: 10px;
  background: #ebebeb;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.flashsale___percent {
  height: 100%;
  width: 0%;
  background-color: #ff4d4f;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.25) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: flashsaleStripes 1s linear infinite;
  border-radius: 9999px;
}

/* Hiệu ứng sọc chạy */
@keyframes flashsaleStripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}

/* Product CSS */

/* Price CSS */
.price {
  height: 38px;
}

.regular-price {
  /* margin-right: 5px; */
  font-size: 0.9em;
  color: #888;
  text-decoration: line-through;
  display: block;
}

.contact-price,
.sale-price {
  /* margin-left: 5px; */
  font-size: 1.3em;
  color: red;
  font-weight: bold;
}
.star-rating span:before {
  color: #f4c150 !important;
}

.ast-woo-product-category {
  display: none !important;
}
.woocommerce-js ul.products li.product .woocommerce-loop-product__title {
  height: 40px;
  line-height: 21px;
  overflow: hidden;
}

.products li {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.products li:hover {
  transform: scale(1.05); /* Phóng to 5% */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Bóng nhẹ khi hover */
  z-index: 2;
  position: relative;
}

/* Bo tròn cho card sản phẩm */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  border-radius: 15px;
  /* overflow: hidden; */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: #fff;
  margin-bottom: 40px;
  padding-bottom: 5px;
}

/* Hiệu ứng hover cho card */
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Bo tròn cho hình ảnh sản phẩm */
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
  border-radius: 15px 15px 0 0;
  transition: transform 0.3s ease;
}

/* Hiệu ứng zoom cho hình ảnh */
.woocommerce ul.products li.product:hover .woocommerce-loop-product__link img {
  /* transform: scale(1.05); */
}

/* Styling cho nội dung card */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-weight: 600;
  margin: 15px 0 10px;
  color: #333;
  transition: color 0.3s ease;
  margin: 0;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
  color: #007cba;
}

/* Bo tròn cho nút Add to Cart - Ẩn button mặc định */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
  display: none !important; /* Ẩn button mặc định */
}

/* Custom hover actions container - Simple & Clean */
.woocommerce ul.products li.product {
  position: relative;
  /* overflow: hidden; */
  transition: all 0.3s ease;
}

.product-hover-actions {
  position: absolute !important;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  display: flex;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 20;
}

.woocommerce ul.products li.product:hover .product-hover-actions {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

/* Action buttons với Global Color */
.product-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--ast-global-color-0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
  color: var(--ast-global-color-0) !important;
  font-size: 16px;
  backdrop-filter: blur(5px);
}

.product-action-btn:hover {
  background: var(--ast-global-color-0);
  color: white !important;
  box-shadow: 0 4px 15px rgba(4, 107, 210, 0.4);
}

/* Font Awesome Icons cho buttons */
.product-action-btn .icon-eye::before,
.product-action-btn .icon-cart::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 14px;
  display: inline-block;
  text-align: center;
  line-height: 1;
  transform: none !important; /* Bỏ hiệu ứng nghiêng */
}

.product-action-btn .icon-eye::before {
  content: "\f06e"; /* fa-eye */
}

.product-action-btn .icon-cart::before {
  content: "\f07a"; /* fa-shopping-cart */
}

/* Hiệu ứng overlay đơn giản */
.woocommerce ul.products li.product::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: rgba(0, 0, 0, 0.05); */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: 15px;
}

.woocommerce ul.products li.product:hover::before {
  opacity: 1;
}

/* Đảm bảo content vẫn clickable */
.woocommerce ul.products li.product > * {
  position: relative;
  z-index: 2;
}

/* Quick View Modal - Modern & Responsive */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.quick-view-modal.active {
  opacity: 1;
  visibility: visible;
}

.quick-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.quick-view-content {
  position: relative;
  max-width: 1200px;
  max-height: 90vh;
  margin: 5vh auto;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.9) translateY(50px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.quick-view-modal.active .quick-view-content {
  transform: scale(1) translateY(0);
}

.quick-view-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-view-close:hover {
  background: #f8f9fa;
  color: #333;
  transform: scale(1.1);
}

.quick-view-body {
  padding: 0;
  max-height: 90vh;
  overflow-y: auto;
}

/* Quick View Product Layout */
.quick-view-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.quick-view-left {
  padding: 40px;
  /* background: #f8f9fa; */
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.quick-view-right {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

/* Product Images */
.product-images-container {
  max-width: 100%;
}

.main-image {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.main-product-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.main-image:hover .main-product-image {
  transform: scale(1.05);
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnail-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  opacity: 0.7;
}

.thumbnail-image:hover,
.thumbnail-image.active {
  opacity: 1;
  border-color: var(--ast-global-color-0);
  transform: scale(1.1);
}

/* Product Summary */
.product-summary {
  flex: 1;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.3;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.rating-count {
  color: #666;
  font-size: 14px;
}

.product-price {
  font-size: 24px;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 20px;
}

.product-short-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 15px;
}

.product-meta {
  margin-bottom: 30px;
}

.meta-item {
  display: flex;
  margin-bottom: 8px;
  font-size: 14px;
}

.meta-label {
  font-weight: 600;
  min-width: 120px;
  color: #2c3e50;
}

.meta-value {
  color: #666;
}

.meta-value.in-stock {
  color: #27ae60;
}

.meta-value.out-of-stock {
  color: #e74c3c;
}

/* Add to Cart Section */
.add-to-cart-section {
  margin-bottom: 30px;
}

.quantity-cart-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.quantity-input {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #f8f9fa;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
}

.qty-btn:hover {
  background: #e9ecef;
  color: #333;
}

.qty-input {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  background: white;
}

.add-to-cart-btn {
  flex: 1;
  height: 48px;
  background: var(--ast-global-color-0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(4, 107, 210, 0.3);
}

.view-full-details {
  color: var(--ast-global-color-0);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.3s ease;
  margin-left: 5px;
}

.view-full-details:hover {
  color: var(--ast-global-color-1);
}

/* Product Tabs */
.product-tabs {
  border-top: 1px solid #eee;
  padding-top: 30px;
  margin-top: 20px;
}

.tab-nav {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 8px;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.tab-btn.active,
.tab-btn:hover {
  /* color: var(--ast-global-color-0); */
  border-bottom-color: var(--ast-global-color-0);
}

.tab-content {
  max-height: 300px;
  overflow-y: auto;
}

.tab-panel {
  display: none;
  line-height: 1.6;
  color: #666;
}

.tab-panel.active {
  display: block;
}

.product-attributes {
  width: 100%;
  border-collapse: collapse;
}

.product-attributes tr {
  border-bottom: 1px solid #eee;
}

.attribute-label {
  padding: 12px 20px 12px 0;
  font-weight: 600;
  color: #2c3e50;
  width: 150px;
  vertical-align: top;
}

.attribute-value {
  padding: 12px 0;
  color: #666;
}

.reviews-summary {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.average-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rating-number {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
}

.total-reviews {
  color: #666;
  font-size: 14px;
}

/* Prevent body scroll when modal open */
body.quick-view-open {
  overflow: hidden;
}

/* Loading state cho buttons */
.product-action-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.product-action-btn.loading::before {
  content: "⏳";
  animation: spin 1s linear infinite;
}

.product-action-btn.added {
  background: #28a745 !important;
  color: white !important;
  border-color: #28a745 !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Hiệu ứng cho giá */
.woocommerce ul.products li.product .price {
  font-weight: 700;
  /* font-size: 1.1em; */
  color: #e74c3c;
  margin: 10px 0;
}

/* Animation loading cho card */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.woocommerce ul.products li.product {
  animation: fadeInUp 0.6s ease forwards;
}

/* Responsive design */
@media (max-width: 768px) {
  .woocommerce ul.products li.product {
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__link img {
    border-radius: 10px 10px 0 0;
  }

  /* Mobile responsive cho hover actions */
  .product-hover-actions {
    bottom: 10px;
    gap: 6px;
  }

  .product-action-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  /* Quick View Mobile Responsive */
  .quick-view-content {
    margin: 2vh auto;
    max-height: 96vh;
    border-radius: 12px;
  }

  .quick-view-product {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .quick-view-left,
  .quick-view-right {
    padding: 25px;
  }

  .quick-view-left {
    background: white;
    order: 1;
  }

  .quick-view-right {
    order: 2;
    background: #f8f9fa;
  }

  .product-title {
    font-size: 22px;
  }

  .product-price {
    font-size: 20px;
  }

  .quantity-cart-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .quantity-input {
    justify-content: center;
    align-self: flex-start;
  }

  .add-to-cart-btn {
    width: 100%;
  }

  .tab-nav {
    gap: 15px;
    flex-wrap: wrap;
  }

  .tab-btn {
    font-size: 14px;
    padding: 8px 0;
  }

  .tab-content {
    max-height: 200px;
  }

  .attribute-label {
    width: 120px;
    font-size: 14px;
  }

  .attribute-value {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .quick-view-content {
    margin: 1vh auto;
    max-height: 98vh;
  }

  .quick-view-left,
  .quick-view-right {
    padding: 20px;
  }

  .product-action-btn {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .quick-view-close {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .product-thumbnails {
    gap: 8px;
  }

  .thumbnail-image {
    width: 50px;
    height: 50px;
  }

  .meta-label {
    min-width: 100px;
    font-size: 13px;
  }

  .meta-value {
    font-size: 13px;
  }
}

/* Breadcrums Custom */

.woocommerce-js .woocommerce-breadcrumb {
  margin-bottom: 0 !important;
  font-size: 1em;
  text-transform: uppercase;
  font-weight: bold;
}

/* CSS  phần list sp*/

.category-home-container {
  padding: 0 !important;
}
.category-home-heading {
  padding: 20px 0 10px 0;
}

.category-home-heading.elementor-widget-heading h2.elementor-heading-title {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 6px solid var(--ast-global-color-0);
}
.category-home-product-list {
}

.woocommerce-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === Hiệu ứng LÓE SÁNG, PHÁT SÁNG & GẠCH CHÂN ĐỘNG cho tiêu đề Sale (v4) === */
.sale-title-home {
  display: inline-block;
  font-weight: 800;
  text-transform: uppercase;
  position: relative;
  overflow: visible; /* Đổi thành visible để thấy gạch chân bên ngoài */
  padding-bottom: 12px; /* Thêm khoảng trống cho gạch chân */
  /* Animation phát sáng trắng */
  animation: subtle-glow 2.5s infinite ease-in-out;
}

/* Gạch chân động (animated underline) */
.sale-title-home::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* Nằm ngay dưới padding */
  width: 100%;
  height: 6px;
  /* Dải màu gradient - sử dụng màu chủ đạo của theme */
  background: linear-gradient(
    90deg,
    #b40502,
    #b40502,
    rgba(255, 229, 144, 0.8),
    #b40502,
    #b40502
  );
  background-size: 200% 100%;
  border-radius: 3px;
  /* Animation quét gradient */
  animation: sweep-gradient 3s linear infinite;
}

/* Lớp lóe sáng (shimmer) chạy ngang trên chữ */
.sale-title-home::after {
  content: "";
  position: absolute;
  top: 0;
  transform: translateX(-100%);
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: shimmer 3s infinite;
  animation-delay: 1s;
}

/* Keyframes cho hiệu ứng shimmer (lướt sáng) */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Keyframes cho hiệu ứng phát sáng trắng tinh tế */
@keyframes subtle-glow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  }
  50% {
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.8);
  }
}

/* Keyframes cho hiệu ứng quét gradient của gạch chân */
@keyframes sweep-gradient {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* =================================================================
 * 13. MOBILE ACTION BUTTONS FOR PRODUCT CARDS
 * ================================================================= */

/* 1. Container cho mobile action buttons - Ẩn mặc định trên desktop */
.mobile-action-buttons {
  display: none;
  margin-top: 12px;
  padding: 0 15px 15px;
  gap: 8px;
  justify-content: space-between;
}

/* 2. Styling cho từng button */
.mobile-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 42px;
}

/* 3. Quick View Button */
.mobile-quick-view {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ast-global-color-0);
  border: 1.5px solid var(--ast-global-color-0);
}

.mobile-quick-view:hover {
  background: var(--ast-global-color-0);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 4. Add to Cart Button */
.mobile-add-to-cart {
  background: var(--ast-global-color-0);
  color: white;
  border: 1.5px solid var(--ast-global-color-0);
}

.mobile-add-to-cart:hover {
  background: var(--ast-global-color-1);
  border-color: var(--ast-global-color-1);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(4, 107, 210, 0.3);
}

/* 5. Contact Button */
.mobile-contact {
  background: #28a745;
  color: white;
  border: 1.5px solid #28a745;
}

.mobile-contact:hover {
  background: #218838;
  border-color: #218838;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* 6. Icon styling */
.mobile-action-btn i {
  font-size: 14px;
  flex-shrink: 0;
}

/* 7. Text styling */
.mobile-action-btn .btn-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* 7.1. Loading và success states cho mobile buttons */
.mobile-action-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.mobile-action-btn.loading i {
  animation: spin 1s linear infinite;
}

.mobile-action-btn.added {
  background: #28a745 !important;
  border-color: #28a745 !important;
  color: white !important;
}

.mobile-action-btn.added i:before {
  content: "\f00c" !important; /* checkmark icon */
}

/* 8. Media Queries - Hiển thị trên tablet và mobile */
@media (max-width: 1024px) {
  /* 8.1. Hiển thị mobile action buttons */
  .mobile-action-buttons {
    display: flex;
    flex-wrap: wrap;
  }

  /* 8.2. Ẩn hover actions trên thiết bị cảm ứng */
  .product-hover-actions {
    display: none !important;
  }

  /* 8.3. Override nút add-to-cart mặc định ẩn để tránh xung đột */
  .woocommerce ul.products li.product .button,
  .woocommerce ul.products li.product .add_to_cart_button {
    display: none !important;
  }

  /* 8.4. Đảm bảo card có đủ không gian và styling nhất quán */
  .woocommerce ul.products li.product {
    padding-bottom: 0;
  }

  /* 8.5. Đảm bảo mobile buttons không bị ảnh hưởng bởi hover effects */
  .woocommerce ul.products li.product:hover {
    transform: translateY(-3px); /* Giảm hiệu ứng hover cho mobile */
  }
}

/* 9. Responsive cho màn hình nhỏ */
@media (max-width: 480px) {
  .mobile-action-btn {
    padding: 8px 6px;
    font-size: 12px;
    min-height: 38px;
  }

  .mobile-action-btn i {
    font-size: 13px;
  }

  .mobile-action-btn .btn-text {
    font-size: 11px;
  }

  .mobile-action-buttons {
    gap: 6px;
    padding: 0 12px 12px;
  }
}
/* Custom product on mobile */
@media (max-width: 544px) {
  .ast-container .woocommerce ul.products:not(.elementor-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


.hidden {
  display: none !important;
}
