/* Base Styles */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.restaurant-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.category-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.menu-item h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.menu-item p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

.restaurant-logo-container {
    display: inline-block;
    position: relative;
    z-index: 2;
}

.restaurant-logo {
    max-height: 120px;
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    background: white;
    padding: 5px;
}

.restaurant-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Common Components */
.menu-item:active {
    transform: scale(0.98);
}

.item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-image:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.price-tag {
    color: var(--theme-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.wifi-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 15px 25px;
    margin-top: 25px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.wifi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.wifi-card i {
    font-size: 1.1rem;
}

/* Scrollspy Navigation */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: var(--theme-color);
}

.nav-link {
    color: #333;
}

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Vertical Layout Styles */
.menu-item.vertical {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
}

.menu-item.vertical .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-item.vertical .item-content>.d-flex {
    flex-direction: column;
    height: 100%;
}

.menu-item.vertical .item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
}

.menu-item.vertical .flex-shrink-0 {
    margin-right: 0 !important;
    width: 100%;
}

.menu-item.vertical .flex-grow-1 {
    padding: 20px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu-item.vertical h5 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.menu-item.vertical p {
    margin-bottom: 15px;
}

/* Cart System Styles */
.menu-item {
    display: flex;
    flex-direction: column;
}

.menu-item .item-content {
    flex: 1;
}

.menu-item .item-footer {
    margin-top: auto;
    padding: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.06);
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--theme-color, #0d6efd) 0%, color-mix(in srgb, var(--theme-color, #0d6efd) 85%, black) 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
    font-family: 'Poppins', sans-serif;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.item-footer .price-tag {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.add-to-cart-btn .price-tag {
    color: currentColor !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.add-to-cart-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.add-to-cart-btn:hover .add-to-cart-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    color: white;
    padding: 15px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-bar:hover {
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.9));
}

.cart-bar.active {
    display: flex;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1rem;
}

.cart-item-price {
    color: var(--theme-color, #0d6efd);
    font-weight: bold;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: var(--theme-color, #0d6efd);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.qty-btn:hover {
    opacity: 0.8;
}

.cart-item-qty {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cart-total-row h4 {
    margin: 0;
    color: #333;
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--theme-color, #0d6efd);
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.clear-cart-btn {
    background: #dc3545;
    color: white;
}

.clear-cart-btn:hover {
    background: #c82333;
}

.show-waiter-btn {
    background: var(--theme-color, #0d6efd);
    color: white;
}

.show-waiter-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 800px;
    width: 90vw;
    position: relative;
    animation: zoomIn 0.3s ease;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    max-height: 90vh;
}

.image-modal-content img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.modal-item-info {
    padding: 25px;
    background: white;
    color: #333;
    overflow-y: auto;
}

.modal-item-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.modal-item-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.modal-item-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-color, #0d6efd);
    padding: 15px 0;
    border-top: 2px solid #f0f0f0;
    font-family: 'Poppins', sans-serif;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10003;
}

.modal-nav-btn:hover {
    background: var(--theme-color, #0d6efd);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.modal-nav-prev {
    left: -25px;
}

.modal-nav-next {
    right: -25px;
}

@media (max-width: 768px) {
    .modal-nav-prev {
        left: 10px;
    }

    .modal-nav-next {
        right: 10px;
    }

    .modal-item-name {
        font-size: 1.4rem;
    }

    .modal-item-price {
        font-size: 1.5rem;
    }
}

.close-image-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10002;
}

.close-image-modal:hover {
    transform: scale(1.1) rotate(90deg);
    background: #dc3545;
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Campaign Modal */
.campaign-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10005;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.campaign-modal.active {
    display: flex;
}

.campaign-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
}

.close-campaign {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.close-campaign:hover {
    background: #fff;
    color: #dc3545;
    transform: scale(1.1);
}

.campaign-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.campaign-body {
    padding: 25px;
    text-align: center;
}

.campaign-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--theme-color, #333);
    font-weight: bold;
}

.campaign-text {
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

.campaign-content:not(:has(.campaign-image-container)) {
    border-radius: 15px;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9998;
    border: none;
    outline: none;
    background-color: var(--theme-color, #0d6efd);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

#scrollToTopBtn:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}
