/* Category Page Styles - Trang danh mục coupon */

/* Featured stores - giảm kích thước */
.custom-feature-store .feature-store-row .feature-store-col ul li a {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.custom-feature-store .feature-store-row .feature-store-col ul li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-feature-store .feature-store-row .feature-store-col ul li a img {
    width: auto;
    max-width: 50px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

/* Coupon list - logo store hiển thị rõ ràng */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link {
    width: 80px;
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link .store-thumb {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link .store-thumb a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link .thumb-padding {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
}

/* Override object-fit: cover từ coupon-layout-fix.css */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat.has-thumb .store-thumb-link .thumb-padding img {
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Coupon item trong category - LAYOUT 1 HÀNG */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Grid layout cho coupon-cat-wrap - OVERRIDE flex từ style.css */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap {
    display: grid !important;
    grid-template-columns: 80px 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 15px;
    align-items: start;
    flex-direction: unset !important;
}

/* Logo - cột 1, hàng 1-2 (span 2 hàng) */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .store-thumb-link {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
}

/* Tiêu đề - cột 2, hàng 1 */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .latest-coupon {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .latest-coupon .coupon-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .latest-coupon .coupon-title a {
    color: #333;
    text-decoration: none;
    display: block;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .latest-coupon .coupon-title a:hover {
    color: #0066cc;
}

/* Mô tả - cột 2, hàng 2 (DƯỚI TIÊU ĐỀ) */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-des {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* Nút LẤY MÃ - cột 3, hàng 1-2 (span 2 hàng, center) */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-detail {
    grid-column: 3;
    grid-row: 1 / 3;
    margin: 0;
    align-self: center;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-button {
    white-space: nowrap;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

/* Footer meta - ngoài grid */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-bttom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-feature-store .feature-store-row .feature-store-col ul li a {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
    
    .custom-feature-store .feature-store-row .feature-store-col ul li a img {
        max-width: 40px;
        max-height: 40px;
    }
    
    /* Mobile: Logo | Tiêu đề, Mô tả, Nút */
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat {
        padding: 12px;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto auto;
        gap: 8px;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .store-thumb-link {
        width: 60px;
        height: 60px;
        min-width: 60px;
        padding: 8px;
        grid-row: 1 / 4;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link img {
        max-width: 44px;
        max-height: 44px;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .latest-coupon {
        grid-column: 2;
        grid-row: 1;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-des {
        grid-column: 2;
        grid-row: 2;
        font-size: 12px;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-detail {
        grid-column: 2;
        grid-row: 3;
    }
    
    .custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }
}


/* FORCE HIỂN THỊ LOGO - Chỉ set transparent cho child elements */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link .store-thumb,
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link .thumb-padding,
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link a {
    background-color: transparent !important;
    background-image: none !important;
}

/* Đảm bảo img luôn hiển thị */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .store-thumb-link img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Featured stores - Chỉ set transparent cho child */
.custom-feature-store .feature-store-row .feature-store-col ul li a img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* FORCE FIX - Tiêu đề full width */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .latest-coupon {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .latest-coupon h3.coupon-title {
    width: 100% !important;
    max-width: 100% !important;
}

.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .latest-coupon .coupon-title a {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: block !important;
}

/* FORCE FIX - Mô tả nằm DƯỚI tiêu đề */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-des {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: block !important;
}

/* FORCE FIX - Nút LẤY MÃ bên phải, center theo chiều dọc */
.custom-newest-coupon .cat-coupon-lists .coupon-list-cat .coupon-cat-wrap .coupon-detail {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
}
