/**
  Theme Name: Gifnestbuys exclusive interface
  Theme URI: https://gifnestbuys.com/
  Author: Vũ Tòng
  Author URI: https://gifnestbuys.com/
  Description: Giao diện tập trung tốc độ và tối ưu request
  Version: 1.0
*/
body {
  font-family: 'Poppins', sans-serif;
}

/** Loading **/
.simple-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #ccc;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 20px auto;
}

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

/* ==========================
   ✅ BUILD lại Bootstrap
   ========================== */
.btn-primary {
  background-color: #2d2d2d !important;
  border-color: #2d2d2d !important;
}

.btn-primary:hover {
  background-color: #2d2d2d !important;
  border-color: #000 !important;
}

.bg-primary {
  background-color: #2d2d2d !important;
}

.border-primary {
	border-color: #000 !important;
}

body .text-primary {
  color: #2d2d2d !important;
}

.badge.bg-primary {
  background-color: #2d2d2d !important;
}

.btn-outline-primary {
    --bs-btn-color: #2d2d2d;
    --bs-btn-border-color: #2d2d2d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2d2d2d;
    --bs-btn-hover-border-color: #2d2d2d;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #2d2d2d;
    --bs-btn-active-border-color: #2d2d2d;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #2d2d2d;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #2d2d2d;
    --bs-gradient: none;
}

.banner-wrapper {
  aspect-ratio: 16 / 6; /* hoặc 16 / 5 tùy thiết kế */
  overflow: hidden;
  position: relative;
  display: block;
}

/* Fallback cho trình duyệt không hỗ trợ aspect-ratio */
.banner-wrapper::before {
  content: "";
  display: block;
  padding-top: calc(100% * 6 / 16); /* fallback height = 37.5% */
}

.banner-wrapper img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================
   ✅ SẢN PHẨM – PRODUCT THUMBNAIL
   ========================== */
.product-thumb {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================
   ✅ LOGO FIX CLS
   ========================== */
.site-logo img {
  width: 120px;
  height: auto;
  display: block;
  max-width: 100%;
}

/* ==========================
   ✅ NAVBAR TRANSITION – GIẢM CLS DO MỞ MENU
   ========================== */
#pgNavbar {
  transition: height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

/* ==========================
   ✅ ẢNH LAZY LOAD AN TOÀN
   ========================== */
img[loading="lazy"] {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==========================
   ✅ Template CSS
   ========================== */
.fs-7 {
  font-size: 14px !important;
}

/* Bảo đảm căn giữa đúng và hover không bị rớt */
#main-menu .nav-item.dropdown {
  position: relative;
}

#main-menu .dropdown-menu.mega-menu {
    transform: translateX(-50%);       /* Căn giữa tuyệt đối */
	border: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 2rem;
    width: fit-content;                /* Bao vừa nội dung */
    max-width: 100vw;                  /* Không tràn màn hình */
    overflow-x: auto;                  /* Cho scroll ngang nếu quá dài */
    white-space: nowrap;               /* Không xuống hàng */
    z-index: 999;                      /* Đảm bảo menu nằm trên */
	font-size: 14px;
}

#main-menu .dropdown-menu.mega-menu h6 {
	font-size: 14px;
	text-align: center;
}

/* Row trong mega menu: không wrap và auto width */
#main-menu .mega-menu .row {
  flex-wrap: nowrap;
  width: auto;
}

/* Cột trong menu: chiều rộng tự co theo nội dung */
#main-menu .mega-menu .col {
  flex: 0 0 auto;
  width: auto;
  min-width: 180px;
}

/* Tăng vùng hover */
#main-menu .navbar .nav-item {
  padding-bottom: 8px;
}

#main-menu a.nav-link {
	color: #000;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0;
	padding: 5px 17.5px;
	text-transform: none;
}

#main-menu .navbar .dropdown-toggle:focus,
#main-menu .navbar .dropdown-toggle:active {
  outline: none;
  box-shadow: none;
}

#main-menu .navbar .dropdown-toggle {
  transition: background-color 0.2s ease-in-out;
}

#main-menu .navbar .dropdown-toggle:hover {
  background-color: rgba(0, 0, 0, 0.03); /* hiệu ứng nhẹ khi hover */
}

.dropdown-menu.mega-menu {
  left: 50% !important;
  transform: translateX(-50%);
  width: max-content;
  max-width: 100vw;
  min-width: 500px;
}

/* Dropdown menu 1 cấp */
.dropdown-basic {
  border: none;
  font-size: 14px;
  min-width: 180px;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Tắt viền khi focus */
.navbar .dropdown-toggle:focus,
.navbar .dropdown-toggle:active {
  outline: none;
  box-shadow: none;
}

/* Item */
.dropdown-basic .dropdown-item {
  padding: 0.6rem 1rem;
  transition: background-color 0.2s, color 0.2s;
  color: #333;
}

#navbarMegaMenu a.dropdown-item:active {
  background-color: #f8f9fa !important;
}

#navbarMegaMenu a.active {
  color: #1c4da1;
  background: none;
}

/* Mặc định: ẩn menu cơ bản (chỉ hiện mega) */
#navbarBasicMenu {
  display: none;
}

/* Dưới 992px: hiện menu cơ bản, ẩn mega */
@media (max-width: 991.98px) {
  #navbarMegaMenu {
    display: none !important;
  }
  #navbarBasicMenu {
    display: block;
  }
}

/* Mục menu chính */
#navbarSimpleMenu .nav-item {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 5px;
}

/* Menu cấp 2 */
#navbarSimpleMenu .nav-item ul {
  padding-left: 1rem;
  margin-top: 5px;
}

/* Liên kết */
#navbarSimpleMenu .nav-link {
  color: #333;
  padding: 0.5rem 1rem;
  display: block;
}

/* Hover & Active */
#navbarSimpleMenu .nav-link:hover,
#navbarSimpleMenu .nav-link.active {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  color: #3fbc1a;
}

#navbarSimpleMenu .nav-item:last-child {
	border: none;
}

@media (max-width: 767.98px) {
  .cart .quantity,
  .cart button {
    width: 100%;
  }
}

.tab-pane img {
    max-width: 100% !important;
    height: auto;
    display: block;
}
/** Header **/
#apiSearchInput.form-control:focus {
	border: none !important;
	box-shadow: none !important;
}

.placeholder {
  display: inline-block;
  height: 1em;
  background-color: #dee2e6;
  border-radius: 0.2rem;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.icon-links .nav-link i {
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.icon-links .nav-link:hover i {
  transform: scale(1.2);
}


.section-bg {
background: url('assets/img/section-bg.webp') center center no-repeat;
background-size: cover;
border-radius: 1rem;
}

.woocommerce-message {
	box-sizing: unset !important;
}

/** Carousel **/
.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

.carousel-scroll::-webkit-scrollbar {
  display: none;
}

.carousel-scroll .card {
  flex: 0 0 auto;
  width: 250px;
  scroll-snap-align: start;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #e1e1e1;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  z-index: 10;
  cursor: pointer;
  font-size: 24px;
}

.carousel-nav.prev {
  left: 0;
}

.carousel-nav.next {
  right: 0;
}

.img-wrapper {
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product_meta {
	display: none;
}

h1.product_title {
	font-size: 24px;
	margin-bottom: 0px;
}

.woocommerce-breadcrumb {
  display: inline-block;
  padding: 15px 0;
  border-radius: 6px;
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 10px;
  line-height: 1.6;
}

.woocommerce-breadcrumb a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
}

.woocommerce-breadcrumb a:hover {
  color: #000;
  text-decoration: none;
}

/* Loại bỏ dấu "/" sau phần tử cuối cùng */
.woocommerce-breadcrumb a:last-of-type::after {
  content: "";
}

/* Cart - cart_totals  */
.cart_totals {
    background-color: #f8f9fa;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: system-ui, sans-serif;
}

.cart_totals h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.cart_totals .shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 12px 0 !important;
    font-size: 0.95rem;
    vertical-align: top;
    color: #212529;
}

.cart_totals .cart-subtotal th,
.cart_totals .order-total th {
    font-weight: 500;
    color: #6c757d;
}

.cart_totals .order-total td {
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
}

.cart_totals .wc-proceed-to-checkout {
    margin-top: 20px;
}

.cart_totals .checkout-button, #place_order, .variant-btn {
    display: flex;
    width: 100% !important;
    background-color: #3fbc1a !important;
    color: #fff !important;
    text-align: center !important;
    font-weight: 600 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out !important;
    text-transform: uppercase;
    height: 55px !important;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
}

.cart_totals .checkout-button:hover {
    background-color: #339915;
}

.single_add_to_cart_button {
    display: flex;
	transform: translateY(-3px);
    color: #fff !important;
    text-align: center !important;
    font-weight: 600 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out !important;
    text-transform: uppercase;
    height: 55px !important;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    border: none;
}
.single_add_to_cart_button:hover {
	background-color: #005f87;
}

.quantity input {
	text-align: center;
    height: 50px;
    width: 100px;
    border: 1px solid #6b6b6b;
    border-radius: 5px;
    float: left;
    margin-right: 10px;
}

#product-filter ul li:hover {
	background-color: #f8f9fa;
	font-weight: 500;
	transition: background-color 0.2s ease-in-out;
}

#product-filter a.active {
    background-color: #e5e5e5;
    border-radius: 8px;
}

.aspect-3-4 {
  aspect-ratio: 3 / 4;
  height: auto;
  width: 100%;
  object-fit: cover;
}

.product-total {
	width: 105px;
	text-align: center;
}

.cart-subtotal td, .fee td {
	text-align: center;
}

.variant-radio:checked + .variant-radio-label {
    background-color: #383838 !important;
    border-color: #38383838 !important;
}

.variant-btn, .single_add_to_cart_button {
	width: 100% !important;
    background-color: #3fbc1a !important;
}

.variant-btn:hover, .single_add_to_cart_button:hover {
	transition: all 0.3s ease;
    background-color: #299f05  !important;
}
.single_add_to_cart_button {
    max-width: 82%;
}

@media only screen and (max-width: 767px) {
  .single_add_to_cart_button {
    max-width: 68%;
  }
}

.main-img {
  transition: opacity 0.4s ease-in-out;
}

.product-gallery-thumbs img.active {
  border: 2px solid #007bff;
}

#zoom-button {
  z-index: 2;
  font-size: 14px;
  padding: 0.25rem 0.5rem;
  width: 29px;
  height: 29px;
  background: #08080878;
  border: none;
  color: #fff;
}

#zoom-button:hover { 
  background: #000;
}

#lightboxModal .modal-dialog {
  margin: 40px auto; /* sẽ được cân bằng vì ảnh không chiếm full */
  max-width: fit-content;
  max-height: calc(100vh - 50px); /* thấp hơn chiều cao màn hình 100px */
}

#lightboxModal .modal-content {
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 100%;
}

#lightboxModal .modal-body {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 100%;
  overflow: auto;
}

#lightbox-image {
  border: 4px solid #fff;
  border-radius: 8px;
  max-width: 100%;
  max-height: calc(100vh - 100px); /* đảm bảo ảnh không cao quá */
  height: auto;
  width: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#productTabs .nav-item button {
	color: #000;
}

#productTabs .nav-item button.active {
	font-weight: bold;
}

.list-group-item.active {
	background-color: #3b3b3b;
}

.dashboard-account a {
	color: #000;
	text-decoration: none;
	font-weight: bold;
}

/* Shipping totals wrapper */
/* Shipping totals wrapper */
.woocommerce-shipping-totals {
  border: none;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

/* Table heading (e.g. Shipping) */
.woocommerce-shipping-totals th {
  font-weight: 600;
  font-size: 1rem;
  color: #000; /* black */
  padding-bottom: 0.75rem;
}

/* Table content cell */
.woocommerce-shipping-totals td {
  font-size: 0.95rem;
  color: #333; /* dark gray */
  padding-bottom: 0.75rem;
}

/* Shipping method list */
.woocommerce-shipping-methods {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.woocommerce-shipping-methods li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
}

.woocommerce-shipping-methods input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: #000; /* black radio button */
}

.woocommerce-shipping-methods label {
  margin-bottom: 0;
  font-weight: 500;
  color: #222; /* almost black */
  line-height: 1.4;
}

/* Destination text */
.woocommerce-shipping-destination {
  font-style: italic;
  color: #666;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

/* Change address link */
.shipping-calculator-button {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #000;
  text-decoration: underline;
  font-weight: 500;
}

.shipping-calculator-button:hover {
  color: #555;
}

/* Shipping calculator form */
.shipping-calculator-form {
  border: none;
  padding: 1rem;
  margin-top: 1rem;
}

.shipping-calculator-form label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: inline-block;
  color: #111;
}

.shipping-calculator-form .form-row {
  margin-bottom: 1rem;
}

.shipping-calculator-form input[type="text"],
.shipping-calculator-form select {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #aaa;
  border-radius: 5px;
  background-color: #fdfdfd;
  color: #111;
}

/* Update button */
.shipping-calculator-form .button {
  background-color: #000;
  border: none;
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
  font-weight: 500;
}

.shipping-calculator-form .button:hover {
  background-color: #333;
}
tr.shipping input:checked+label {
    font-weight: bold;
}
.kow-tip-update-btn:hover {
    background-color: #2d2d2d !important;
}
tr.fee th {
	color: #71757d !important;
    font-weight: 500;
}
tr.order-total th {
	font-weight: bold !important;
	color: #000 !important;
}

table.shop_table tr {
    border-bottom: 1px solid #d9d9d9;
	background: unset !important;
}

.cart-items a {
	color: #000 !important;
	font-weight: 500 !important;
}

a.ctn-shopping {
	font-weight: 400 !important;
}

.ctn-shopping:hover, #woocommerce-checkout-form-coupon > p > button:hover  {
	color: #fff !important;
	background-color: #2d2d2d;
}

table.shop_table td {
	text-align: right;
}

.shop_table tr.cart_item td, #shipping_method, table.shop_table h4, table.shop_table p, table.shop_table td div {
	text-align: left !important;
}

#woocommerce-checkout-form-coupon > p > button {
	color: #fff !important;
	background-color: #767676;
	border-color: #2d2d2d;
}

#payment ul.wc_payment_methods li.wc_payment_method label {
	font-weight: 500;
}

#payment ul.wc_payment_methods li.wc_payment_method label img {
    float: right;
    display: inline-block;
    margin-left: 4px;
}

#v-pills-tab a.nav-link {
	color:  #2d2d2d !important;
}

#v-pills-tab a.active {
    background-color: #2d2d2d !important;
	color: #fff !important;
}

p.price span.fw-bold .woocommerce-Price-amount {
	font-size: 35px;
    color: #e53737;
}

p.price span.text-muted .woocommerce-Price-amount {
    color: #888;
    font-size: 25px;
}

.sticky-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030; /* Đảm bảo menu nằm trên các phần tử khác */
  background-color: #fff; /* Thêm màu nền */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Thêm bóng */
  height: 50px;
  padding-right: 10px;
}

/* CSS cho menu con khi nó xuất hiện và đi cùng với sticky header */
.sticky-menu-content {
  position: fixed;
  top: 50px; /* Điều chỉnh giá trị này bằng chiều cao của sticky header */
  width: 100%;
  left: 0;
  z-index: 1029; /* Đảm bảo nó nằm dưới header */
}
.no-transition {
  transition: none !important; /* Tắt transition trên menu mobile */
}
.woocommerce-product-rating {
	display: none;
}
.cr-all-reviews-add-review {
	background-color: #383838 !important;
	color: #fff !important;
	border-radius: 8px;
}