@font-face {
    font-family: 'Poppins';
    src: url('../font/Poppins-Regular.ttf');
    font-weight: normal;
    font-style: normal;
}

body {
    background-color: #E3E8EB;
    margin: 0 auto;
    padding-top: 20px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    max-width: 1440px;
}

.header {
    width: 100%;
    max-width: 1440px;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    overflow: visible;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 24px;
}


.deliveryBtn {
    display: flex;
    background-color: #E3E8EB;
    padding: 4px;
    border-radius: 50px;
}

.deliveryBtn button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 50px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deliveryBtn button.active {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.greenPoint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #000000;
}

.greenPoint img {
    width: 18px;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.basket-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.basket-img {
    width: 24px;
    height: auto;
}

#basketCounter {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #0FA958;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

.login {
    display: flex;
    align-items: center;
    gap: 12px;
}

#signIn {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

#createacc {
    background-color: #0FA958;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#createacc:hover {
    background-color: #0d8a48;
}


.layout {
    background-color: white;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 13px rgba(0, 0, 0, 0.15);
}

.layout-body {
    height: auto;
    min-height: 100%;
}

/* =============================== */
/* 🧾 CART POPUP (dropdown style) */
/* =============================== */

/* popup */
.cart-popup.empty {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 303px;
    background: white;
    border-radius: 8px;
    padding: 24px 32px;
    box-shadow: 0 8px 13px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    text-align: center;
    align-items: center;
}

.cart-popup.empty h4 {
    margin: 12px;
    font-style: bold;
}

.cart-popup.empty p {
    font-size: 14px;
}

/* Button */
.cart-popup.empty button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 36px;
    background: #0FA958;
    color: white;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

.cart-popup.filled {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 303px;
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 24px 32px;
    box-shadow: 0 8px 13px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    text-align: left;
    align-items: center;
}

/* filled state */
.cart-popup.filled h4 {
    margin: 12px;
    font-style: bold;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.cart-items {
    width: 100%;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item div div {
    font-size: 13px;
    color: #666;
}

.cart-item+hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid #ccc;
}

.qty-control {
    display: flex;
    align-items: center;
    background: #e5e5e5;
    border-radius: 20px;
    padding: 4px 10px;
    gap: 10px;
}

.qty-control button {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

.cart-summary div {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.cart-summary .total {
    font-weight: 700;
}

.checkout-btn {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: none;
    background: #0FA958;
    color: white;
    font-weight: 600;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow: hidden;

    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    margin: 0;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}


.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 100;
    transition: color 0.2s;
}

.close:hover {
    color: #000;
}

.layout {
    display: flex;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}




.switch-body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    flex: 0 0 250px;
}

.filter-container {
    padding-right: 0px;
    padding-left: 30px;
    width: 250px;


}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-right: 100px;

}

.filter-label {
    font-size: 16px;
    font-weight: 700;
    color: #000000;


}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}



.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D9D9D9;
    transition: .3s;
    border-radius: 14px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    top: 2px;
    background-color: #9E9E9E;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #34c759;
}

input:checked+.slider:before {
    transform: translateX(16px);
    background-color: #ffffff;
}

.rating-section {
    flex-direction: column;
    align-items: flex-start;
}

.rating-section .filter-label {
    margin-bottom: 15px;
}

.stars {
    font-size: 13px;
    color: #28a745;
    display: flex;
    gap: 4px;
    cursor: pointer;
}

.custom-search-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: -100px;
}


.custom-search-container {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* Hailtiin heseg*/
.custom-search-box {
    display: flex;
    align-items: center;
    background-color: #E3E8EB;
    border-radius: 999px;
    width: 583px;
    height: 36px;
    flex: 1;

}

.custom-search-icon {
    color: #000000;
    margin-left: 15px;
    font-size: 14px;
}

.custom-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #000000;
}

.custom-search-input::placeholder {
    color: #000000;
}

/* Songoh heseg*/
.custom-dropdown-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #E3E8EB;
    border-radius: 50px;
    width: 240.5px;
    height: 36px;
    cursor: pointer;
}

.custom-dropdown-text {
    font-size: 14px;
    color: #000000;
    margin-left: 10px;
}

.custom-dropdown-icon {
    font-size: 12px;
    color: #212529;
    margin-right: 10px;
}

.sort-popup {
    display: none;
    position: absolute;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    width: 240px;
    top: 50px;
    right: 0;
}

.sort-popup.open {
    display: block;
}

.sort-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    cursor: pointer;
}

.sort-option input[type="radio"] {
    accent-color: #000000;
    width: 16px;
    height: 16px;
}

.sort-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.sort-actions button {
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: #f0f0f0;
}

.sort-actions .apply-btn {
    background: #0FA958;
    color: white;
}

.stars i {
    cursor: pointer;
    transition: color 0.2s;
}

.stars i.filled {
    color: #0FA958;
}

/* Iframe-ийг агуулах контейнер */
.restaurant-list-wrapper {
    width: 100%;
    margin-top: 20px;
    flex: 1;
    min-width: 0;
    position: relative;
}

/* Iframe өөрөө */
#restaurantIframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
    overflow: hidden;
}

.restaurant-list-iframe {
    width: 100%;
    border: none;
    display: block;
    overflow: visible;
}

/* Модалын арын бүдгэрүүлсэн хэсэг */
.modal-overlay {
    position: fixed;
    /* Дэлгэц гүйлгэсэн ч байрандаа байна */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    /* Хар бараан, хагас тунгалаг арын дэвсгэр */
    display: none;
    /* Анх харагдахгүй */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    /* Хамгийн өндөр утга - Header, Sidebar-ийн дээр гарна */
}

/* Модалын цагаан хайрцаг */
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 600px;
    max-width: 90%;
    /* Гар утсан дээр дэлгэцээс гарахгүй байх */
    max-height: 90vh;
    /* Өндөр нь дэлгэцээс их болохгүй байх */
    overflow-y: auto;
    /* Доторх мэдээлэл ихэдвэл гүйдэг болно */
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Хаах товч (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Хоёр баганаар харуулна */
    gap: 15px;
    margin-top: 20px;
}

.form-grid input,
.form-grid textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.form-grid textarea {
    grid-column: span 2;
    /* Тайлбар хэсэг хоёр багана дамжиж харагдана */
    height: 100px;
}

.modal-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-save {
    background: #00b22d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
}

#resModalOverlay label {
    color: #000000;
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

#validationPopup {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4d4d;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 999999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

#validationPopup.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

#validationPopup.success {
    background: #0FA958;
}

@keyframes slideDown {
    from {
        top: -20px;
        opacity: 0;
    }

    to {
        top: 20px;
        opacity: 1;
    }
}

.profile-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-mini i {
    font-size: 28px;
    color: #111827;
}

.profile-mini-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.profile-mini-text span {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.profile-mini-text p {
    margin: 0;
    font-size: 16px;
    color: black;
    font-weight: bold;
}