@import url(./root.css);

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

body {
    margin: 0;
    font-family: sans-serif;
    color: #334155;
    background: linear-gradient(120deg, #f5d1bd 0%, #f3c3cf 100%);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-image: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
}

.navbar-container {
    width: 90%;
    max-width: 1152px;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.logo {
    font-size: 24px;
    letter-spacing: 0.05em;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
}

.logo-accent {
    color: #3b82f6;
}

.mobile-menu-btn {
    color: #3b82f6;
    font-size: 24px;
    font-weight: 600;
    display: block;
}

.nav-links {
    display: none;
    color: #334155;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.nav-links li {
    letter-spacing: 0.05em;
}

.nav-icons {
    display: none;
    align-items: center;
    gap: 16px;
}

.nav-icon {
    cursor: pointer;
    font-size: 20px;
}

i#gio-hang-icon, a#gio-hang-open i{
    position: relative;
    text-align: center;
}

i span.so-luong-gio-hang {
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 12px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 12px;
    background: red;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
}

.close-sidebar-btn {
    color: #dc2626;
    font-size: 24px;
    font-weight: 600;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    padding-left: 24px;
    padding-top: 16px;
    gap: 24px;
    flex: 1;
    font-size: 18px;
    color: #1e293b;
}

.sidebar-links li {
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.sidebar-footer {
    position: relative;
    overflow: hidden;
}

.sidebar-footer-bg {
    position: absolute;
    inset: 0;
    background-color: #3b82f6;
    filter: blur(16px);
}

.sidebar-footer-content {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    font-size: 18px;
    color: #1e293b;
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Content Styles */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-wrapper {
    width: 90vw;
    max-width: 1152px;
}

.page-title {
    font-size: 24px;
    color: #1e3a8a;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.05em;
    margin: 0;
}

.divider {
    border-bottom: 1px solid #e2e8f0;
    height: 12px;
}

.products-section {
    margin: 32px 0;
}

.products-grid {
    display: grid;
    gap: 32px 32px;
}

/* Filters Styles */
.filters {
    position: sticky;
    z-index: 999;
    top: 47px;
    background: #f5d1bd;
    padding-bottom: 12px;
}

#tim-kiem-input {
    padding: 8px;
    background-color: #f8fafc;
    border-radius: 4px;
    /* width: 100%; */
    margin-bottom: 16px;
    letter-spacing: 0.1em;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-title {
    font-size: 20px;
    font-family: 'Arial', sans-serif;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

#danh-muc-select {
    background-color: #f8fafc;
    font-size: 14px;
    border-radius: 4px;
    padding: 4px;
}

.price-value {
    color: #334155;
}

.price-slider {
    width: 100%;
}

.clear-btn {
    text-transform: capitalize;
    background-color: #b91c1c;
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
}

/* Products Display Styles */
.products-display {
    flex: 1;
}

.display-controls {
    display: flex;
    align-items: center;
    gap: 32px;
    color: #334155;
}

.view-buttons {
    display: flex;
    gap: 8px;
    color: white;
}

.view-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 18px;
}

.grid-view {
    background-color: black;
    color: white
}

.list-view {
    background-color: white;
    color: black;
    border: 1px solid rgba(0, 0, 0, 0.7);
}

#so-luong-mon {
    text-transform: capitalize;
}

.divider-line {
    border-top: 1px solid #e2e8f0;
    flex: 1;
}

.sort-form {
    display: flex;
    gap: 8px;
}

.sort-select {
    background-color: #f8fafc;
    border-radius: 4px;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .navbar-container {
        display: flex;
        align-items: center;
    }

    .navbar-header {
        justify-content: flex-start;
    }

    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .nav-icons {
        display: flex;
    }

    .logo {
        font-size: 28px;
    }

    .page-title {
        font-size: 28px;
    }

    .filter-group{
        margin-bottom: 4px;
    }

    .products-grid {
        grid-template-columns: 200px 1fr;
    }

    .display-controls{
        gap: 16px;
    }
}




/* === DANH SÁCH MÓN ĂN === */
.danh-sach-mon-an {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: var(--do-rong-max);
    margin: auto;
    padding: 20px;
}

/* === MÓN ĂN === */
.mon-an {
    position: relative;
    background: white;
    padding: 15px;
    border-radius: var(--bo-goc);
    box-shadow: var(--do-bong);
    text-align: center;
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
}


/* === HÌNH ẢNH MÓN ĂN === */
.mon-an img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--bo-goc);
}

/* === TÊN MÓN ĂN === */
.ten-mon {
    font-size: 20px;
    color: var(--mau-chu-dao);
    margin: 10px 0;
}

/* === MÔ TẢ MÓN === */
.mo-ta-mon {
    font-size: 14px;
    color: var(--mau-phu);
    margin-bottom: 8px;
}

/* === GIÁ MÓN === */
.gia-mon {
    font-size: 18px;
    font-weight: bold;
    color: var(--mau-nut);
}

/* Nút "Thêm vào giỏ hàng" */
.them-vao-gio {
    background-image: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: var(--bo-goc);
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    margin-top: 10px;
}

.them-vao-gio:hover {
    background-color: var(--mau-nut);
    transform: scale(1.05);
}


.mon-an .hover-mon{
    position: absolute;
    top: 8%;
    right: 8%;
    opacity: 0;
    visibility: hidden;
}

.mon-an:hover .hover-mon{
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 1;
    visibility: visible;
}

.mon-an .hover-mon button.tim-kiem-tuong-tu,
.mon-an .hover-mon button.them-1-vao-gio{
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    transform: translate(100%, 0%);
    transition: all 0.6s ease;
}

.mon-an .hover-mon button.them-1-vao-gio{
    transition: all 0.8s ease;
}

.mon-an:hover .hover-mon button {
    transform: translate(0%, 0%);
}

form {
    display: flex
;
    flex-direction: row;
    gap: 0px;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}



/* === FOOTER === */
footer {
    min-height: 250px;
    background: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
    color: var(--mau-nen);
    padding: 20px 0;
    text-align: center;
    box-shadow: var(--do-bong);
}

.footer-container {
    max-width: var(--do-rong-max);
    margin: auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px;
}

.footer-info,
.footer-social,
.footer-map {
    flex: 1;
    min-width: 250px;
    padding: 10px;
}

.footer-social a {
    color: var(--mau-diem-nhan);
    text-decoration: none;
    font-weight: bold;
}

.footer-social a:hover {
    color: var(--mau-nut);
}

.footer-bottom {
    margin-top: 15px;
    font-size: 14px;
    color: var(--mau-phu);
}




/* === modal / popup === */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1002;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Khi mở modal */
.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 25px;
    width: 40%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

/* Khi modal mở thì nội dung trượt xuống */
.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    cursor: pointer;
    color: #555;
    transition: color 0.2s ease;
}

.close:hover {
    color: red;
}

/* Group input và label trên cùng một hàng */
.input-group, .output-group {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.input-group label, .output-group label {
    flex: 1;
    font-weight: bold;
    margin-right: 10px;
    text-align: left;
}

.input-group input, .output-group input {
    flex: 9;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* Input bị khóa */
.input-group input[disabled], .output-group input[disabled]{
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}
.output-group img{
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}
.output-group label{
    flex: 3;
}
.output-group input{
    flex: 7;
}

/* Nút */
.modal-content button {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition:  0.3s ease-in-out;
    color: white;
    background: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
}

.modal-content button:hover{
    transform: scale(1.1);
}

#btn-cap-nhat {
    background: #28a745;
}
#btn-logout {
    background: #dc3545;
}

.fly-item {
    position: fixed;
    z-index: 1000;
    font-size: 24px;
    transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out;
}



#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1004;
}

#gio-hang-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1005;
    width: 300px;
    text-align: center;
}

#gio-hang-modal ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    max-height: 250px;
    overflow-y: auto;
}

#gio-hang-modal li {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

#gio-hang-modal button#dat-mon {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition:  0.3s ease-in-out;
    color: white;
    background: linear-gradient(-45deg, #FFC796 0%, #FF6B95 100%);
}

.hidden {
    display: none !important;
}

/* === ĐẶT MÓN MODAL === */
#dat-mon-modal {
    max-width: 800px;
    width: 90vw;
    height: 70vh;
    background: var(--mau-nen);
    border-radius: var(--bo-goc);
    box-shadow: var(--do-bong);
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    border: 2px solid var(--mau-chu-dao);
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1006;
    transform: translateX(-50%) translateY(-50%);
}

#dat-mon-modal h2 {
    color: var(--mau-chu-dao);
    font-size: 22px;
    margin-bottom: 15px;
}

#dat-mon-modal label {
    display: flex;
    font-weight: bold;
    color: var(--mau-chu);
    margin-bottom: 10px;
    cursor: pointer;
    align-items: center;
}

#dat-mon-modal input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
}

#dat-mon-modal input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--mau-chu-dao);
    border-radius: var(--bo-goc);
    font-size: 16px;
    outline: none;
    background: white;
    transition: border-color 0.3s ease-in-out;
    margin-bottom: 12px;
}

#dat-mon-modal input:focus {
    border-color: var(--mau-nut);
}

/* Định dạng cho input bị disabled */
#dat-mon-modal input:disabled {
    background-color: #eee;
    color: #777;
    cursor: not-allowed;
}

#dat-mon-modal button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: var(--bo-goc);
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, transform 0.2s;
}

#xac-nhan-dat-mon {
    background-color: var(--mau-nut);
    color: white;
    margin-bottom: 10px;
}

#xac-nhan-dat-mon:hover {
    background-color: darkred;
    transform: scale(1.05);
}

#huy-dat-mon {
    background-color: var(--mau-diem-nhan);
    color: var(--mau-chu);
}

#huy-dat-mon:hover {
    background-color: rgb(255, 150, 100);
    transform: scale(1.05);
}