/* ======================================================
   ONPAL WEB — Shopping Cart CSS
   File: /web/assets/cart.css
   Green theme, Shopee-style cart layout
====================================================== */

.op-cart-title {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #d1d5db;
    color: #166534;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.op-cart-page {
    background: #f4f7f4;
    min-height: calc(100vh - 120px);
    padding: 24px 0 120px;
}

.op-cart-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.op-cart-head {
    display: grid;
    grid-template-columns: 48px 1fr 140px 170px 150px 130px;
    gap: 14px;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 22px;
    color: #64748b;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    margin-bottom: 14px;
}

.op-cart-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.op-cart-check input {
    display: none;
}

.op-cart-check span {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}

.op-cart-check input:checked + span {
    background: #16a34a;
    border-color: #16a34a;
}

.op-cart-check input:checked + span::after {
    content: "✓";
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.op-cart-check input:disabled + span {
    background: #e5e7eb;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.op-cart-shop {
    background: #ffffff;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.op-cart-shop__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #edf2f7;
}

.op-cart-shop__name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 16px;
}

.op-cart-shop__icon {
    color: #16a34a;
}

.op-cart-shop__arrow {
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
}

.op-cart-shop__items {
    display: flex;
    flex-direction: column;
}

.op-cart-item {
    display: grid;
    grid-template-columns: 48px 1fr 140px 170px 150px 130px;
    gap: 14px;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid #edf2f7;
}

.op-cart-item:last-child {
    border-bottom: 0;
}

.op-cart-item.is-disabled {
    opacity: .6;
}

.op-cart-item__product {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.op-cart-item__image {
    width: 82px;
    height: 82px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.op-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.op-cart-item__info {
    min-width: 0;
}

.op-cart-item__info h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    max-width: 360px;
}

.op-cart-item__info p {
    margin: 8px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.op-cart-item__info em {
    display: inline-block;
    margin-top: 8px;
    color: #dc2626;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
}

.op-cart-item__price {
    color: #0f172a;
    font-weight: 700;
}

.op-cart-item__qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border: 1px solid #dbe3ea;
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
}

.op-cart-item__qty button {
    width: 38px;
    height: 36px;
    border: 0;
    background: #ffffff;
    color: #166534;
    font-size: 18px;
    cursor: pointer;
}

.op-cart-item__qty button:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.op-cart-item__qty span {
    min-width: 44px;
    text-align: center;
    border-left: 1px solid #dbe3ea;
    border-right: 1px solid #dbe3ea;
    height: 36px;
    line-height: 36px;
    font-weight: 700;
}

.op-cart-item__total {
    color: #16a34a;
    font-weight: 900;
}

.op-cart-item__actions button {
    border: 0;
    background: transparent;
    color: #166534;
    cursor: pointer;
    font-weight: 700;
}

.op-cart-item__actions button:hover {
    text-decoration: underline;
}

.op-cart-footer {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 28px));
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.10);
    padding: 16px 22px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 24px;
    align-items: center;
    z-index: 20;
}

.op-cart-footer__select {
    color: #0f172a;
}

.op-cart-footer__summary {
    text-align: right;
}

.op-cart-footer__summary span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 4px;
}

.op-cart-footer__summary strong {
    color: #16a34a;
    font-size: 26px;
    font-weight: 900;
}

.op-cart-checkout {
    border: 0;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    padding: 14px 34px;
    min-width: 180px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22, 163, 74, .25);
}

.op-cart-checkout:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

.op-cart-empty {
    width: min(620px, calc(100% - 28px));
    margin: 60px auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 42px 28px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.op-cart-empty__icon {
    font-size: 54px;
    margin-bottom: 14px;
}

.op-cart-empty h1 {
    margin: 0;
    color: #166534;
    font-size: 26px;
}

.op-cart-empty p {
    color: #64748b;
    margin: 10px 0 24px;
}

.op-cart-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #16a34a;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 900px) {
    .op-cart-page {
        padding-top: 14px;
        padding-bottom: 150px;
    }

    .op-cart-title {
        font-size: 16px;
    }

    .op-cart-head {
        display: none;
    }

    .op-cart-shop__head {
        padding: 16px;
    }

    .op-cart-item {
        grid-template-columns: 34px 1fr auto;
        grid-template-areas:
            "check product product"
            "check price qty"
            "check total action";
        gap: 10px;
        padding: 16px;
    }

    .op-cart-item__check {
        grid-area: check;
    }

    .op-cart-item__product {
        grid-area: product;
        grid-template-columns: 76px 1fr;
    }

    .op-cart-item__price {
        grid-area: price;
        color: #f59e0b;
        font-size: 19px;
    }

    .op-cart-item__qty {
        grid-area: qty;
        justify-self: end;
    }

    .op-cart-item__total {
        grid-area: total;
        display: none;
    }

    .op-cart-item__actions {
        grid-area: action;
        justify-self: end;
    }

    .op-cart-footer {
        width: 100%;
        border-radius: 18px 18px 0 0;
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 14px 16px;
    }

    .op-cart-footer__select {
        display: none;
    }

    .op-cart-footer__summary {
        text-align: left;
    }

    .op-cart-footer__summary strong {
        font-size: 24px;
    }

    .op-cart-checkout {
        min-width: 160px;
        padding: 13px 20px;
    }
}