/* Mophyz Order System — cart drawer, cart page, checkout (Glovo-inspired) */

:root {
    --moc-gold: #f59e0b;
    --moc-gold-dark: #d97706;
    --moc-surface: rgba(30, 30, 30, 0.72);
    --moc-surface-solid: #1e1e1e;
    --moc-border: rgba(255, 255, 255, 0.12);
    --moc-radius: 1.35rem;
    --moc-radius-sm: 1rem;
}

/* Toast */
.moc-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 10050;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.moc-toast--visible {
    transform: translateX(-50%) translateY(0);
}

/* Overlay + drawer */
.moc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.moc-overlay--open {
    opacity: 1;
    visibility: visible;
}

.moc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(100%, 24rem);
    height: 100vh;
    height: 100dvh;
    z-index: 10045;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(28, 28, 28, 0.97) 0%, rgba(18, 18, 18, 0.98) 100%);
    border-left: 1px solid var(--moc-border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.moc-drawer--open {
    transform: translateX(0);
}

.moc-body-lock {
    overflow: hidden;
}

.moc-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--moc-border);
}

.moc-drawer__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.moc-drawer__close {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--moc-border);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moc-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
}

.moc-drawer__foot {
    padding: 1rem 1.25rem 1.35rem;
    border-top: 1px solid var(--moc-border);
    background: rgba(0, 0, 0, 0.25);
}

.moc-drawer__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.moc-drawer__row strong {
    color: #fff;
    font-size: 1.05rem;
}

.moc-drawer__cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: var(--moc-gold);
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 0.55rem;
    transition: background 0.2s, transform 0.2s;
}

.moc-drawer__cta:hover {
    background: var(--moc-gold-dark);
    color: #1a1a1a;
    transform: scale(1.01);
}

.moc-drawer__link {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.moc-drawer__link:hover {
    color: var(--moc-gold);
}

/* Line items */
.moc-line {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    border-radius: var(--moc-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--moc-border);
}

.moc-line__thumb {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #2a2a2a;
}

.moc-line__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moc-line__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--moc-gold);
    font-size: 1.25rem;
}

.moc-line__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.moc-line__price {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.45rem;
}

.moc-line__remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.25rem;
}

.moc-line__remove:hover {
    color: #f87171;
}

.moc-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 999px;
    border: 1px solid var(--moc-border);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.moc-qty__btn {
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moc-qty__btn:hover {
    background: rgba(245, 158, 11, 0.2);
}

.moc-qty__val {
    min-width: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.moc-empty {
    text-align: center;
    padding: 2.5rem 1rem;
}

.moc-empty__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--moc-gold);
}

.moc-empty__title {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.moc-empty__text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.25rem;
}

.moc-empty__btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    background: var(--moc-gold);
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
}

/* Cart count badge */
.cart-count--active {
    animation: moc-pop 0.35s ease;
}

@keyframes moc-pop {
    50% { transform: scale(1.2); }
}

/* Cart page */
.moc-page {
    max-width: 52rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.moc-page__head {
    margin-bottom: 1.75rem;
}

.moc-page__head h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--moc-gold);
    margin-bottom: 0.35rem;
}

.moc-page__head p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.moc-page-line {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.85rem;
    border-radius: var(--moc-radius);
    background: var(--moc-surface);
    border: 1px solid var(--moc-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.moc-page-line__media {
    width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #2a2a2a;
}

.moc-page-line__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moc-page-line__body {
    flex: 1;
    min-width: 0;
}

.moc-page-line__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.moc-page-line__top h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.moc-page-line__meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
    margin-bottom: 0.65rem;
}

.moc-page-line__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.moc-page-line__total {
    color: var(--moc-gold);
    font-size: 0.95rem;
}

.moc-page-line__remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.moc-page-summary {
    margin-top: 1.5rem;
    padding: 1.35rem;
    border-radius: var(--moc-radius);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(30, 30, 30, 0.85));
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.moc-page-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.moc-page-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.85rem;
    margin-top: 0.65rem;
    border-top: 1px solid var(--moc-border);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.moc-page-summary__total span:last-child {
    color: var(--moc-gold);
}

.moc-page-summary__cta {
    display: block;
    width: 100%;
    margin-top: 1.15rem;
    padding: 0.9rem;
    border-radius: 999px;
    background: var(--moc-gold);
    color: #1a1a1a;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.moc-page-summary__cta:hover {
    background: var(--moc-gold-dark);
    color: #1a1a1a;
}

.moc-page-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: var(--moc-radius);
    background: var(--moc-surface);
    border: 1px dashed var(--moc-border);
}

/* Checkout */
.moc-checkout-grid {
    display: grid;
    gap: 1.25rem;
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

@media (min-width: 900px) {
    .moc-checkout-grid {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: start;
    }
}

.moc-form-card {
    padding: 1.5rem;
    border-radius: var(--moc-radius);
    background: var(--moc-surface);
    border: 1px solid var(--moc-border);
    backdrop-filter: blur(12px);
}

.moc-form-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    color: #fff;
}

.moc-field {
    margin-bottom: 1rem;
}

.moc-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.moc-field input,
.moc-field select,
.moc-field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid var(--moc-border);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.9rem;
}

.moc-field input:focus,
.moc-field select:focus,
.moc-field textarea:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.moc-type-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.moc-type-pills--three {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 520px) {
    .moc-type-pills--three {
        grid-template-columns: 1fr;
    }
}

.moc-type-pill {
    position: relative;
}

.moc-type-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.moc-type-pill span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem;
    border-radius: var(--moc-radius-sm);
    border: 1px solid var(--moc-border);
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    transition: border-color 0.2s, background 0.2s;
}

.moc-type-pill input:checked + span {
    border-color: var(--moc-gold);
    background: rgba(245, 158, 11, 0.12);
    color: #fff;
}

.moc-checkout-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}

.moc-confirm {
    max-width: 32rem;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    text-align: center;
}

.moc-confirm__icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.moc-confirm__order {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--moc-gold);
    font-weight: 800;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Breakfast order button on cards */
.bfm-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--moc-gold), var(--moc-gold-dark));
    color: #1a1a1a;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bfm-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.bfm-order-btn--added {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.bfm-tea-order {
    margin-top: 0.65rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
    color: var(--moc-gold);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.bfm-tea-order:hover {
    background: rgba(245, 158, 11, 0.2);
}
