/* ==============================================
   UberEats Menu Plugin v1.3
   Mobile-first | WoodMart compatible
   ============================================== */

:root {
    --uem-accent:       #1a1a1a;
    --uem-accent-light: #1a1a1a22;
    --uem-bg:           #ffffff;
    --uem-surface:      #f6f6f6;
    --uem-border:       #e8e8e8;
    --uem-text:         #1a1a1a;
    --uem-muted:        #666666;
    --uem-shadow:       0 1px 5px rgba(0,0,0,0.08);
    --uem-radius:       12px;
    --uem-nav-h:        52px;
    --uem-font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hard reset inside wrapper so WoodMart defaults can't bleed in */
.uem-wrapper,
.uem-wrapper * {
    box-sizing: border-box;
    font-family: var(--uem-font);
}

.uem-wrapper {
    color-scheme: light;
    color: var(--uem-text);
    background: var(--uem-bg);
    margin: 0 auto;
}

/* Hide WoodMart default loop on auto-inject */
.uem-wrapper ~ ul.products,
.uem-wrapper ~ .woocommerce-loop-product__title { display: none !important; }

/* ══════════════════════════════════════
   UNIFIED CLOSE BUTTON — all popups
══════════════════════════════════════ */
.uem-modal-close,
.uem-hp-close,
.uem-ot-popup-close,
.uem-drawer-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: #F4F4F4 !important;
    border: none !important;
    cursor: pointer !important;
    color: #222222 !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-family: var(--uem-font) !important;
    transition: background 0.15s, color 0.15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.uem-modal-close:hover,
.uem-hp-close:hover,
.uem-ot-popup-close:hover,
.uem-drawer-close:hover {
    background: #e2e2e2 !important;
    color: #000 !important;
}


/* ==============================================
   HEADER
   ============================================== */
.uem-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid var(--uem-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--uem-bg);
}
.uem-shop-info { flex: 1; min-width: 0; }
.uem-shop-name {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: var(--uem-text) !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.uem-shop-hours {
    display: block;
    font-size: 13px;
    color: var(--uem-muted);
    margin-top: 3px;
}

/* ==============================================
   SEARCH
   ============================================== */
.uem-search-wrap {
    display: flex;
    align-items: center;
    background: var(--uem-surface);
    border: 1px solid var(--uem-border);
    border-radius: 24px;
    padding: 8px 16px;
    gap: 8px;
/*     min-width: 200px;
    max-width: 320px; */
    flex: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.uem-search-wrap:focus-within {
    border-color: var(--uem-accent);
    box-shadow: 0 0 0 3px var(--uem-accent-light);
}
.uem-search-icon { flex-shrink: 0; opacity: 0.45; display: block; color: var(--uem-text); }
.uem-search-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    color: var(--uem-text) !important;
}
.uem-search-input::placeholder { color: var(--uem-muted); }

/* ==============================================
   STICKY CATEGORY NAV
   ============================================== */
.uem-nav-sticky {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--uem-bg);
    border-bottom: 1px solid var(--uem-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.uem-cat-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 8px;
    height: var(--uem-nav-h);
    align-items: center;
}
.uem-cat-nav::-webkit-scrollbar { display: none; }
.uem-cat-nav-item {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--uem-muted) !important;
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.uem-cat-nav-item:hover { color: var(--uem-text) !important; }
.uem-cat-nav-item.active {
    color: var(--uem-accent) !important;
    border-bottom-color: var(--uem-accent) !important;
    font-weight: 700;
}

/* ==============================================
   CONTENT & SECTIONS
   ============================================== */
.uem-content { padding: 0 16px 80px; }
.uem-section { padding-top: 32px; }
.uem-section-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--uem-text) !important;
    border: none !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
}
.uem-section-desc {
    font-size: 14px;
    color: var(--uem-muted);
    margin: 0 0 8px !important;
}
.uem-section.uem-section-hidden { display: none; }

/* ==============================================
   PRODUCT GRID
   ============================================== */
.uem-products-grid {
    display: grid;
    gap: 25px;
    margin-top: 14px;
    /* Extra bottom padding so the + button of the last row is not cut off */
    padding-bottom: 18px;
}
.uem-cols-1 { grid-template-columns: 1fr; }
.uem-cols-2 { grid-template-columns: 1fr 1fr; }
.uem-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ==============================================
   PRODUCT CARD
   overflow:visible is critical — clips nothing.
   The + button lives OUTSIDE the image wrapper.
   ============================================== */
.uem-product-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--uem-bg);
    border: 1px solid var(--uem-border);
    border-radius: var(--uem-radius);
    padding: 14px;
    box-shadow: var(--uem-shadow);
    transition: box-shadow 0.2s, transform 0.15s;
    position: relative;
    overflow: visible;      /* NEVER set to hidden — button would disappear */
    cursor: pointer;
    /*margin-bottom: 10px;     absorbs the overflowing + button below */
}
.uem-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.11);
    transform: translateY(-1px);
}
.uem-product-card.uem-hidden { display: none !important; }

/* Left: text */
.uem-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.uem-product-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--uem-text) !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.uem-product-rating {
    font-size: 12px;
    color: var(--uem-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.uem-product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--uem-accent);
    margin-top: 2px;
}
/* Override WooCommerce price colour inside our layout */
.uem-product-price bdi,
.uem-product-price .woocommerce-Price-amount { color: inherit !important; }
.uem-product-desc {
    font-size: 13px;
    color: var(--uem-muted);
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Right column: stacks image ON TOP and button BELOW */
.uem-product-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;     /* + button is absolute to THIS element */
    width: 90px;
}

/* Image box — overflow:hidden only here, not on the card */
.uem-img-box {
    width: 112px;
    height: 112px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.uem-product-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* ==============================================
   + ADD BUTTON
   FIX 3: All WoodMart/WooCommerce conflicting
   styles are overridden with !important here so
   our button always wins regardless of theme CSS.
   ============================================== */
.uem-wrapper .uem-add-btn,
.uem-add-btn {
    /* Position */
    position: absolute !important;
    bottom: -10px !important;
    right: -10px !important;

    /* Size — slightly larger */
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;

    /* Colors */
    background: var(--uem-accent) !important;
    background-color: var(--uem-accent) !important;
    color: #ffffff !important;
    border: 2.5px solid #ffffff !important;
    outline: none !important;

    /* + icon perfectly centered using flex, NOT font metrics */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 0 !important;
    font-family: Arial, sans-serif !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;

    /* Behaviour */
    cursor: pointer !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3) !important;
    transition: transform 0.15s, background 0.2s !important;
    z-index: 10 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.uem-wrapper .uem-add-btn:hover,
.uem-add-btn:hover {
    transform: scale(1.15) !important;
    background: var(--uem-accent) !important;
    color: #fff !important;
}
.uem-add-btn.added {
    background: #22c55e !important;
    background-color: #22c55e !important;
}

/* Out of stock label */
.uem-oos-label {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
}

/* ==============================================
   MODAL OVERLAY
   ============================================== */
.uem-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99990;
    justify-content: flex-end;
    align-items: flex-end;
}
.uem-modal-overlay.open { display: flex; }

/* Mobile: bottom sheet */
.uem-modal {
    background: var(--uem-bg);
    color-scheme: light;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
    position: relative;
}
.uem-modal-overlay.open .uem-modal { transform: translateY(0); }

/* Desktop: centered popup, side-by-side */
@media (min-width: 700px) {
    .uem-modal-overlay {
        justify-content: center;
        align-items: center;
    }
    .uem-modal {
        width: 860px;
        max-width: 92vw;
        max-height: 86vh;
        border-radius: 20px;
        transform: scale(0.94) translateY(10px);
        opacity: 0;
        transition: transform 0.26s ease, opacity 0.26s ease;
    }
    .uem-modal-overlay.open .uem-modal {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Drag handle — mobile only */
.uem-modal-handle {
    display: none !important;
}

/* Close button */
.uem-modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    z-index: 100 !important;
}

/* ══ Inner wrapper: flex row on desktop ══ */
#uem-modal-inner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 92vh;
}
@media (min-width: 700px) {
    #uem-modal-inner {
        flex-direction: row !important;
        align-items: stretch;
        height: 540px;
        max-height: 86vh;
    }
}

/* Left: image */
.uem-modal-img-wrap {
    width: 100%;
    height: 260px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    line-height: 0;
}
@media (min-width: 700px) {
    .uem-modal-img-wrap {
        width: 50% !important;
        height: auto !important;
        align-self: stretch;
        border-radius: 20px 0 0 20px;
        flex-shrink: 0;
    }
}
.uem-modal-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform 0.38s ease !important;
}
.uem-modal-img-wrap:hover .uem-modal-img {
    transform: scale(1.05) !important;
}

/* Right: content column */
.uem-modal-right-col {
    display: flex;
    flex-direction: column;
    background: var(--uem-bg);
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
@media (min-width: 700px) {
    .uem-modal-right-col {
        width: 50% !important;
        flex-shrink: 0;
        flex: none;
    }
}

/* Scrollable body */
.uem-modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 20px 20px 10px;
}
@media (min-width: 600px) { .uem-modal-body { padding: 24px 24px 12px; } }

/* Product name */
.uem-modal-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--uem-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

/* Price */
.uem-modal-base-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--uem-text);
    margin-bottom: 8px;
}
.uem-modal-base-price bdi,
.uem-modal-base-price .woocommerce-Price-amount { color: inherit !important; }

/* Description */
.uem-modal-desc {
    font-size: 13.5px;
    color: var(--uem-muted);
    line-height: 1.55;
    margin: 0 0 10px;
}

/* Divider */
.uem-divider {
    height: 1px;
    background: var(--uem-border);
    margin: 12px 0;
}

/* Variation groups */
.uem-var-group { margin-bottom: 14px; }
.uem-var-group-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--uem-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Radio list style — image jaise */
.uem-var-radio-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid var(--uem-border);
    border-radius: 12px;
    overflow: hidden;
}
.uem-var-radio-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--uem-border) !important;
    background: var(--uem-bg) !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    color: var(--uem-text) !important;
    user-select: none;
}
.uem-var-radio-row:last-child {
    border-bottom: none !important;
}
.uem-var-radio-row:hover {
    background: var(--uem-surface) !important;
}

/* Radio circle — hollow by default, filled when selected */
.uem-var-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
    background: var(--uem-bg);
}
.uem-var-radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--uem-accent);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.15s, transform 0.15s;
}
.uem-var-radio-row.selected .uem-var-radio-circle {
    border-color: var(--uem-accent);
}
.uem-var-radio-row.selected .uem-var-radio-circle::after {
    opacity: 1;
    transform: scale(1);
}

/* Label */
.uem-var-radio-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--uem-text);
}

/* Price on right */
.uem-var-radio-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--uem-text);
    text-align: right;
    flex-shrink: 0;
}
.uem-var-radio-price * { color: var(--uem-text) !important; }

/* Selected row highlight */
.uem-var-radio-row.selected {
    background: #fff8f5 !important;
}

/* Required badge */
.uem-badge-required {
    font-size: 11px; font-weight: 600;
    background: #ffe5d9; color: var(--uem-accent);
    padding: 2px 8px; border-radius: 20px;
}

/* Addon groups */
.uem-addon-group { margin-bottom: 12px; }
.uem-addon-group-label {
    font-size: 13px; font-weight: 700;
    color: var(--uem-text); margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.uem-addon-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; cursor: pointer;
    transition: background 0.15s; margin-bottom: 4px;
    border: 1.5px solid transparent;
}
.uem-addon-row:hover { background: var(--uem-surface); }
.uem-addon-row.selected { border-color: var(--uem-accent); background: var(--uem-surface); }
.uem-addon-check { color: var(--uem-accent); font-weight: 700; opacity: 0; font-size: 14px; width: 16px; }
.uem-addon-row.selected .uem-addon-check { opacity: 1; }
.uem-addon-name { flex: 1; font-size: 13.5px; color: var(--uem-text); }
.uem-addon-price { font-size: 13px; font-weight: 600; color: var(--uem-muted); }

/* Qty row — inside body, below special instructions */
.uem-qty-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--uem-border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
    margin-top: 16px;
}
.uem-qty-btn {
    width: 42px; height: 42px;
    border: none;
    background: var(--uem-surface);
    color: var(--uem-text);
    font-size: 20px;
    cursor: pointer;
    font-weight: 400;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.uem-qty-btn:hover { background: var(--uem-border); }
.uem-qty-num {
    min-width: 44px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--uem-text);
    border-left: 1.5px solid var(--uem-border);
    border-right: 1.5px solid var(--uem-border);
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer — full width Add to Cart */
.uem-modal-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--uem-border);
    background: var(--uem-bg);
    flex-shrink: 0;
}
@media (min-width: 600px) { .uem-modal-footer { padding: 14px 24px 20px; } }

/* Full width CTA */
.uem-cta-full {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    background: #1a1a1a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity 0.15s !important;
    min-height: 52px !important;
    letter-spacing: 0.3px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.uem-cta-full:hover { opacity: 0.88 !important; }
.uem-cta-price {
    font-weight: 700;
    font-size: 15px;
}

/* Out of stock footer */
.uem-oos-footer {
    text-align: center;
    color: var(--uem-muted);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
}

/* View btn */
.uem-view-btn {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: 20px;
    border: 1.5px solid var(--uem-border);
    font-size: 12px; font-weight: 600; color: var(--uem-text);
    text-decoration: none; white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.uem-view-btn:hover { border-color: var(--uem-accent); color: var(--uem-accent); }

/* Responsive modal body padding tweak */
@media (max-width: 699px) {
    .uem-modal-body { padding: 16px 16px 10px; }
    .uem-modal-footer { padding: 12px 16px 16px; }
}

/* ══════════════════════════════════════
   DELIVERY / PICKUP TOGGLE
══════════════════════════════════════ */

/* Header top row: info left, toggle right */
.uem-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* Toggle pill container */
.uem-order-type-wrap {
    display: flex;
    align-items: center;
    background: var(--uem-surface);
    border: 1.5px solid var(--uem-border);
    border-radius: 24px;
    padding: 3px;
    gap: 0;
    flex-shrink: 0;
}

/* Individual toggle button */
.uem-ot-btn {
    padding: 7px 16px !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    background: transparent !important;
    color: var(--uem-muted) !important;
    transition: background 0.18s, color 0.18s !important;
    white-space: nowrap;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1.3 !important;
    min-width: 70px;
    text-align: center;
}
.uem-ot-btn:hover {
    color: var(--uem-text) !important;
}
.uem-ot-btn.active {
    background: var(--uem-accent) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* Unavailable popup overlay */
.uem-ot-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.uem-ot-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Popup box */
.uem-ot-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--uem-bg);
    border-radius: 16px;
    padding: 28px 24px 24px;
    width: 88%;
    max-width: 320px;
    text-align: center;
    z-index: 99999;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.uem-ot-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
.uem-ot-popup-close {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
}
.uem-ot-popup-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}
.uem-ot-popup-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--uem-text) !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
}
.uem-ot-popup-msg {
    font-size: 14px !important;
    color: var(--uem-muted) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .uem-header-top {
        flex-wrap: wrap;
        gap: 10px;
    }
    .uem-ot-btn {
        padding: 6px 12px !important;
        font-size: 12px !important;
        min-width: 60px;
    }
	.uem-products-grid {
    	gap: 15px!important;
	}
}

/* ══════════════════════════════════════
   CATEGORY BADGE (image top-right)
══════════════════════════════════════ */
.uem-img-box {
    position: relative; /* make sure it's set for badge positioning */
}

.uem-cat-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    pointer-events: none;
    z-index: 3;
    max-width: calc(100% - 14px);
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .uem-cat-badge {
        font-size: 10px;
        padding: 2px 7px;
        top: 5px;
        right: 5px;
    }
}

/* ══════════════════════════════════════
   OPERATING HOURS — CLOCK BUTTON
══════════════════════════════════════ */
.uem-shop-hours-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 4px 0 0 0 !important;
    cursor: pointer;
    color: var(--uem-muted) !important;
    font-size: 13px;
    font-family: var(--uem-font);
    line-height: 1.4;
    text-decoration: none;
    transition: color .18s;
    border-radius: 0 !important;
}
.uem-shop-hours-btn:hover,
.uem-shop-hours-btn:focus { color: var(--uem-accent) !important; background: transparent !important; box-shadow: none !important; }
.uem-shop-hours-btn svg   { flex-shrink: 0; width: 14px; height: 14px; opacity: .7; }

/* ══════════════════════════════════════
   OPERATING HOURS — POPUP MODAL
══════════════════════════════════════ */
.uem-hp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
}
.uem-hp-overlay.show { display: block; }

.uem-hp-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #1a1a1a;
    color-scheme: light;
    border-radius: 16px;
    width: 400px;
    max-width: 93vw;
    max-height: 82vh;
    overflow-y: auto;
    z-index: 99999;
    padding: 0;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
}
.uem-hp-modal.show { display: block; }

/* Modal header bar — title left, X right, no overlap */
.uem-hp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.uem-hp-close {
    flex-shrink: 0;
}

.uem-hp-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Scrollable content area */
.uem-hp-body {
    padding: 8px 24px 20px;
}

.uem-hp-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.uem-hp-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 13.5px;
}
.uem-hp-list li:last-child { border-bottom: none; }

.uem-hp-list .uem-hp-day {
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}
.uem-hp-list .uem-hp-time {
    color: #666;
    text-align: right;
}

/* Closed badge */
.uem-hp-list .uem-hp-closed {
    color: #e55a00;
    font-weight: 600;
    font-size: 12px;
    background: #fff0ea;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .2px;
}

/* Today highlight — full-width flush row */
.uem-hp-list li.uem-hp-today {
    background: #fff8f5;
    margin: 0 -24px;
    padding: 11px 24px;
    border-bottom-color: #ffe8d8;
}
.uem-hp-list li.uem-hp-today .uem-hp-day  { color: var(--uem-accent); }
.uem-hp-list li.uem-hp-today .uem-hp-time { color: var(--uem-accent); font-weight: 700; }



/* ══════════════════════════════════════
   RESTAURANT CLOSED NOTICE
══════════════════════════════════════ */
.uem-closed-notice {
    margin: 4px 0 0 0;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #c0392b;
    background: none;
    border: none;
}





/* ══════════════════════════════════════
   HAMBURGER BUTTON
══════════════════════════════════════ */
.uem-hamburger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border: 1.5px solid var(--uem-border) !important;
    border-radius: 10px !important;
    background: var(--uem-bg) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    color: var(--uem-text) !important;
    transition: background 0.15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
}
.uem-hamburger:hover { background: var(--uem-surface) !important; }
.uem-hamburger svg { display: block; }

/* ══════════════════════════════════════
   DRAWER OVERLAY
══════════════════════════════════════ */
.uem-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99990;
    backdrop-filter: blur(2px);
}
.uem-drawer-overlay.open { display: block; }

/* ══════════════════════════════════════
   DRAWER CANVAS — matches image style
══════════════════════════════════════ */
.uem-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 88vw;
    height: 100dvh;
    background: #fff;
    color-scheme: light;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 32px rgba(0,0,0,0.14);
    overflow: hidden;
    border-radius: 0 16px 16px 0;
}
.uem-drawer.open { transform: translateX(0); }

/* Header: "Full menu" title + X button */
.uem-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    background: #fff;
}
.uem-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.2px;
}
/* X close button — circle style like image */
.uem-drawer-close {
    flex-shrink: 0 !important;
}

/* Scrollable list */
.uem-drawer-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px 0 24px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.uem-drawer-list::-webkit-scrollbar { width: 4px; }
.uem-drawer-list::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

/* Category item — uppercase like image */
.uem-drawer-item {
    display: block !important;
    padding: 14px 22px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
    text-transform: uppercase !important;
    color: #888 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border-left: 3px solid transparent !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s !important;
    line-height: 1.3 !important;
}
.uem-drawer-item:hover {
    background: #fafafa !important;
    color: #1a1a1a !important;
}
.uem-drawer-item.active {
    color: #1a1a1a !important;
    border-left-color: #1a1a1a !important;
    background: #fafafa !important;
    font-weight: 700 !important;
}

/* ══════════════════════════════════════
   RESPONSIVE PRODUCT GRID FIXES
══════════════════════════════════════ */
/* Mobile: always 1 column regardless of settings */
@media (max-width: 599px) {
    .uem-products-grid {
        grid-template-columns: 1fr !important;
    }
    .uem-img-box {
        width: 90px !important;
        height: 90px !important;
    }
}

/* Tablet: max 2 columns */
@media (min-width: 600px) and (max-width: 899px) {
    .uem-cols-3 { grid-template-columns: 1fr 1fr; }
    .uem-cols-4 { grid-template-columns: 1fr 1fr; }
}

/* Desktop: full columns */
@media (min-width: 900px) {
    .uem-cols-2 { grid-template-columns: 1fr 1fr; }
    .uem-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ══════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════ */
#uem-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 99999;
    white-space: nowrap;
    max-width: 90vw;
}
#uem-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════
   LOADING SPINNER
══════════════════════════════════════ */
.uem-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--uem-muted);
    font-size: 14px;
    gap: 14px;
}
.uem-spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--uem-border);
    border-top-color: var(--uem-accent);
    border-radius: 50%;
    animation: uem-spin 0.7s linear infinite;
}
@keyframes uem-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   SPECIAL INSTRUCTIONS
══════════════════════════════════════ */
.uem-special-wrap {
    margin-top: 4px;
}
.uem-special-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--uem-text);
    margin-bottom: 10px;
}
.uem-special-input {
    width: 100%;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    padding: 12px 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px !important;
    font-size: 14px;
    color: var(--uem-text);
    font-family: var(--uem-font);
    resize: none !important;
    outline: none !important;
    box-sizing: border-box;
    line-height: 1.5;
    transition: background 0.15s;
    display: block;
    color-scheme: light;
}
.uem-special-input::placeholder { color: #aaa; }
.uem-special-input:focus { background: #efefef; }
.uem-special-hint {
    font-size: 12px;
    color: #999;
    margin: 8px 0 0;
    padding: 0;
}
