/*
 * The Cater Menu - Common Styles
 * Version: 3.1.91
 */
/* ==========================================================================
   1. Main Menu - Product Item Layout
   ========================================================================== */
.tcm-product-item {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    margin-bottom: 25px !important;
    padding-bottom: 25px !important;
    border-bottom: 1px solid #eee !important;
    gap: 20px !important;
}
.tcm-product-item:last-child {
    border-bottom: none !important;
}
.tcm-product-actions { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px !important; flex-shrink: 0 !important; }
.tcm-product-info { flex-grow: 1 !important; text-align: right !important; min-width: 0 !important; }
.tcm-product-image { flex-basis: 120px !important; flex-shrink: 0 !important; }
.tcm-product-title { margin: 0 0 5px 0 !important; font-size: 1.1em !important; }
.tcm-product-description { font-size: 0.9em !important; color: #666 !important; }

/* ===============================================
   Quantity Box – Force styling in drawers + menu
   =============================================== */

/* Wrapper */
.tcm-quantity-box {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
}

/* Input */
.tcm-quantity-box .tcm-qty-input {
    width: 40px !important;
    height: 32px !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    border-left: none !important;
    border-right: none !important;
    padding: 2px !important;
    min-width: 0 !important;
    -moz-appearance: textfield !important;
    background-color: #fff !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* Remove default arrows in Chrome/Safari */
.tcm-qty-input::-webkit-outer-spin-button,
.tcm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Buttons */
.tcm-quantity-box .tcm-qty-btn {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid #ddd !important;
    color: #000 !important;              /* black + / - symbols */
    background-color: #f9f9f9 !important;
    cursor: pointer !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}
.tcm-quantity-box .tcm-qty-btn:hover {
    background-color: #e0e0e0 !important;
}


.tcm-add-to-order-btn { width: 100% !important; padding: 8px 8px !important; cursor: pointer !important; border: 1px solid #894fb3 !important; background-color: #894fb3 !important; color: white !important; border-radius: 4px !important; font-size: 0.9em !important; }
.tcm-product-image img { width: 80% !important; height: auto !important; border-radius: 8px !important; display: block !important; }
.tcm-prep-time { display: block !important; font-size: 0.5em !important; font-weight: normal !important; color: #555 !important; margin-top: 5px !important; }
.tcm-prep-time::before { content: '\23F0'; margin-left: 5px; font-family: sans-serif; }

/* ==========================================================================
   1. General & Reusable Components
   ========================================================================== */
.is-hidden { display: none; }

/* SHARED Quantity Box Styles (Works in Menu & Drawer) */
.tcm-quantity-box { display: flex; }
.tcm-qty-input {
    width: 35px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    padding: 2px;
    min-width: 0;
    -moz-appearance: textfield; /* Firefox */
}
.tcm-qty-input::-webkit-outer-spin-button,
.tcm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tcm-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
}

/* ==========================================================================
   2. Menu Header & View Toggle
   ========================================================================== */
.tcm-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #eee !important;
}
.tcm-menu-header .tcm-menu-title { /* Updated from h2 to be more specific */
    margin: 0 !important;
    font-size: 1.5em !important; /* Made the title smaller */
}
.tcm-view-toggle-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #555 !important;
}
.tcm-view-toggle { display: flex !important; border: 1px solid #ccc !important; border-radius: 5px !important; overflow: hidden !important; }
.tcm-toggle-label { margin: 0 !important; display: inline-block !important; padding: 8px 12px !important; cursor: pointer !important; background-color: #f5f5f5 !important; color: #999 !important; transition: background-color 0.3s, color 0.3s !important; }
.tcm-toggle-label:hover { background-color: #e9e9e9 !important; }
.tcm-view-toggle input[type="radio"] { display: none !important; }
.tcm-toggle-label.is-active { background-color: #e6d8f2 !important; color: #894fb3 !important; }
.tcm-toggle-icon { display: flex !important; align-items: center !important; justify-content: center !important; }
.tcm-toggle-icon svg { width: 24px !important; height: 24px !important; }
/* ==========================================================================
   3. Floating Cart & Drawer
   ========================================================================== */
body.tcm-drawer-open { overflow: hidden; }
.tcm-cart-modal-wrapper.has-items { display: block; }
.tcm-floating-cart-btn {
    position: fixed !important;
    /* OLD: bottom: 20px; */
    bottom: calc(20px + env(safe-area-inset-bottom)); /* NEW */
    left: 20px; z-index: 999; background-color: #ffffff; border: 2px solid #7a42a1; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.tcm-cart-icon img { width: 28px; height: 28px; object-fit: contain; }
.tcm-cart-item-count { position: absolute; top: -5px; right: -5px; background-color: #d9534f; color: white; font-size: 12px; font-weight: bold; width: 22px; height: 22px; border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.tcm-cart-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; visibility: hidden; }
.tcm-cart-modal.is-visible { visibility: visible; }
.tcm-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0); transition: background-color 0.4s ease; }
.tcm-cart-modal.is-visible .tcm-modal-overlay { background-color: rgba(0,0,0,0.6); }
.tcm-modal-content { position: fixed; top: 0; left: 0; height: 100vh; width: 90%; max-width: 400px; z-index: 1001; background-color: #fff; box-shadow: 2px 0 15px rgba(0,0,0,0.2); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform 0.4s ease; }
.tcm-cart-modal.is-visible .tcm-modal-content { transform: translateX(0); }
.tcm-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.tcm-modal-body { padding: 20px; overflow-y: auto; flex-grow: 1; }
.tcm-modal-footer {
    /* OLD: padding: 20px; */
    padding: 20px 20px 50px 20px; /* NEW */
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 80px !important;
}

/* ==========================================================================
   4. Cart Drawer Item Styles (SIMPLIFIED & CORRECTED)
   ========================================================================== */
.tcm-cart-item {
    display: flex;
    align-items: center;
    text-align: right; /* Align text to the right */
    gap: 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}
.tcm-cart-item:last-child { border-bottom: none; }

.tcm-cart-item-thumbnail { flex-shrink: 0; margin-left: 10px; }
.tcm-cart-item-thumbnail img { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; }

.tcm-cart-item-title { flex-grow: 1; min-width: 0; }
.tcm-cart-item-title strong { display: block; }
.tcm-cart-item-price { font-size: 0.9em; color: #777; }

.tcm-cart-item-quantity { flex-shrink: 0; }

.tcm-cart-item-remove { flex-shrink: 0; background: none; border: none; color: #cc0000; font-size: 20px; font-weight: bold; cursor: pointer; padding: 0 5px; }
.tcm-cart-item-remove:hover { color: #ff0000; }
/* ==========================================================================
   8. Checkout Button
   ========================================================================== */

.tcm-checkout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #894fb3;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tcm-checkout-btn:hover {
    background-color: #7a42a1; /* A slightly darker shade for hover */
}
/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Hides the product description on screens smaller than 768px (tablets and phones) */
@media (max-width: 768px) {
    .tcm-product-description {
        display: none;
    }
    .tcm-modal-footer {
    margin-bottom: 50px !important;
     padding: 20px 20px 80px 20px; /* NEW */
}
}
/* Drawer container */
/* Drawer */
.tcm-product-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75vh; /* 75% of screen height */
    background: #fff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2100;
    display: flex;
    flex-direction: column;
}

.tcm-product-drawer.is-visible {
    transform: translateY(0);
}

/* Content wrapper */
.tcm-product-drawer-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Close button */
/* Product Drawer Close Button */
.tcm-product-drawer-close {
    position: absolute;
    top: 12px;
    left: 12px; /* keep left for RTL, change to right if needed */
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2200;

    display: flex;              /* center text horizontally + vertically */
    align-items: center;
    justify-content: center;

    padding: 0;
    line-height: 1; /* prevent stretching */
}
/* Cart Drawer Close Button */
.tcm-modal-close-btn {
    background: none !important;
    border: none !important;
    color: #000 !important;
    font-size: 24px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
}
.tcm-modal-close-btn:hover {
    color: #cc0000 !important; /* red on hover */
}

.tcm-product-drawer-close:hover {
    background: rgba(0,0,0,0.8);
}

/* Header = image container */
.tcm-product-drawer-header {
    height: 50%; /* image = half of drawer */
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}
.tcm-product-drawer-header img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop nicely */
    display: block;
}

/* Body (title, prep time, description, attributes) */
.tcm-product-drawer-body {
    padding: 15px 20px;
    flex-grow: 1;
    overflow-y: auto;
    text-align: right;
}
.tcm-product-drawer-title {
    margin: 0 0 8px;
    font-size: 1.4em;
    font-weight: bold;
    color: #000;
}
.tcm-product-drawer-prep-time {
    font-size: 0.9em;
    color: #444;
    margin-bottom: 10px;
}
.tcm-product-drawer-description {
    font-size: 1em;
    color: #333;
    margin-bottom: 15px;
}

/* Footer */
/* Bottom drawer footer spacing */
.tcm-product-drawer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 80px; /* 80px left & right */
    border-top: 1px solid #eee;
    background: #f9f9f9;
    gap: 20px; /* space between qty box and button */
}

/* Make Add to Order button expand nicely */
.tcm-product-drawer-footer .tcm-add-to-order-btn {
    flex: 1; /* button grows */
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    background: #894fb3;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}
.tcm-product-drawer-footer .tcm-add-to-order-btn:hover {
    background: #7a42a1;
}
/* Back to Top Button (bottom right in RTL) */
.tcm-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px; /* RTL: keep on right */
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2500;
    display: none; /* hidden until scroll */
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    padding: 0;
}

.tcm-back-to-top::before {
    content: '';
    display: inline-block;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #fff; /* white arrow */
    margin-top: 2px;
}
.tcm-cart-item-attributes {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}
.tcm-cart-item-attributes {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}

.tcm-cart-item-attributes .tcm-attr-pill {
    background-color: #f1f1f1;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    color: #444;
    white-space: nowrap;
}

