
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}


nav {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    margin-bottom: 0;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #2575fc;
    background-color: rgba(37, 117, 252, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #2575fc;
    left: 50%;
    bottom: 0;
    transition: all 0.3s ease;
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

.pro-list {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}


.pro-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 300px; 
    min-height: 500px; 
    margin-bottom: 1.5rem;
}

.pro-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}


.pro-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pro-card:hover img {
    transform: scale(1.05);
}

.pro-card h2, .pro-card .card-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 1.2rem 1.2rem 0.5rem;
    font-weight: 600;
    min-height: 3rem; 
}

.pro-card p, .pro-card .card-text {
    color: #666;
    margin: 0 1.2rem;
    flex-grow: 1;
    min-height: 4rem; 
}

.pro-card .text-danger {
    color: #e74c3c;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.5rem;
    min-height: 2rem; 
}


.pro-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pro-card .mt-auto {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Buy Button */
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    margin: 1.2rem;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
}

.button4 {
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    position: relative;
    overflow: hidden;
}

.button4:hover {
    background: linear-gradient(to right, #2980b9, #1a252f);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.button4:active {
    transform: translateY(0);
}

/* Rating */
.rating {
    margin: 0.5rem 1.2rem;
    min-height: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pro-list {
        justify-content: space-around;
    }
    
    .pro-card {
        width: 280px;
    }
}

@media (max-width: 992px) {
    .pro-card {
        width: 250px;
        min-height: 480px;
    }
    
    .pro-card img {
        height: 200px;
    }
    
    .pro-card h2, .pro-card .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
    
    .pro-list {
        padding: 2rem 1rem;
        gap: 1.5rem;
    }
    
    .pro-card {
        width: 100%;
        max-width: 350px;
        min-height: auto;
    }
    
    .pro-card img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .pro-card {
        width: 100%;
        min-height: auto;
    }
    
    .pro-card h2, .pro-card .card-title {
        font-size: 1.2rem;
    }
    
    .button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Animation cho các sản phẩm */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pro-card {
    animation: fadeIn 0.5s ease forwards;
}

.pro-card:nth-child(1) { animation-delay: 0.1s; }
.pro-card:nth-child(2) { animation-delay: 0.2s; }
.pro-card:nth-child(3) { animation-delay: 0.3s; }
.pro-card:nth-child(4) { animation-delay: 0.4s; }
.pro-card:nth-child(5) { animation-delay: 0.5s; }
.pro-card:nth-child(6) { animation-delay: 0.6s; }


.row.g-4.pro-list {
    display: flex !important;
    flex-wrap: wrap;
}

.row.g-4.pro-list .col-lg-4,
.row.g-4.pro-list .col-md-6,
.row.g-4.pro-list .col-sm-12 {
    display: flex;
    justify-content: center;
}

/* Đảm bảo tất cả card có cùng chiều cao */
.height-fixer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pro-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pro-card .card-text {
    flex-grow: 1;
}


.badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}