/* ================================================================
   MUSKAN BAKERY - Cart, Checkout & Order CSS
   ================================================================ */

/* ── Product Price & Add to Cart on Products Page ── */
.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #b71c1c;
    margin: 6px 0 8px;
}
.card__price {
    font-size: 15px;
    font-weight: 700;
    color: #b71c1c;
    margin: 4px 0 8px;
    font-family: 'Montserrat', sans-serif;
}
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #b71c1c;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
}
.add-to-cart-btn:hover {
    background: #8e0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(183,28,28,0.35);
}
.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.crt-color {color:#fff}

/* ── Cart Toast ── */
.cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2e7d32;
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
.cart-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ── Cart Page ── */
.cart-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}
.cart-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-page-title i { color: #b71c1c; }

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}
.empty-cart i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}
.empty-cart h2 {
    font-size: 22px;
    color: #555;
    margin-bottom: 10px;
}
.empty-cart p {
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
}
.continue-shopping-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b71c1c;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}
.continue-shopping-btn:hover {
    background: #8e0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(183,28,28,0.3);
}

/* Cart Layout */
.cart-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.cart-items-section { flex: 1; }

/* Cart Table Header */
.cart-table-header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 60px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 60px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}
.cart-item:hover { background: #fafafa; }

.ci-product {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ci-product img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}
.ci-product h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.ci-price {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}
.ci-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: #b71c1c;
}

/* Quantity Controls */
.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f5f5f5;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #555;
}
.qty-btn:hover { background: #e0e0e0; }
.qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    background: #fff;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Remove Button */
.remove-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.remove-btn:hover {
    color: #c62828;
    background: #ffebee;
}

/* ── Cart Summary / Order Summary ── */
.cart-summary {
    width: 340px;
    background: #fafafa;
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid #eee;
    position: sticky;
    top: 100px;
}
.cart-summary h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #555;
}
.summary-total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.summary-total span:last-child { color: #b71c1c; }
.summary-divider {
    height: 1px;
    background: #ddd;
    margin: 12px 0;
}
.shipping-note {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Checkout Button */
.checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #b71c1c;
    color: #fff;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 20px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}
.checkout-btn:hover {
    background: #8e0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(183,28,28,0.35);
}
.checkout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.continue-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}
.continue-link:hover { color: #b71c1c; }
.secure-note {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 12px;
    font-family: 'Manrope', sans-serif;
}
.secure-note i { color: #2e7d32; }

/* ── Checkout Page ── */
.checkout-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.checkout-form-section { flex: 1;width: 100%; }
.section-heading {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-heading i { color: #b71c1c; }
.checkout-form { background: #fafafa; border-radius: 12px; padding: 24px; border: 1px solid #eee; }
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.form-group {
    flex: 1;
}
.form-group.full-width {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    transition: border-color 0.2s;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #b71c1c;
    box-shadow: 0 0 0 3px rgba(183,28,28,0.08);
}
.form-group textarea { resize: vertical; }

/* Checkout Items List */
.checkout-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}
.checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.checkout-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}
.checkout-item-info {
    flex: 1;
}
.checkout-item-info span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.checkout-item-info small {
    font-size: 11px;
    color: #999;
}
.checkout-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #b71c1c;
    white-space: nowrap;
}
.checkout-summary {
    width: 380px;
}

/* ── Order Success / Failed Pages ── */
.order-result-page {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 0 auto;
}
.result-icon {
    font-size: 70px;
    margin-bottom: 20px;
}
.success-icon i { color: #2e7d32; }
.failed-icon i { color: #c62828; }
.order-result-page h1 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}
.order-result-page > p {
    font-size: 14px;
    color: #777;
    margin-bottom: 25px;
}
.error-reason {
    background: #ffebee;
    color: #c62828;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 20px;
}
.retry-note {
    font-size: 13px;
    color: #888;
    margin: 15px 0 25px;
}
.email-note {
    font-size: 13px;
    color: #2e7d32;
    margin: 20px 0;
    background: #e8f5e9;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

/* Order Details Box */
.order-details-box {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
    border: 1px solid #eee;
    margin: 20px auto;
    max-width: 450px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: #888; }
.detail-row strong { color: #333; font-size: 13px; }
.status-success { color: #2e7d32 !important; }
.status-failed { color: #c62828 !important; }

.result-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .cart-layout,
    .checkout-layout {
        flex-direction: column;
    }
    .cart-summary,
    .checkout-summary {
        width: 100%;
        position: static;
    }
    .cart-table-header { display: none; }
    .cart-item {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 10px;
    }
    .ci-product { width: 100%; }
    .ci-price { 
        order: 2;
        font-size: 13px;
    }
    .ci-qty { order: 3; }
    .ci-subtotal { 
        order: 4; 
        margin-left: auto;
    }
    .ci-action { order: 5; }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group {
        margin-bottom: 14px;
    }
    .cart-page-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ci-product img {
        width: 55px;
        height: 55px;
    }
    .cart-summary {
        padding: 20px 16px;
    }
    .checkout-form {
        padding: 18px 14px;
    }
}
