/* =============================================
   MENU SECTION STYLES
   ============================================= */

/* Loading Spinner */
#loading-spinner {
    text-align: center;
    padding: 50px;
}

#loading-spinner i {
    color: #c9a96e;
    margin-bottom: 15px;
}

/* Category Filters Container */
.food-menu-list-menu {
    text-align: center;
    margin-bottom: 40px;
}

.menu-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 22px;
}

.menu-toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-toolbar-group label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs span {
    color: #888;
    font-size: 13px;
    font-weight: 600;
}

.menu-toolbar input,
.menu-toolbar select {
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    min-width: 120px;
    background: #fff;
}

.menu-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-filter-btn {
    height: 40px;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    background: #c9a96e;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-filter-btn:hover {
    background: #a87b3e;
}

.menu-filter-btn.secondary {
    background: #efefef;
    color: #555;
}

.menu-filter-btn.secondary:hover {
    background: #e3e3e3;
}

.search-group input {
    min-width: 200px;
}

#category-filters {
    list-style: none;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0;
}

#category-filters li {
    padding: 10px 25px;
    cursor: pointer;
    background: #f0f0f0;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

#category-filters li.active,
#category-filters li:hover {
    background: #c9a96e;
    color: white;
}

/* Products Grid */
.food-menu-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.single-menu {
    width: 25%;
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 992px) {
    .single-menu {
        width: 33.33%;
    }
}

@media (max-width: 768px) {
    .single-menu {
        width: 50%;
    }

    .menu-toolbar {
        align-items: stretch;
        justify-content: stretch;
    }

    .menu-toolbar-group,
    .menu-toolbar-actions {
        width: 100%;
    }

    .menu-toolbar input,
    .menu-toolbar select,
    .menu-filter-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .single-menu {
        width: 100%;
    }
}

@media (min-width: 1600px) {
    .single-menu {
        width: 20%;
    }
}

/* Product Card */
.product-card {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Product Image Container */
.food-menu-img {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: #f5f5f5;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Default Image Styling */
.product-img.default-img {
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Product Details */
.food-menu-details {
    padding: 15px;
    text-align: center;
}

.food-menu-details h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.menu-price {
    font-size: 20px;
    color: #c9a96e;
    font-weight: bold;
    margin: 0;
}

/* =============================================
   OUT OF STOCK STYLES
   ============================================= */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 10px;
}

.out-of-stock-badge {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(-15deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.out-of-stock-badge i {
    margin-right: 5px;
}

.food-menu-img.out-of-stock {
    opacity: 0.6;
}

.item-order-btn.disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.item-order-btn.disabled:hover {
    transform: none !important;
    background: #ccc !important;
}

/* Stock Warning in Offcanvas */
.stock-warning {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    text-align: center;
}

.stock-warning i {
    color: #ffc107;
    margin-right: 8px;
}

.stock-warning p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* =============================================
   ORDER CONFIRMATION MODAL STYLES
   ============================================= */
.confirmation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-modal-content {
    background: white;
    width: min(90%, 500px);
    max-width: 500px;
    border-radius: 15px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.confirmation-modal-header {
    background: #c9a96e;
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confirmation-modal-header h4 {
    margin: 0;
    font-size: 20px;
}

.confirmation-modal-header h4 i {
    margin-right: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    transition: opacity 0.3s;
}

.close-modal:hover {
    opacity: 0.8;
}

.confirmation-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

#order-summary-list {
    margin-bottom: 20px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.order-summary-item-name {
    flex: 2;
    font-weight: 500;
}

.order-summary-item-qty {
    flex: 1;
    text-align: center;
    color: #666;
}

.order-summary-item-price {
    flex: 1;
    text-align: right;
    color: #c9a96e;
    font-weight: bold;
}

.order-total-summary {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 2px solid #c9a96e;
    font-size: 18px;
    font-weight: bold;
}

.order-total-summary strong {
    color: #c9a96e;
    font-size: 22px;
}

.confirm-order-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.confirm-order-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.confirm-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Cart Icon Button */
.cart-icon-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #c9a96e;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    z-index: 10;
}

.cart-icon-btn:hover {
    background: #a87b3e;
    transform: scale(1.1);
}

/* Variant Badge on Product Card */
.variant-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c9a96e;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    z-index: 5;
}

.variant-badge i {
    margin-right: 4px;
    font-size: 10px;
}

/* Variant Options in Offcanvas */
.variant-options {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.variant-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.variant-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variant-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.variant-option:hover {
    border-color: #c9a96e;
    background: #fff8f0;
}

.variant-option.selected {
    border-color: #c9a96e;
    background: #fff8f0;
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.2);
}

.variant-option input[type="radio"] {
    display: none;
}

.variant-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.variant-price {
    color: #c9a96e;
    font-weight: bold;
    font-size: 16px;
}

/* Order Total Preview */
.order-total-preview {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.order-total-preview span {
    color: #c9a96e;
    font-size: 22px;
    font-weight: bold;
}

/* Selected Variant Info (for single variant) */
.selected-variant-info {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.variant-price-label {
    font-size: 16px;
    font-weight: 600;
    color: #c9a96e;
    margin: 0;
}

/* Off-Canvas Styles */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.offcanvas-overlay.active {
    visibility: visible;
    opacity: 1;
}

.offcanvas-content {
    position: absolute;
    right: 0;
    top: 0;
    width: min(90%, 450px);
    max-width: 450px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: default;
    box-sizing: border-box;
    overflow-x: hidden;
}

.offcanvas-overlay.active .offcanvas-content {
    transform: translateX(0);
}

.offcanvas-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #c9a96e;
    color: white;
}

.offcanvas-header h4 {
    margin: 0;
    font-size: 22px;
}

.close-offcanvas {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    line-height: 1;
    transition: opacity 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-offcanvas:hover {
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
}

.offcanvas-body {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.offcanvas-body * {
    box-sizing: border-box;
    max-width: 100%;
}

.empty-cart-state {
    text-align: center;
    padding: 30px 10px;
}

.empty-cart-state i {
    font-size: 42px;
    color: #c9a96e;
    margin-bottom: 12px;
}

.empty-cart-state h3 {
    margin: 0 0 8px;
}

.empty-cart-state p {
    color: #777;
    margin-bottom: 20px;
}

.offcanvas-cart-item {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.offcanvas-cart-item-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.offcanvas-cart-item-info {
    flex: 1;
    min-width: 0;
}

.offcanvas-cart-item-info h5 {
    margin: 0 0 4px;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.offcanvas-cart-variant,
.offcanvas-cart-price {
    margin: 0;
    color: #666;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.remove-cart-item {
    border: none;
    background: transparent;
    color: #d9534f;
    font-size: 16px;
    cursor: pointer;
}

.offcanvas-cart-controls {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.offcanvas-cart-qty {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.offcanvas-cart-line-total {
    display: block;
    margin-left: auto;
    color: #c9a96e;
    overflow-wrap: anywhere;
    white-space: nowrap;
    justify-self: end;
}

.offcanvas-cart-summary {
    border-top: 1px solid #ececec;
    margin-top: 12px;
    padding-top: 14px;
}

.offcanvas-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin-bottom: 12px;
}

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

.secondary-cart-btn {
    flex: 1;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    padding: 12px;
    font-weight: 600;
}

.offcanvas-cart-actions .add-to-order-btn {
    flex: 2;
    margin-top: 0;
}

.offcanvas-product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    background: #f5f5f5;
}

.offcanvas-product-img.default-img {
    object-fit: contain;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.offcanvas-product-price {
    font-size: 32px;
    color: #c9a96e;
    font-weight: bold;
    margin: 15px 0;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #ddd;
    background: white;
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #c9a96e;
    color: #c9a96e;
}

.quantity-input {
    width: 80px;
    text-align: center;
    font-size: 18px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

/* Add to Order Button */
.add-to-order-btn {
    width: 100%;
    background: #c9a96e;
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 20px;
}

.add-to-order-btn:hover {
    background: #a87b3e;
    transform: translateY(-2px);
}

.add-to-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Toast Notification */
.cart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-toast i {
    margin-right: 8px;
}

/* Floating Cart Button - FIXED VERSION */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #c9a96e;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;  /* Start hidden */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
}

.floating-cart.show {
    opacity: 1;
    visibility: visible;
}

.floating-cart:hover {
    transform: scale(1.1);
    background: #a87b3e;
}

.floating-cart .cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Error & Empty States */
.error-message {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    font-size: 18px;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

.menu-pagination {
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.menu-pagination-summary {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.menu-pagination-controls {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.menu-pagination-btn {
    min-width: 40px;
    height: 38px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #555;
    border-radius: 8px;
    padding: 0 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-pagination-btn:hover:not(:disabled) {
    border-color: #c9a96e;
    color: #a87b3e;
}

.menu-pagination-btn.active {
    background: #c9a96e;
    border-color: #c9a96e;
    color: #fff;
}

.menu-pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Animation for new items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.single-menu {
    animation: fadeInUp 0.5s ease;
}

/* Prevent body scroll when offcanvas is open */
body.offcanvas-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .offcanvas-content {
        width: 100%;
        max-width: 100%;
    }

    .offcanvas-header {
        padding: 16px 14px;
    }

    .offcanvas-body {
        padding: 14px;
    }

    .offcanvas-header h4 {
        font-size: 18px;
    }

    .variant-option {
        gap: 8px;
    }

    .variant-price {
        font-size: 14px;
        text-align: right;
    }

    .offcanvas-cart-controls {
        grid-template-columns: auto auto auto;
        gap: 8px;
    }

    .offcanvas-cart-line-total {
        display: block;
        grid-column: 1 / -1;
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        text-align: right;
    }

    .offcanvas-cart-actions {
        flex-direction: column;
    }

    .menu-pagination-btn {
        min-width: 36px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .secondary-cart-btn,
    .offcanvas-cart-actions .add-to-order-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .offcanvas-header {
        padding: 14px 12px;
    }

    .offcanvas-header h4 {
        font-size: 16px;
    }

    .close-offcanvas {
        width: 34px;
        height: 34px;
        font-size: 26px;
    }

    .offcanvas-body {
        padding: 12px;
    }

    .offcanvas-cart-item {
        padding: 10px;
    }

    .offcanvas-cart-item-info h5 {
        font-size: 15px;
    }

    .cart-item-qty-btn {
        width: 28px;
        height: 28px;
    }

    .offcanvas-cart-total {
        font-size: 16px;
    }

    .secondary-cart-btn,
    .offcanvas-cart-actions .add-to-order-btn {
        padding: 11px;
        font-size: 15px;
    }
}