﻿/* ============================================================ */
/*   MENU ENGINEERING PAGE  –  menuengineering.css             */
/* ============================================================ */

/* ── PAGE WRAPPER ── */
.me-page {
    max-width: 1400px;
    margin: 0 auto;
}

/* ── HERO ── */
.me-hero {
    text-align: center;
    padding: 5rem 5% 3.5rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin: 2rem 5%;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .me-hero h1 {
        font-size: 3rem;
        color: #f0f4f8;
        font-weight: 700;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

    .me-hero .description {
        color: #cae4f0;
        max-width: 620px;
        margin: 0.8rem auto 2.2rem;
        line-height: 1.8;
        font-size: 1rem;
    }

/* ── ADD BUTTON ── */
.btn-add-item {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #fff;
    padding: 0.75rem 1.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

    .btn-add-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59,130,246,0.45);
    }

/* ── MENU CARDS SECTION ── */
.me-cards-section {
    margin: 0 5% 2rem;
}

.me-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ── INDIVIDUAL MENU CARD ── */
.me-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(59,130,246,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: cardSlideIn 0.35s cubic-bezier(0.22,1,0.36,1);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.me-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59,130,246,0.18);
}

.me-card-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.me-card-image-placeholder {
    width: 100%;
    height: 170px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2.5rem;
}

.me-card-body {
    padding: 1rem 1.1rem 1.1rem;
}

.me-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.me-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.me-card-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-card-edit,
.btn-card-delete {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: transform 0.15s, opacity 0.15s;
}

.btn-card-edit {
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
}

    .btn-card-edit:hover {
        background: rgba(59,130,246,0.22);
        transform: scale(1.1);
    }

.btn-card-delete {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

    .btn-card-delete:hover {
        background: rgba(239,68,68,0.2);
        transform: scale(1.1);
    }

.me-card-category {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.me-card-desc {
    font-size: 0.87rem;
    color: #64748b;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

.me-card-price-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}

.me-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.me-card-badge {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.badge-discount {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

.badge-tax {
    background: rgba(99,102,241,0.1);
    color: #4338ca;
}

.me-card-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.mode-tag {
    font-size: 0.73rem;
    padding: 0.18rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    color: #475569;
    background: #f8fafc;
}

.me-card-limited {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(251,146,60,0.08);
    border: 1px solid rgba(251,146,60,0.25);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    color: #c2410c;
    margin-top: 0.4rem;
}

.me-card-limited-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.me-card-timer {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

/* ── FEATURES SECTION ── */
.me-features-section {
    margin: 2rem 5%;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 3rem 5%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

    .me-features-section h2 {
        text-align: center;
        font-size: 2rem;
        color: #f0f4f8;
        margin-bottom: 2rem;
        font-weight: 700;
    }

.me-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.me-feature-card {
    background: rgba(255,255,255,0.98);
    border-radius: 12px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(59,130,246,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

    .me-feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(59,130,246,0.18);
    }

.me-feature-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.me-feature-card h3 {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.me-feature-card p {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ── MODAL OVERLAY ── */
.me-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.me-modal {
    background: rgba(255,255,255,0.97);
    border-radius: 18px;
    padding: 2rem 2rem 1.5rem;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    animation: modalPop 0.3s cubic-bezier(0.22,1,0.36,1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.me-modal h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0b1220;
    margin-bottom: 1.5rem;
}

/* FORM GRID */
.me-modal-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.4rem;
}

    .me-modal-form .full-width {
        grid-column: 1 / -1;
    }

.me-field label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.me-field input,
.me-field select,
.me-field textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #f8fafc;
    color: #1e293b;
    transition: border 0.2s, background 0.2s;
}

    .me-field input:focus,
    .me-field select:focus,
    .me-field textarea:focus {
        outline: none;
        border-color: #3b82f6;
        background: #fff;
    }

.me-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* IMAGE UPLOAD */
.me-image-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #f8fafc;
    position: relative;
}

    .me-image-upload-area:hover {
        border-color: #3b82f6;
        background: rgba(59,130,246,0.04);
    }

    .me-image-upload-area.has-image {
        border-color: #22c55e;
        background: rgba(34,197,94,0.04);
        padding: 0;
        overflow: hidden;
    }

    .me-image-upload-area input[type="file"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
        width: 100%;
        height: 100%;
    }

.me-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    pointer-events: none;
}

    .me-upload-placeholder svg {
        width: 32px;
        height: 32px;
        color: #94a3b8;
    }

    .me-upload-placeholder span {
        font-size: 0.85rem;
    }

    .me-upload-placeholder small {
        font-size: 0.75rem;
        color: #b0bec5;
    }

.me-image-preview {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.me-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(239,68,68,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .me-image-remove:hover {
        background: #ef4444;
    }

/* ORDER MODES TOGGLE */
.me-order-modes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.me-mode-btn {
    padding: 0.4rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

    .me-mode-btn.active {
        background: linear-gradient(135deg, #3b82f6, #1e40af);
        border-color: transparent;
        color: #fff;
    }

/* LIMITED AVAILABILITY */
.me-limited-box {
    background: #f8fafc;
    border: 1px solid #dde1e7;
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

.me-limited-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
}

    .me-limited-toggle input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #3b82f6;
        cursor: pointer;
    }

.me-limited-extra {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

/* MODAL FOOTER */
.me-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.btn-modal-cancel {
    padding: 0.65rem 1.4rem;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    border-radius: 8px;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

    .btn-modal-cancel:hover {
        background: #f1f5f9;
        border-color: #94a3b8;
    }

.btn-modal-save {
    padding: 0.65rem 1.6rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

    .btn-modal-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(59,130,246,0.4);
    }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .me-hero h1 {
        font-size: 2rem;
    }

    .me-features-grid {
        grid-template-columns: 1fr;
    }

    .me-modal-form {
        grid-template-columns: 1fr;
    }

    .me-limited-extra {
        grid-template-columns: 1fr;
    }

    .me-cards-grid {
        grid-template-columns: 1fr;
    }
}
