﻿/* General Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header-top {
    padding: 0 !important;
   
}
h2.fw-bold {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 0;
    font-family: 'Segoe UI', sans-serif;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

    .form-select:focus {
        border-color: #007bff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    }

/* Empty State */
.alert-info {
    background-color: #e7f3ff;
    border: none;
    border-radius: 12px;
    padding: 2rem;
    font-size: 1.1rem;
}

    .alert-info .text-primary {
        font-weight: 600;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .alert-info .text-primary:hover {
            color: #0056b3;
        }

    .alert-info .fas {
        color: #6c757d;
    }

/* Product Card */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

    .badge.bg-danger {
        background-color: #dc3545 !important;
    }

    .badge.bg-secondary {
        background-color: #6c757d !important;
    }

/* Card Body */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Price */
.text-danger.fw-bold {
    font-size: 1.2rem;
    color: #dc3545;
}

.text-dark.fw-bold {
    font-size: 1.2rem;
    color: #1a1a1a;
}

.text-muted.del {
    font-size: 0.9rem;
    color: #adb5bd;
}

.text-warning {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffc107;
}

/* Buttons */
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

    .btn-outline-primary:hover {
        background-color: #007bff;
        color: #fff;
        transform: scale(1.05);
    }

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

    .btn-primary:hover {
        background-color: #0056b3;
        border-color: #0056b3;
        transform: scale(1.05);
    }

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: #fff;
        transform: scale(1.05);
    }

.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

    .btn-outline-info:hover {
        background-color: #17a2b8;
        color: #fff;
        transform: scale(1.05);
    }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

    .btn-secondary:hover {
        background-color: #5a6268;
        border-color: #5a6268;
    }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-card {
        min-height: auto;
    }

    .product-image {
        height: 150px;
    }

    .card-title {
        font-size: 1rem;
    }

    .btn-sm {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    h2.fw-bold {
        font-size: 1.5rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem;
    }

    .form-select {
        width: 100%;
    }

    .btn-outline-danger {
        width: 100%;
    }
}

/* Cấu hình khung sản phẩm */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    height: 400px; /* Đảm bảo chiều cao khung sản phẩm đồng đều */
}

.product-image {
    position: relative;
    overflow: hidden;
    display: flex; /* Thêm display: flex để căn giữa hình ảnh */
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
}

    .product-image img {
        object-fit: cover; /* Đảm bảo hình ảnh bao phủ hết không gian mà không bị méo */
        object-position: center center; /* Căn giữa hình ảnh trong khung */
        transition: transform 0.3s ease;
    }

/* Cấu hình ảnh sản phẩm trong card */
.card-img-top {
    width: 100%; /* Đảm bảo hình ảnh chiếm toàn bộ chiều rộng của khung */
    height: 150px; /* Cố định chiều cao của hình ảnh */
    object-fit: cover; /* Đảm bảo hình ảnh bao phủ hết không gian mà không bị méo */
    display: block; /* Giúp cho ảnh không bị tràn ngoài khung */
    object-position: center; /* Căn giữa hình ảnh trong khung */
}




/* Đảm bảo tên và mô tả sản phẩm không bị tràn */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cấu hình cảnh báo khi không có sản phẩm yêu thích */
.alert-info {
    border-radius: 12px;
    background-color: #f0f8ff;
    border: 1px solid #b0d8f1;
}


/* Đảm bảo các phần tử trong card-body căn chỉnh đều và ngang hàng */
.card-body {
    display: flex;
    justify-content: space-between; /* Phân bổ đều các nút */
}



/* Các nút hover styles */
.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

    .btn-outline-primary:hover {
        background-color: #007bff;
        color: white;
    }

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: white;
    }

.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

    .btn-outline-info:hover {
        background-color: #17a2b8;
        color: white;
    }

/* Cấu hình tiêu đề sản phẩm */
.card-body .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

/* Cấu hình mô tả sản phẩm */
.card-body .card-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Cấu hình phần tiêu đề và nút trong header */
.d-flex {
    gap: 10px;
}

    .d-flex select,
    .d-flex button {
        border-radius: 8px;
    }

    .d-flex select {
        font-size: 1rem;
    }

h2.fw-bold.text-dark {
    font-size: 2rem; /* Tăng kích thước chữ */
    color: #343a40; /* Màu chữ tối */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Bóng đổ nhẹ cho chữ */
    font-weight: bold; /* Đảm bảo chữ đậm */
    padding-bottom: 10px; /* Khoảng cách dưới tiêu đề */
    border-bottom: 2px solid #007bff; /* Đường kẻ dưới tiêu đề */
    transition: all 0.3s ease; /* Thêm hiệu ứng chuyển động */
}

    h2.fw-bold.text-dark:hover {
        color: #007bff; /* Đổi màu khi hover */
        text-shadow: 2px 2px 10px rgba(0, 123, 255, 0.3); /* Làm bóng đổ nổi bật khi hover */
        transform: scale(1.05); /* Phóng to tiêu đề khi hover */
    }

