* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    overflow-x: hidden; 
    background: #f0f2f5;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.menu-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.menu-links li {
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
    transition: 0.3s;
    font-size: 14px;
}

.container {
    height: 100vh;
    width: 100vw;
    position: relative;
    perspective: 2000px; 
}

.page {
    position: absolute;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f4f4f4;
    transition: all 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-origin: center;
    opacity: 0;
    visibility: hidden;
    transform: rotateY(90deg); /* Chỉnh lại góc quay để lật tự nhiên hơn */
    overflow-y: auto; 
    padding-top: 70px;
}

.page.active {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0deg);
    z-index: 5;
}

.hero {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.hero h1 { 
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 20px; 
    text-shadow: 2px 2px 15px rgba(0,0,0,0.7);
}

.product-grid {
    display: flex;
    gap: 20px;
    padding: 20px 50px;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.product-card {
    flex: 0 0 280px;
    scroll-snap-align: center;
    background: white;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 480px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
}

/* Modals */
.modal {
    display: none; /* Mặc định ẩn */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    border-radius: 15px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-x {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    font-size: 30px;
}

#checkout-modal input, 
#checkout-modal select, 
#checkout-modal textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .product-grid { padding: 20px; }
    .product-card { flex: 0 0 85%; }
}
/* Thanh tìm kiếm */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f1f1;
    border-radius: 20px;
    padding: 5px 12px;
    margin: 0 10px;
    flex: 1; /* Giúp thanh tìm kiếm giãn ra */
    min-width: 120px; /* Độ rộng tối thiểu để hiện chữ */
    border: 1px solid #ddd;
}

.search-container input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    padding: 8px 5px;
    font-size: 16px; /* Để điện thoại không bị tự động zoom */
    color: #333; /* Màu chữ hiển thị */
}

/* Fix lỗi trên mobile trong ảnh của bạn */
@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
        gap: 5px;
    }
    .menu-links li {
        font-size: 12px;
    }
    .search-container {
        max-width: 130px;
    }
}
