/* Container chung */
.ah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Tự động chia cột, tối thiểu 300px */
    gap: 20px;
    margin-top: 15px;
}

/* Card thiết kế dạng hộp */
.bid-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Header Card (Ảnh + Tên) */
.bid-card-header {
    display: flex;
    gap: 15px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.bid-card-img img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.bid-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Body Card (Thông tin chi tiết) */
.bid-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-highlight {
    color: #d60000;
    font-size: 16px;
    font-weight: bold;
}

/* Footer Card (Nút bấm) */
.bid-card-footer {
    margin-top: auto; /* Đẩy xuống đáy */
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

 
        .bid-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 10px;
            margin: 10px 0;
            background: #f9f9f9;
        }

        .bid-his-bang th {
            padding: 12px 15px;
            text-align: left;
            background-color: #eef1f6;
            font-weight: 600;
            color: #555;
            font-size: 14px;
            border-bottom: 2px solid #ddd;
        }

        .bid-table tbody tr {
            background-color: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .bid-table tbody tr:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

        .bid-table td {
            padding: 15px;
            text-align: left;
            font-size: 14px;
            color: #333;
            border-bottom: none;
            vertical-align: middle;
        }

        .bid-table td[data-label="Ảnh"] {
            width: 120px;
        }

        .bid-table td[data-label=""] {
            font-weight: 500;
            line-height: 1.4;
            max-width: 350px;
            white-space: normal;
            word-break: break-word;
        }

        .bid-table td a {
            color: #007bff;
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .bid-table td a:hover {
            text-decoration: underline;
            color: #0056b3;
        }

        /* Status Badges */
        .bid-status {
            font-weight: bold;
            padding: 6px 12px;
            border-radius: 20px;
            display: inline-block;
            font-size: 12px;
            text-transform: uppercase;
            min-width: 90px;
            text-align: center;
        }

        .bid-status.red {
            color: #d32f2f;
            background: #ffebee;
        }

        .bid-status.green {
            color: #388e3c;
            background: #e8f5e9;
        }

        .bid-status.orange {
            color: #f57c00;
            background: #fff3e0;
        }

        .bid-status.sniper {
            color: #0056b3;
            background: #e3f2fd;
            border: 1px solid #b3d7ff;
        }

        .btn-cancel-sniper {
            display: inline-block;
            margin-top: 5px;
            padding: 4px 8px;
            font-size: 11px;
            color: #fff;
            background-color: #dc3545;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.2s;
            text-transform: none;
        }

        .btn-cancel-sniper:hover {
            background-color: #c82333;
        }

        .btn-cancel-sniper i {
            margin-right: 3px;
        }

        .sniper-warning {
            display: block;
            margin-top: 5px;
            font-size: 11px;
            color: #d63031;
            font-weight: bold;
            background: #fff5f5;
            padding: 3px 6px;
            border-radius: 4px;
            border: 1px dashed #d63031;
        }

        /* --- BẮT ĐẦU: SHOPEE STYLE TABS (BẢN HIỂN THỊ TẤT CẢ TRÊN MOBILE) --- */
        .ah-filter-tabs {
            display: flex;
            flex-wrap: wrap; /* Cho phép các tab rớt xuống dòng dưới nếu hết chỗ */
            gap: 8px 5px; /* Khoảng cách: 8px dọc (khi rớt dòng), 5px ngang */
            background-color: #ffffff;
            margin-bottom: 25px;
            padding-bottom: 10px;
            border-bottom: 1px solid #efefef;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }

        .ah-filter-tabs a {
            flex: 0 0 auto;
            padding: 10px 14px; /* Thu gọn padding lại một chút để hiển thị được nhiều tab hơn trên 1 dòng */
            text-decoration: none;
            font-weight: 500;
            font-size: 14px; /* Giảm size chữ một chút cho phù hợp mobile */
            color: #555555;
            background-color: #f9f9f9; /* Thêm nền nhạt để các tab tách bạch rõ ràng khi rớt dòng */
            border-radius: 4px; /* Bo góc nhẹ tạo cảm giác nút bấm mềm mại */
            border: 1px solid transparent;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px; 
        }

        .ah-filter-tabs a i {
            font-size: 15px;
            color: #888;
            transition: color 0.2s ease;
        }

        /* Hiệu ứng Hover cho Desktop */
        .ah-filter-tabs a:hover {
            color: #ee4d2d;
            background-color: #fff0ed; /* Nền cam nhạt Shopee */
            border-color: #ffc9be;
        }
        .ah-filter-tabs a:hover i {
            color: #ee4d2d;
        }

        /* Trạng thái Active (Đang chọn) */
        .ah-filter-tabs a.active {
            color: #ee4d2d;
            font-weight: 600;
            background-color: #fff0ed;
            border: 1px solid #ee4d2d; /* Đổi thành viền bọc quanh nút thay vì chỉ gạch chân để nổi bật hơn khi ở dạng lưới */
        }
        .ah-filter-tabs a.active i {
            color: #ee4d2d;
        }
        /* --- KẾT THÚC: SHOPEE STYLE TABS --- */

        .ah-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 25px;
            font-family: sans-serif;
        }

        .ah-pagination a,
        .ah-pagination span {
            padding: 8px 14px;
            margin: 0 4px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-decoration: none;
            color: #007bff;
            background-color: #fff;
        }

        .ah-pagination a:hover {
            background-color: #e9ecef;
        }

        .ah-pagination .current {
            background-color: #007bff;
            color: white;
            border-color: #007bff;
            font-weight: bold;
        }

        /* Hiệu ứng nhấp nháy cho phiên sắp kết thúc */
        @keyframes pulse-red {
            0% {
                box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
            }

            70% {
                box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
            }
        }

        .hurry-up {
            border: 1px solid #ffcccc !important;
            animation: pulse-red 2s infinite;
        }

        @media (max-width: 768px) {
            .bid-table {
                border-spacing: 0;
                background: none;
            }

            .bid-his-bang {
                display: none !important;
            }

            .bid-table tr {
                margin-bottom: 15px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                border: 1px solid #e0e0e0;
                display: block;
            }

            .bid-table td {
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-bottom: 1px solid #f1f1f1;
                padding: 10px 15px;
                text-align: right;
            }

            .bid-table td:last-child {
                border-bottom: none;
                flex-direction: column;
                align-items: flex-end;
            }

            .bid-table td::before {
                content: attr(data-label);
                font-weight: 600;
                color: #555;
                text-align: left;
                margin-right: 15px;
            }

            .bid-table td[data-label="Ảnh"] {
                padding: 15px;
                justify-content: center;
            }

            .bid-table td[data-label="Ảnh"]::before {
                display: none;
            }
        }

        /* Hiệu ứng nhấp nháy đỏ cho dòng sắp hết giờ */
        @keyframes pulse-red-bg {
            0% {
                background-color: #fff0f0;
            }

            50% {
                background-color: #ffe6e6;
            }

            100% {
                background-color: #fff0f0;
            }
        }

        /* Class này do s1-countdown-core.php tự động thêm vào khi < 300s */
        tr.hurry-up-row {
            animation: pulse-red-bg 2s infinite;
            border: 2px solid #dc3545 !important;
        }

        /* Đổi màu chữ bộ đếm khi gấp */
        tr.hurry-up-row .s1-timer {
            color: #dc3545 !important;
            font-size: 1.1em;
        }
		
		/* Làm nổi bật trạng thái Đã Thắng */
.bid-status.green {
    box-shadow: 0 0 5px rgba(56, 142, 60, 0.2);
}

/* Thêm badge nhỏ nếu là Đã thắng thật sự */
.status-won-badge {
    border: 1px solid #388e3c;
    background: #fff;
    color: #388e3c;
}

/* --- NÚT ĐẤU TIẾP & BỐ CỤC TRẠNG THÁI --- */
        .status-action-wrapper {
            display: flex;
            flex-direction: column-reverse; /* Desktop: Đẩy Status lên trên, Nút xuống dưới */
            gap: 8px;
            align-items: flex-start; 
        }

        .btn-bid-again {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            background-color: #ee4d2d; /* Cam Shopee */
            color: #ffffff !important;
            text-decoration: none !important;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 500;
            transition: background-color 0.2s ease;
            white-space: nowrap;
        }

        .btn-bid-again:hover {
            background-color: #d73d1f;
        }

        .btn-bid-again i {
            font-size: 12px;
        }

        @media (max-width: 768px) {
            .status-action-wrapper {
                flex-direction: row; /* Mobile: Nút bên trái, Status bên phải */
                align-items: center;
                justify-content: flex-end; /* Căn sát lề phải màn hình */
            }
            
            /* Căn chỉnh lại các extra html (ví dụ nút Hủy lệnh săn) trên mobile nếu có */
            .extra-status-html {
                width: 100%;
                text-align: right;
                margin-top: 8px;
            }
        }
		
    