/* CONTAINER GRID */
.custom-offer-grid {
    display: grid;
    gap: 8px; /* Giảm gap để chứa nhiều cột hơn */
    margin: 30px auto;
    max-width: 1200px;
}

/* THIẾT LẬP SỐ CỘT */
.custom-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.custom-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.custom-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}
.custom-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}
.custom-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}


/* STYLE CHUNG CỦA CARD */
.offer-card {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* --- 1. CARD CÓ ẢNH (HAS-IMAGE) --- */

.offer-card.has-image {
    position: relative;
    color: white; 
}

/* TẠO ASPECT RATIO 1:1 CHO KHỐI ẢNH */
.card-image-aspect {
    width: 100%;
    /* Tỷ lệ 1:1 */
    padding-top: 100%; 
    background-size: cover;
    background-position: center;
    position: relative;
}

/* LỚP PHỦ NỘI DUNG (Overlay Content) */
.card-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); 
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-price {
    font-size: 16px;
    font-weight: normal;
    opacity: 0.8;
	margin-bottom: 0.5rem !important;
	font-family: "Space Mono", monospace;
	color: #D8AA49; 
}

/* --- 2. CARD KHÔNG CÓ ẢNH (NO-IMAGE/PRICING CARD) --- */

.offer-card.no-image {
    background-color: #F7F9F3; 
    border: 1px solid #558B2F; 
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
	font-family: "Space Mono", monospace;
}

.card-content-text {
    padding: 20px;
}
.offer-card.has-image .card-title{
	color: white;
}
.card-title-no-img {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.card-price-no-img {
    font-size: 20px;
    font-weight: 700;
    color: #D8AA49; 
}

/* Xử lý Responsive */

@media (max-width: 1024px) {
    /* Chuyển grid 5 và 6 cột xuống 4 cột */
    .custom-grid-5, 
    .custom-grid-6 {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    /* Chuyển tất cả các grid lớn hơn 2 về 2 cột */
    .custom-offer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .card-title, .card-title-no-img {
        font-size: 15px; /* Giảm font chữ */
    }
    .card-price, .card-price-no-img {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .custom-offer-grid {
        grid-template-columns: 1fr; /* 1 cột trên điện thoại */
    }
}