

@media (max-width: 767px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cột đều nhau */
    gap: 30px; /* Khoảng cách giữa các sản phẩm */
  }

  .woocommerce ul.products.columns-4 li.product,
  .woocommerce-page ul.products.columns-4 li.product,
  .woocommerce ul.products.columns-3 li.product,
  .woocommerce-page ul.products.columns-3 li.product {
    width: 100%; /* Bỏ width thủ công khi dùng grid */
    margin: 0;    /* Bỏ margin vì dùng gap */
  }
}

ul.products::before, ul.products::after {
  display: none !important;
}

.product-sales-count {
    color: rgb(137 137 137);
    font-size: 0.9rem;
    letter-spacing: -0.5px;
}
ul.products {
  margin-top: 2rem !important;
}

ul li .star-rating{
text-align: left;
width: 100%;
}

.woocommerce .onsale,
.woocommerce .wc-block-grid__product-onsale,
.onsale {
    position: absolute !important;
    top: 6px !important;
    left: 6px !important;
    padding: 1px 4px 0;
    font-size: .725rem;
    /*  */
    background: rgba(255, 204, 0, 0.25); /* đỏ nhạt */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

ul.products li.product img, ul.products .wc-block-grid__product img, .wc-block-grid__products li.product img, .wc-block-grid__products .wc-block-grid__product img {
    display: block;
    margin: 0 auto .525rem;
}

ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .price {
    text-align: left;
}

ul.products li.product a.button.add_to_cart_button,
ul.products li.product a.button.product_type_grouped,
ul.products li.product a.product_type_variable,
ul.products li.product a.product_type_external {
    position: absolute;
    right: 0;
    bottom: 10px;
    width: 28px;
    height: 26px;
    padding: 0 0px 3px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    background: #9E150B;
    color: #fff;
    font-size: 1.125rem;
}

.woocommerce form.checkout {
    display: block !important;    
}

/* Input, select */
.woocommerce form.checkout input.input-text,
.woocommerce form.checkout textarea,
.woocommerce form.checkout select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #333;
}

.woocommerce-billing-fields__field-wrapper {
    display: flex; 
    flex-direction: column;
    gap: 10px;
}

.woocommerce-ordering {
    display: inline-block;
    position: relative;
}
  
.woocommerce-ordering select.orderby {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 5px 40px 5px 15px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23666' d='M70 90L40 60h60z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    font-family: Averta, sans-serif;
}

.woocommerce-ordering select.orderby:focus {
    border-color: #0071a1;
    box-shadow: 0 0 0 2px rgba(0, 113, 161, 0.2);
    outline: none;
}

.woocommerce-pagination .next::after,
.woocommerce-pagination .prev::after {
    display: none;
}

/* Product sorting section styling */
.storefront-sorting {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
  
.storefront-sorting > * {
    margin: 0; /* Remove extra margins */
    padding: 0; /* Avoid outer padding */
}
  
/* Positioning of elements in the sorting bar */
.storefront-sorting .woocommerce-ordering {
    flex: 0 0 auto;
}
  
.storefront-sorting .woocommerce-result-count {
    flex: 1 1 auto;
    text-align: center;
}
  
.storefront-sorting .woocommerce-pagination {
    flex: 0 0 auto;
    text-align: right;
}
  
/* Pagination styling */
.woocommerce-pagination .page-numbers {
    /* Flexbox layout for pagination numbers */
    display: flex;
    gap: 6px; /* Space between pagination items */
    margin: 0;
    padding: 0;
}
  
/* Remove default borders from pagination */
.pagination, 
.woocommerce-pagination {
    border: none !important;
}

ul.order_details li {
    padding: 0px 20px;
    font-size: .8em;
    text-transform: uppercase;
    display: flex
;
    gap: 20px;
    align-items: center;
}
.woocommerce-order-details .woocommerce-table.woocommerce-table--order-details {
    background: #f1f1f1;
    border-radius: 6px;
}

.woocommerce-order-details .woocommerce-table.woocommerce-table--order-details tr td,
.woocommerce-order-details .woocommerce-table.woocommerce-table--order-details th td,
.woocommerce-order-details .woocommerce-table.woocommerce-table--order-details tr th {
    padding: 6px 12px;
}

.woocommerce-order h2 {
    font-weight: 700;
    font-size: 1.425rem;
    margin-top: 2rem;
}

.woocommerce-order address {
    padding: 1rem;
    background: #f1f1f1;
    border-radius: 6px;
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 10px;
}



/* .woocommerce form.cart button[type="submit"] {
    color: #fff;
    width: auto !important;
    margin-top: 0;
    padding: 6px 10px;
    border-radius: 6px;
} */

.product_title.entry-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.225rem;
    text-align: left;
}

.storefront-sticky-add-to-cart__content-button.button {   
    color: #fff;    
    padding: 6px 10px;
    border-radius: 6px;
}
.woocommerce-loop-product__title{
    margin-bottom:  2px;
}
.product-rating-and-sales{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;    
    margin-bottom: 8px;
}
.product-rating-and-sales .star-rating {
    max-width: 76px;
    margin: 0 !important;
    text-align: left;
}

/* .order_review th,
.order_review td {
    padding: 6px 12px;
    border: none;
}    */

.checkout-product-thumb {
    width: 36px;
    height: 36px;
}

#order_review table td,
  #order_review  table th {
    padding: .4rem .5rem;
    text-align: left;
    vertical-align: top;
}

.woocommerce-checkout-review-order-table th.product-name,
.woocommerce-checkout-review-order-table td.product-name {
  width: 100%;
}

.woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout-review-order-table td.product-total {
  width: 30%;
  min-width: 100px;
  text-align: right !important;
}

.checkout-product-row,
.product-name {
    display: flex;
    gap: 5px;
}

#order_review  tfoot tr td {
    text-align: right !important;
}

.storefront-sorting {
    margin-bottom: 0px ;
}
/*  */
.wc_payment_methods {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 14px; /* thu nhỏ chữ */
  }
  
  .wc_payment_method {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
  }
  
  
  .payment_methods.methods label {
    padding: 0 !important; 
    font-size: 1rem;
    margin: 0;
    font-size: 1.125rem;
  }
  .payment_box {
    padding: 0 !important; 
    font-size: .925rem;
    background: transparent !important;
    margin-top: 10px;
    color: #6d6d6d;
  }
  #payment .payment_methods li:last-child:not(.woocommerce-notice) {
    padding:  15px;    
}
  
  .wc_payment_method input.input-radio {
    display: none; /* đã ẩn sẵn */
  }

  #payment .place-order {
    padding: 0;
    margin: 0;
    float: none;
    width: 100%;
}

.woocommerce-additional-fields h3 {
    display: none;
}

.woocommerce input,
.woocommerce textarea{
    font-family: Averta, sans-serif;
}
.woocommerce .form-row label {
    margin-bottom: 4px;
}

.woocommerce-info{
    background-color: #2D45EE !important; /* nền nhẹ */    
    padding: 12px 16px 12px 68px;
    margin: 16px 0;
    font-size: 1rem;
    color: #fff;
    border-radius: 6px;
    position: relative;
    border: dashed 1.5px #ffffff;
    
  }
  
  .woocommerce-info::before {
    content: "🎟️";
    /* margin-right: 0px; */
    left: 20px;
    top: 10px;
    font-size: 2rem;
    line-height: 1;
  }
  
  .woocommerce .showcoupon {
    display: inline-block;    
    color: #ffd500!important;        
    border-radius: 2px;
    text-decoration: none;    
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .woocommerce .showcoupon:hover {    
    transform: translateY(-2px);
    text-decoration: none;
    color: #efc700!important;     
  }
  
  .showcoupon:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
  }
  
  .woocommerce form.checkout_coupon .clear{display: none !important;}
  .woocommerce form.checkout_coupon {
    flex-direction: row;
  }
  .woocommerce form.checkout_coupon .form-row.form-row-last button.button,
  .woocommerce form.checkout_coupon .form-row.form-row-first {
    margin: 0 !important;
    margin-right: 0 !important;
  }
  .woocommerce form.checkout_coupon button.button[type="submit"] {
    background: #efc700 !important;
    color: #2D45EE !important;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  .woocommerce form.checkout_coupon .form-row.form-row-first {
    width: 70%;
  }
  .woocommerce form.checkout_coupon .form-row.form-row-last {
    width: 30%;
  }
  .__woo_coupon_wrapper .woocommerce-info {
    margin-bottom: 8px;
  }
  @media (min-width: 768px) {
  }

  .order-total td, .order-total th {
    color: #ef6879;
  } 

  button#place_order {
    background: #2d45ee;
    color: #efc700;
    font-size: 1.125rem !important;
    font-weight: 500;
    text-transform: uppercase;
    font-family: Averta, sans-serif;
    transition: background-color 0.3s ease, transform 0.2s ease;

  }
  button#place_order:hover {
    transition: background-color 0.3s ease, transform 0.2s ease;
    background: #efc700;
    color: #2d45ee;
  }
  button#place_order:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
  }

  .single-product div.product p.price {
    margin: 0.41575em 0;
}

  
  .single-product div.product form.cart button[type="submit"] {
    background: #9E150B !important;
    color: #fff !important;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;    
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: Averta, sans-serif;
  }

  
  /* Ẩn dấu mũi tên trên input type=number ở Chrome, Safari */
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

  .woocommerce form.cart {
    flex-direction: row;
    display: flex;
    justify-content: space-between;
    
  }

  .single-product div.product form.cart .quantity-wrapper {
    max-width: 140px;
    /* padding-right: 10px; */
  }

  .single-product div.product form.cart .quantity .qty {
    color: #9E150B;
    font-size: 1.125rem;
    font-weight: 700;
  }
  .woocommerce form.cart > * {
    margin: 0 !important;
    padding: 0;
    flex: 1;
  }

  form.cart .quantity {
    display: inline-flex;
    align-items: center;
    position: relative;
  }
  
  form.cart .quantity button.plus,
  form.cart .quantity button.minus {
    width: 36px;
    height: 36px;
    position: absolute;
    padding: 3px 12px;
    color: #9E150B;
    background: #fff;
    border: none;    
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
  }

  form.cart .quantity button.plus{
    top: 2px;
    right: 2px;
  }
  form.cart .quantity button.minus{
    top: 2px;
    left: 2px;
  }
  

  form.cart button.single_add_to_cart_button {
    background: #9E150B !important;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
    form.cart button.single_add_to_cart_button:hover {        
        background: #980d03 !important;
        transition: background-color 0.3s ease, transform 0.2s ease;
        transform: translateY(-1px);
    }


    @media (min-width: 768px) {
      /* .storefront-breadcrumb {
          padding: 0.21575em 0;
      } */
  }

  .price del {
    font-size: 15px;
  }

  ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobile mặc định: 2 cột */
  gap: 30px; /* Khoảng cách giữa các item */
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.products li.product {    
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  margin-bottom: 2rem!important;
  margin: 0 !important;
}
ul.products li.product .woocommerce-loop-product__title{
  font-weight: 600;
}
ul.products li.product:hover .woocommerce-loop-product__title{
  color: #9E150B;
}
ul.products li.product:hover img{
  /* border: solid 1px #cbcbcb; */
  /* box-shadow: #8d8d8d 0px 0px 10px; */
  transform: scale(1.05);
  transition: all 0.3s ease;
}
@media (min-width: 600px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr); /* Tablet: 3 cột */
  }
}

@media (min-width: 1024px) {
  ul.products {
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 cột */
  }
}
ul.products li.product .price ins, ul.products .wc-block-grid__product .price ins, .wc-block-grid__products li.product .price ins, .wc-block-grid__products .wc-block-grid__product .price ins {
     margin-left: 0;}


  /* Thanks You Message  */
  .coffee-shop-thankyou {
    background: #2D45EE !important;
    border: 2px dashed #fff;
    padding: 24px;
    border-radius: 16px;
    margin: 30px auto;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  .coffee-shop-thankyou h2,
  .coffee-shop-thankyou h3 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
  }
  
  .coffee-shop-thankyou p {
    margin: 0 0 20px;
  }
  
  .coffee-shop-thankyou ul,
  .coffee-shop-thankyou ol {
    margin: 0 0 20px;
    padding-left: 20px;
  }
  
  .coffee-shop-thankyou ul {
    list-style: none;
    padding-left: 0;
  }
  
  .coffee-shop-thankyou ul li,
  .coffee-shop-thankyou ol li {
    margin-bottom: 6px;
  }
  
  .coffee-shop-thankyou ul li strong {
    display: inline-block;
    min-width: 180px;
    color: #fff;
  }
  
  .coffee-shop-thankyou a {
    color: #0077aa;
    text-decoration: underline;
  }
  
  .coffee-shop-thankyou img.emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
  }
  
  /* Divider giữa các phần */
  .coffee-shop-thankyou h3:not(:first-of-type) {
    border-top: 2px dashed #fff;
    padding-top: 16px;
    margin-top: 24px;
  }
  

  /* Cài đặt chung cho các loại thông báo Woo */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
    margin: 0 0 2.5em 0;
    padding: 10px 12px 10px 40px;
    background-color: #f0f0f0;
    color: #333;
    border: dashed 1.5px #333;
    border-radius: 6px;
    clear: both;
    position: relative;
    list-style: none;
}

/* Icon chung */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    content: 'ℹ️'; /* mặc định icon info */
    position: absolute;
    left: 1em;
    top: 1em;
    font-size: 1.2em;
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before, .woocommerce-noreviews::before, p.no-comments::before {
    color: #333;
    top: 10px;
    left: 15px;
}

#review_form #respond {
  padding: 0;
  margin-top: 30px;
}

#review_form .comment-form-comment textarea{
  max-height: 120px;
  border-radius: 6px;
  margin-top: 10px;
}
#commentform {
  padding-top: 20px;
  border-top: dashed 1.5px #8d8d8d;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 6px;
  background: #f1f1f1;
}
#commentform .review-image-upload {
  order: 1;
}
#commentform .form-submit {
  order:2
}
p.stars.selected a.active:before, p.stars:hover a:before, p.stars.selected a:not(.active):before, p.stars.selected a.active:before {
    color: #FFA200;
}
#commentform   p.stars a { 
    height: 26px;
    width: 26px;
}
#commentform  p.stars a::before {
  font-size: 1.325rem;
}
#review_form .form-submit input[name="submit"] {
  background: #9E150B !important;
  color: #fff !important;
  padding: 4px 30px;
  border-radius: 6px;
  font-weight: 500;    
  transition: background-color 0.3s ease, transform 0.2s ease;

}
#review_form .comment-form-rating {
    display: flex;
    justify-content: space-between;
}
@media screen and (max-width: 767px) {
   #review_form .comment-form-rating {
    flex-direction: column;
    gap: 20px;
}
  
}

#reviews .commentlist li{
  margin-bottom: 1rem;
}

#reviews .commentlist li p.meta {
    margin-bottom: .5em;
}
#reviews .commentlist li .avatar {    
    width: 40px !important;
    height: 40px;   
        margin-right: 10px !important;
    }
#reviews .commentlist li  .comment_container {
  display: flex;
  flex-direction: row;
}
#reviews .commentlist li.review .comment-text{
    padding: .5rem;
    border-radius: 6px;
    background-color: #EEF0F3;
}
#reviews .commentlist ul.children {
  padding-top: 10px !important;
}

textarea#comment {    
    background: #fff;
}

p.comment-notes {
  font-size: 13px;
}

/* Icon riêng cho từng loại */
.woocommerce-message::before {
    content: '✅';
}
.woocommerce-info::before {
    content: 'ℹ️';
}
.woocommerce-error::before {
    content: '⚠️';
}


.woocommerce .product .woocommerce-tabs.wc-tabs-wrapper {
  border-top: solid 1px #f1f1f1;
}

.woocommerce .product .woocommerce-tabs.wc-tabs-wrapper .woocommerce-Tabs-panel h2 {
  font-size: 1.225rem;
  font-weight: 600;
  color: #980d03;
}

 .woocommerce .product .tabs.wc-tabs li {
  border: none !important;
 }

 .woocommerce .product .tabs.wc-tabs li a{
  padding: 10px 20px;
  background: #EEF0F3;
  color: #333;
  border-radius: 4px;
  margin-bottom: 10px;
 }
 .woocommerce .product .tabs.wc-tabs li.active a{
  padding: 10px 20px;
  background: #9E150B;
  color: #fff !important;
 }

 .woocommerce .product .tabs.wc-tabs li.active::after{
  color: #fff !important;
 }