/*
 Theme Name: ColorMag Pro Child
 Theme URI: https://themegrill.com/themes/colormag/
 Description: Theme con của ColorMag Pro
 Author: Namwindows
 Author URI: https://namwindows.com/
 Template: colormag-pro
 Version: 1.0.0
*/

/* CSS tùy chnh của bn thêm dưới ây */
/* ============ MENU RESPONSIVE ============ */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #333;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}
.menu-toggle::before {
  content: "\f0c9";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  transition: transform 0.3s ease, content 0.3s ease;
}
.menu-toggle.active::before {
  content: "\f00d";
  transform: rotate(90deg);
}
.menu-toggle.active {
  position: fixed;
  top: 0px;
  right: 0px;
  z-index: 1003;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 998;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0; left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding: 20px;
}
.mobile-menu.open {
  left: 0;
}
.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu-list li {
  border-bottom: 1px solid #eee;
}
.mobile-menu-list a {
  display: block;
  padding: 12px 10px;
  color: #333;
  text-decoration: none;
}
.mobile-menu-list a:hover {
  background: #f5f5f5;
}
.desktop-menu {
  display: block;
}
@media (max-width: 992px) {
  .desktop-menu { display: none; }
  .menu-toggle { display: block; }
}
.top-full-width-sidebar .widget-title, .footer-widgets-area .widget-title, .advertisement_above_footer .widget-title {
    border-bottom: 1px solid #778899;
    text-align: center;
    margin-top: 20px;
	
}
.top-full-width-sidebar .widget-title span, .advertisement_above_footer .widget-title span {
    background-color: #778899;
    font-family: Cambria;
    font-weight: 700;
    padding: 8px 40px 8px 40px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product h3 {
	font-family: Arial;
	font-size: 16px !important;
	color: #000;
	line-height: 1.3;
	font-weight: 700;
	width: 100%;
	border-left: 0px solid #fff;
	background: #fff;
	font-weight: 400;
	height: 80px;
	text-align: center;
}
.woocommerce ul.products li.product .price {
	height: 50px !important;
}
.woocommerce-Price-amount.amount {
	color: #e20000;
	font-size: 18px;
	font-weight: 700;
	font-family: Arial;
}
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
	font-family: Arial;
	font-size: 100%;
	font-weight: 700;
	border-radius: 3px;
	padding: 12px;
	color: #000;
	background-color: #778899;
	font-size: 11px;
	text-transform: uppercase;
	margin-bottom: 15px;
}
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    text-align: center;
    position: relative;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.7);
    margin-top: 20px;
    transition: transform 0.3s ease; /* Thêm hiệu ứng chuyển động */
}

.woocommerce ul.products li.product:hover, 
.woocommerce-page ul.products li.product:hover {
    transform: scale(1.05); /* Phóng to 5% khi hover */
}


.woocommerce ul.products li.product .woocommerce-loop-category__title {
	color: #000;
	font-family: Cambria;
	text-transform: uppercase;
	font-weight: 700;
	padding: 5px;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 80px;
}
.count {
	display: none;
}
.woocommerce div.product .product_title {
	font-family: Arial;
	font-size: 32px;
	font-weight: 700;
}
.woocommerce div.product div.summary .woocommerce-Price-amount.amount {
	color: #e20000;
	font-size: 38px;
	font-weight: 700;
	font-family: Arial;
}

.product_meta .sku_wrapper, .product_meta .posted_in {
	display: block;
}
.woocommerce div.product form.cart .variations td, .woocommerce div.product form.cart .variations th {
	font-family: Arial;
	color: #000;
	font-size: 16px;
	font-weight: bold;
	border-bottom: 1px solid #000;
	width: 100%;
}
th.label {
	background: #ccc;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	
	text-transform: uppercase;
}
.woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-contents {
	padding: 5px;
}
.woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-contents:hover {
	background: #E20000;
	color: #fff;
}
/* ====== FIX: đảm bảo ảnh tròn/vuông + hover hoạt động ====== */

/* chung cho tất cả ảnh trong slider */
.category-tags-container .swiper-slide img,
.category-tags-container .swiper-slide .tag-thumb img,
.tag-slider-style-circle .swiper-slide img,
.tag-slider-style-square .swiper-slide img,
.subcategories .subcategory-item img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    -o-object-fit: cover;
    border: 1px solid #ccc;
    margin: 0 auto 12px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-radius 0.2s ease;
    /* ưu tiên cao để ghi đè style khác */
}

/* kích thước subcategory */
.subcategories .subcategory-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

/* kiểu TRÒN (bắt buộc!) */
.tag-slider-style-circle .swiper-slide img,
.tag-slider-style-circle .tag-thumb img,
.tag-slider-style-circle .swiper-slide .tag-thumb img {
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    overflow: hidden !important;
}

/* kiểu VUÔNG */
.tag-slider-style-square .swiper-slide img,
.tag-slider-style-square .tag-thumb img,
.tag-slider-style-square .swiper-slide .tag-thumb img {
    border-radius: 8px !important;
}

/* hover effect: phóng to + bóng đổ cho cả tag và subcategory */
.category-tags-container .swiper-slide:hover .tag-thumb,
.category-tags-container .swiper-slide .tag-thumb:hover,
.subcategories .subcategory-item:hover {
    transform: scale(1.12);
    z-index: 5;
}

.category-tags-container .swiper-slide:hover img,
.category-tags-container .swiper-slide .tag-thumb:hover img,
.subcategories .subcategory-item:hover img {
    transform: scale(1.12);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

/* đảm bảo vùng chứa ảnh không phá layout */
.tag-thumb {
    display: inline-block;
    width: auto;
    height: auto;
    overflow: hidden;
    line-height: 0;
}

/* tên tag dưới ảnh */
.tag-name,
.category-tags-container .swiper-slide span {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* scrollbar */
.swiper-scrollbar, .category-tags-container .swiper-scrollbar {
    background-color: #E20000;
    height: 8px;
    margin-top: 10px;
    border-radius: 4px;
}
.swiper-scrollbar-drag { background-color:#ccc; height:100%; border-radius:4px; }

/* responsive small devices giảm kích thước */
@media (max-width:768px) {
    .category-tags-container .swiper-slide img,
    .tag-thumb img {
        width: 50px !important;
        height: 50px !important;
    }
    .subcategories .subcategory-item img {
        width: 60px !important;
        height: 60px !important;
    }
}
#content p {
	line-height: 1.6;
	margin-bottom: 15px;
	font-family: Arial;
	font-size: 17px;
}
/* === BẢNG GIỎ HÀNG === */
.custom-cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 30px;
}

.custom-cart-table th,
.custom-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle; /* Căn giữa theo chiều cao */
}

.custom-cart-table th {
    background: #f8f8f8;
    text-align: left;
    font-weight: 600;
}

/* Ảnh */
.custom-cart-table .product-thumbnail img {
    width: 70px;
    height: auto;
    border-radius: 6px;
    display: block;
}

/* Remove button */
.remove-item {
    color: #ff4d4d;
    font-size: 22px;
    text-decoration: none;
    font-weight: bold;
}

.remove-item:hover {
    color: #d40000;
}

/* === CĂN GIỮA NÚT SỐ LƯỢNG === */
.custom-cart-table .product-quantity input[type="number"],
.custom-cart-table .product-quantity .qty {
    height: 38px;
    text-align: center;
}

/* === VÙNG TỔNG TIỀN === */
.custom-cart-totals {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    max-width: 420px;
    margin-left: auto;
    margin-top: 20px;
}

.totals-table {
    width: 100%;
    margin-bottom: 20px;
}

.totals-table th {
    text-align: left;
    padding: 10px 0;
}

.totals-table td {
    text-align: right;
    padding: 10px 0;
    font-weight: 600;
}

/* === NÚT CHECKOUT TÙY CHỈNH === */
.custom-checkout-btn {
    display: block;
    text-align: center;
    background: #ff6a00;
    color: #fff !important;
    padding: 15px 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.25s;
    width: 100%;
}

.custom-checkout-btn:hover {
    background: #e45c00;
}

/* Thêm theo yêu cầu của bạn */
.custom-checkout-btn a {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

/* === BUTTON UPDATE CART === */
.update-cart-btn {
    background: #ff6a00;
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: 6px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.update-cart-btn:hover {
    background: #000;
}

/* === CĂN GIỮA THEO CHIỀU CAO CHO TOÀN DÒNG === */
.custom-cart-item td {
    vertical-align: middle;
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 768px) {

    .custom-cart-table thead {
        display: none;
    }

    .custom-cart-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        padding: 10px;
        border-radius: 6px;
    }

    .custom-cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 5px;
    }

    .product-thumbnail img {
        width: 60px;
    }

    .custom-cart-totals {
        max-width: 100%;
    }
}
/* Layout 2 cột */
.custom-checkout-wrapper {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}
.checkout-left, .checkout-right {
    width: 50%;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgb(0 0 0 / 45%);
}

/* Tiêu đề */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.woocommerce #payment #place_order, .woocommerce-page #payment #place_order {
	padding: 15px 40px 15px 40px;
    font-size: 18px;
    background: #dd0000;
}
/* Form fields */
.wide-field input,
.wide-field select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: 0.2s;
    font-size: 16px;
    margin-top: 5px;
}
.wide-field input:focus,
.wide-field select:focus {
    border-color: #4b9cff;
    box-shadow: 0 0 0 3px rgba(77,155,255,0.15);
}

.field-note {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
    display: block;
}

/* Checkbox */
.create-account-checkbox {
    margin-top: 15px;
}

/* Order review box */
.checkout-right #order_review {
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
}

/* Responsive */
@media(max-width: 768px){
    .custom-checkout-wrapper {
        flex-direction: column;
    }
    .checkout-left, .checkout-right {
        width: 100%;
    }
}

/* --- MY ACCOUNT TABS STYLE --- */
.myaccount-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.myaccount-tabs .myaccount-tab {
    padding: 10px 20px;
    background: #eee;
    color: #333;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #ddd;
    transition: 0.25s;
}
.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    margin: 0 auto !important;
}
.myaccount-tabs .myaccount-tab:hover {
    background: #d9534f;
    color: #fff;
}

.myaccount-tabs .is-active {
    background: #dd0000 !important;
    color: #fff !important;
    border-color: #dd0000;
}

