/*
 Theme Name:   Chothue
 Theme URI:    https://example.com/chothue
 Description:  Child Theme for Storefront
 Author:       Tên của bạn
 Author URI:   https://example.com
 Template:     storefront
 Version:      1.0
*/

/* Import CSS từ theme gốc */
@import url("../storefront/style.css");
.site-header{
    background-color:white;
}
.storefront-primary-navigation{
    background-color:#669933;
}
.homepage-custom {
	width:100%;
}
.col-full,
#content,
.site-content {
    max-width: 100% !important; 
    margin: 0 !important;     
    /*padding: 0 !important;   */
    box-sizing: border-box;   
}
.wrapper,
.container {
    max-width: 100% !important;
    margin: 0 !important;
    /*padding: 0 !important;*/
}

.site-header {
	 margin-bottom: 0 !important;
}
.widget_product_search form:not(.wp-block-search) input[type=search] {
    border-radius: 25px; /* Bo tròn góc của ô tìm kiếm */
   padding: 10px 15px; /* Thêm padding bên trong */
    padding-left: 30px; /* Thêm khoảng cách bên trái cho chữ */
    background: url('link-to-loupe-icon.png') no-repeat 10px center; /* Thêm biểu tượng kính lúp */
    background-size: 20px 20px; /* Kích thước biểu tượng */
}
/* Căn giữa tên danh mục */
.category-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 1em;
    color: #333;
}


 
/* Loại bỏ dấu chấm cho các sản phẩm trong vòng lặp của bạn */
.product-category-wrapper .products-grid {
    list-style-type: none;  /* Loại bỏ dấu chấm từ danh sách */
    padding: 0;
    margin: 0;
}

.product-category-wrapper .products-grid li {
    list-style-type: none;  /* Loại bỏ dấu chấm từ các thẻ <li> */
}

/* Thẻ bao bọc danh mục sản phẩm */
.product-category-wrapper {
    margin-bottom: 30px;
}

/* Tiêu đề danh mục sản phẩm */
.category-title {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 250%;
            font-weight: bold;
            color: #5C2200;
            margin: 20px 0;
            position: relative;
        }

        .category-title::before,
        .category-title::after {
            content: "";
            flex: 1;
            height: 1px;
            background: rgba(0, 0, 0, 0.2); /* Đường kẻ ngang mờ */
            margin: 0 10px; /* Khoảng cách giữa đường kẻ và tiêu đề */
        }

/* Thẻ bao bọc sản phẩm */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(20% - 16px); /* 5 sản phẩm trên 1 hàng */
    background-color: #f8f8f8;
    padding: 10px;
	border: 1px solid #fdc215;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    height: 400px; /* Cố định chiều cao của sản phẩm */
}

/* Điều chỉnh bố cục cho màn hình nhỏ hơn */
@media (max-width: 1024px) {
    .product-item {
        width: calc(25% - 16px); /* 4 sản phẩm trên 1 hàng */
    }
}

@media (max-width: 768px) {
    .product-item {
        width: calc(33.33% - 16px); /* 3 sản phẩm trên 1 hàng */
    }
}

@media (max-width: 480px) {
    .product-item {
        width: calc(50% - 16px); /* 2 sản phẩm trên 1 hàng */
    }
}

@media (max-width: 320px) {
    .product-item {
        width: 100%; /* 1 sản phẩm trên 1 hàng */
    }
}

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

/* Hình ảnh sản phẩm */
.product-image {
    margin-bottom: 15px;
    height: 200px; /* Cố định chiều cao cho hình ảnh */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Tên sản phẩm */
.product-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    min-height: 40px; /* Đảm bảo chiều cao đồng đều cho tên sản phẩm */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn tên sản phẩm tối đa 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Giá sản phẩm */
.product-price {
    font-size: 18px;
    color: #ED1C24;
	font-weight: bold;
    margin-bottom: 15px;
    min-height: 30px; /* Đảm bảo chiều cao đồng đều cho giá sản phẩm */
}

/* Nút thêm vào giỏ hàng */
.add-to-cart {
    margin-top: 10px;
	
}
.button {
	background-color:#669933;
	border-radius: 10px;
}
/* Nút xem thêm */
.view-more-products {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.view-more-products:hover {
    background-color: #005177;
}