/* GO.LYVK — global cart: floating button + drawer, loaded on every page
   (see frontend/js/cart.js). Extracted from menu-category.css, where it used
   to live only because the cart button/drawer used to be injected exclusively
   on menu-category pages in delivery mode. */

/* ===== CART BUTTON ===== */

.cart-button {
    position: fixed;
    right: 40px;
    bottom: 40px;
    width: 80px;
    height: 80px;
    border: none;
    outline: none;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow:
        0 20px 50px rgba(0,0,0,.40),
        0 8px 20px rgba(0,0,0,.12);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: scale(.8);
    transition: .3s cubic-bezier(.34,1.56,.64,1);
}

.cart-button svg {
    width: 40px;
    height: 40px;
    stroke: white;
    flex-shrink: 0;
}

.cart-button:hover {
    background: #d8a340;
    transform: scale(1.08);
}

.cart-button:focus {
    outline: none;
}

.cart-button.visible {

    opacity: 1;
    visibility: visible;

    transform: scale(1);

}

.cart-button:focus-visible {
    outline: none;
}

#cartCount {

    position: absolute;

    top: -2px;
    right: -2px;

    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: #d8a340;

    color: white;

    font-size: 13px;
    font-weight: 700;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 3px solid white;

    line-height: 1;
}

.checkout-btn {
    width: 100%;

    margin-top: 25px;

    padding: 18px;

    border: none;

    background: black;
    color: white;

    cursor: pointer;
}

/* =========================
   CART DRAWER
========================= */

.cart-overlay {

    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.45);

    opacity: 0;
    visibility: hidden;

    transition: .3s;

    z-index: 9998;
}

.cart-overlay.active {

    opacity: 1;
    visibility: visible;
}

.cart-drawer {

    position: fixed;

    top: 0;
    right: 0;

    width: 420px;
    max-width: 100%;

    height: 100vh;

    background: white;

    z-index: 9999;

    transform: translateX(100%);

    transition: .35s ease;

    display: flex;
    flex-direction: column;
}

.cart-drawer.active {

    transform: translateX(0);
}

.cart-drawer__header {

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 30px;

    border-bottom: 1px solid #eee;
}

.cart-drawer__header h2 {

    font-family: var(--font-display);

    font-size: 36px;
}

#closeCart {

    border: none;
    background: none;

    font-size: 36px;

    cursor: pointer;
}

.cart-items {

    flex: 1;

    overflow-y: auto;

    padding: 25px;
}

.cart-empty {

    color: #999;
}

.cart-item {

    display: flex;

    justify-content: space-between;

    padding: 18px 0;

    border-bottom: 1px solid #eee;
}

.cart-item__name {

    font-size: 18px;
}

.cart-item__price {

    font-weight: 600;
}

.cart-footer {

    border-top: 1px solid #eee;

    padding: 25px;
}

.cart-total {

    display: flex;

    justify-content: space-between;

    font-size: 22px;

    margin-bottom: 20px;

    font-weight: 600;
}

.checkout-btn {

    width: 100%;

    height: 58px;

    border: none;

    background: #d9a441;

    color: white;

    font-size: 16px;

    cursor: pointer;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 24px 0;

    border-bottom: 1px solid #ececec;
}

.cart-item__info {
    flex: 1;
}

.cart-item__name {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.cart-item__price {
    font-size: 15px;
    color: rgba(0,0,0,.55);
    letter-spacing: .08em;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 8px;

    border: 1px solid #ececec;
    border-radius: 999px;
}

.cart-item__quantity span {
    min-width: 20px;
    text-align: center;

    font-size: 18px;
    font-weight: 600;
}

/* Editable quantity in the cart drawer (direct numeric entry; spinner hidden) */
.cart-qty__input {
    width: 44px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    border: none;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cart-qty__input:focus { outline: none; }
.cart-qty__input::-webkit-outer-spin-button,
.cart-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-minus,
.cart-plus {
    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    font-size: 24px;
    line-height: 1;

    transition: .25s;
}

.cart-minus {
    background: #f3f0ea;
    color: #222;
}

.cart-plus {
    background: #d9a441;
    color: white;
}

.cart-minus:hover,
.cart-plus:hover {
    transform: scale(1.08);
}

/* ── RESPONSIVE (larger touch targets) ── */
.device-mobile .cart-button,
.device-tablet .cart-button { width: 90px; height: 90px; bottom: 20px; right: 20px; }

.device-mobile #cartCount,
.device-tablet #cartCount { width: 34px; height: 34px; font-size: 18px; top: -4px; right: -4px; }
