﻿/* =========================================
   CART PAGE
========================================= */

.cart-page {
    padding-top: 140px;
    padding-bottom: 80px;
}

.cart-header {
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 42px;
    font-weight: 800;
}

.cart-header p {
    color: #777;
}

/* =========================================
   CART ITEM
========================================= */

.cart-item {
    position: relative;
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #fde6c8;
    border-radius: 16px;
    margin-bottom: 20px;
}

.cart-item img {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 12px;
}

.cart-content {
    flex: 1;
}

.cart-content h4 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 700;
}

.cart-price {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.cart-rice {
    margin: 4px 0 0;
    font-size: 13px;
    color: #888;
}

.cart-rice small {
    color: #888;
}

.rice-info {
    display: block;
    color: var(--primary);
    font-size: 12px;
    margin-top: 4px;
}

.rice-info i {
    margin-right: 4px;
}

.add-ons-info {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.add-ons-info i {
    margin-right: 4px;
}

.item-total {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

/* =========================================
   QUANTITY & BUTTONS - SAMA TINGGI
========================================= */

.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: #f4f4f4;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #e9e9e9;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.qty-number {
    font-weight: 600;
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}

.qty-form {
    display: inline;
}

/* =========================================
   REMOVE BUTTON - SAMA TINGGI DENGAN QTY
========================================= */

.remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.remove-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.remove-btn:active {
    transform: scale(0.95);
}

.remove-btn i {
    font-size: 16px;
}

.remove-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =========================================
   CART SUMMARY
========================================= */

.cart-summary {
    padding: 25px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    padding-top: 8px;
}

.summary-row.total strong {
    color: var(--primary);
}

/* =========================================
   MINIMUM ORDER ALERT
========================================= */

.minimum-order-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    margin: 16px 0;
    background: var(--white, #fff);
    color: var(--text, #333);
    border: 1px solid var(--border, #f1ede9);
}

.minimum-order-alert.success,
.minimum-order-alert.warning { background: var(--white, #fff) !important; color: var(--text, #333) !important; border-color: var(--border, #f1ede9); border-left: 3px solid var(--primary, #d57028); }
.minimum-order-alert .alert-title { font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.minimum-order-alert .alert-detail { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.6; }
.minimum-order-alert .alert-detail .item { display: flex; align-items: center; gap: 8px; }
.minimum-order-alert .alert-detail .item.check i { color: #16a34a; }
.minimum-order-alert .alert-detail .item.cross i { color: #dc2626; }
.minimum-order-alert .alert-detail .item.hint { color: var(--muted, #777); margin-top: 2px; font-size: 12px; }

.minimum-order-success {
    background: #eef8f0;
    color: #2f7d42;
}

/* =========================================
   CHECKOUT BUTTON
========================================= */

.btn-checkout {
    width: 100%;
    display: block;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s ease;
}

.btn-checkout:hover {
    background: var(--primary-dark);
}

.btn-checkout.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* =========================================
   EMPTY CART
========================================= */

.empty-cart {
    padding: 70px 30px;
    text-align: center;
    border: 1px solid #fde6c8;
    border-radius: 16px;
    background: white;
}

.empty-cart-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8eee9;
    color: var(--primary);
    font-size: 30px;
}

.empty-cart h3 {
    margin-bottom: 10px;
    font-weight: 700;
}

.empty-cart p {
    color: #777;
    margin-bottom: 25px;
}

.btn-empty-cart {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-empty-cart:hover {
    background: var(--primary-dark);
}

/* =========================================
   ALERT
========================================= */

.alert {
    border-radius: 12px;
    padding: 16px 20px;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* =========================================
   CHECKOUT MINIMUM ALERT
========================================= */

.checkout-minimum-alert {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    background: #fff3f3;
    color: #d9534f;
    font-size: 12px;
    text-align: center;
}

.checkout-minimum-alert.success {
    background: #eef8f0;
    color: #2f7d42;
}

/* =========================================
   CONTINUE PAYMENT BUTTON
========================================= */

.continue-payment-button {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.continue-payment-button:not(.disabled) {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

/* =========================================
   SWEETALERT CUSTOM
========================================= */

.swal2-confirm-custom {
    background: #dc2626 !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.swal2-confirm-custom:hover {
    background: #b91c1c !important;
    transform: scale(1.02) !important;
}

.swal2-cancel-custom {
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel-custom:hover {
    background: #e2e8f0 !important;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 767px) {
    .cart-page {
        padding-top: 120px;
    }

    .cart-header h1 {
        font-size: 32px;
    }

    .cart-item {
        gap: 12px;
        padding: 15px;
    }

    .cart-item img {
        width: 90px;
        height: 90px;
    }

    .cart-content h4 {
        font-size: 15px;
    }

    .item-total {
        position: absolute;
        right: 15px;
        top: 15px;
        font-size: 13px;
    }

    .qty-wrapper {
        gap: 8px;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .remove-btn {
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .remove-btn span {
        display: none;
    }

    .remove-btn {
        padding: 0 12px;
        min-width: 36px;
    }

    .remove-btn i {
        font-size: 18px;
        margin: 0;
    }

    .qty-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .qty-number {
        font-size: 14px;
        min-width: 24px;
    }

    .cart-summary {
        padding: 18px;
    }

    .cart-item img {
        width: 70px;
        height: 70px;
    }
}
/* BOOTSTRAP ICONS GUARD - jangan timpa font icon */
.bi::before,[class^="bi-"]::before,[class*=" bi-"]::before{font-family:"bootstrap-icons"!important;font-style:normal!important;font-weight:normal!important;}


/* =====================================================
   PENYESUAIAN DESAIN (tambahan)
===================================================== */

/* ---------- Header: panel krem, teks gelap ---------- */
.cart-header {
    background: var(--panel, #fffaf0);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 28px 34px;
    box-shadow: 0 12px 30px rgba(90, 20, 0, 0.25);
}

.cart-header h1 {
    color: var(--dark, #7a1a0a);
}

.cart-header p {
    margin: 0;
    color: var(--text, #5a2a12);
}

/* ---------- Item keranjang ---------- */
.cart-item {
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 25px rgba(90, 20, 0, 0.22);
}

.cart-content h4 {
    color: var(--dark, #7a1a0a);
}

.cart-rice,
.cart-rice small {
    color: #7a4a30;
}

.add-ons-info {
    color: #7a4a30;
}

.item-total {
    color: var(--dark, #7a1a0a);
}

/* ---------- Tombol jumlah ---------- */
.qty-btn {
    background: #fff4d6;
    color: var(--dark, #7a1a0a);
}

.qty-btn:hover {
    background: var(--accent, #ffd936);
}

.qty-number {
    color: var(--dark, #7a1a0a);
}

/* ---------- Ringkasan ---------- */
.cart-summary {
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(90, 20, 0, 0.28);
}

.cart-summary h3,
.cart-summary h4 {
    color: var(--dark, #7a1a0a);
}

.summary-row span {
    color: var(--text, #5a2a12);
}

.summary-row.total {
    border-top: 2px dashed var(--border, #f5c9a8);
    margin-top: 6px;
}

/* ---------- Tombol checkout ---------- */
.btn-checkout {
    background: var(--primary, #d9430a);
    box-shadow: 0 8px 20px rgba(217, 67, 10, 0.4);
}

.btn-checkout:hover {
    transform: translateY(-2px);
}

/* ---------- Keranjang kosong ---------- */
.empty-cart {
    background: var(--panel, #fffaf0);
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(90, 20, 0, 0.25);
}

.empty-cart-icon {
    background: rgba(255, 217, 54, 0.35);
    color: var(--primary, #d9430a);
}

.empty-cart h3 {
    color: var(--dark, #7a1a0a);
}

.empty-cart p {
    color: var(--text, #5a2a12);
}

.btn-empty-cart {
    background: var(--primary, #d9430a);
    box-shadow: 0 6px 16px rgba(217, 67, 10, 0.35);
}

/* ---------- Ikon info di dalam item ---------- */
.rice-info {
    color: var(--primary, #d9430a);
}