/* ================================================================
   MD Crackers - Cart & Checkout Styles
   ================================================================ */

/* ---- Review Cart Sticky Banner ---- */
.review-cart-banner {
    position: sticky;
    top: 63px;
    z-index: 990;
    background: linear-gradient(90deg, #1a1a2e 0%, rgba(230, 57, 70, 0.18) 100%);
    border-bottom: 1px solid rgba(230, 57, 70, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    gap: 16px;
    flex-wrap: wrap;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rb-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.rb-info i {
    color: #e63946;
    font-size: 1rem;
}

.rb-count {
    font-weight: 600;
    color: #fff;
}

.rb-total {
    color: #ff9f1c;
    font-weight: 700;
    font-size: 1rem;
}

.btn-review {
    background: linear-gradient(135deg, #e63946 0%, #ff9f1c 100%);
    color: #fff;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-review:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
}

/* ---- Product Qty Widget ---- */
.prod-qty-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.prod-minus,
.prod-plus {
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid rgba(230, 57, 70, 0.35);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-minus:hover,
.prod-plus:hover {
    background: #e63946;
    border-color: #e63946;
}

.prod-qty-num {
    min-width: 28px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

/* ---- Checkout Page Layout ---- */
.checkout-section {
    background: #0d0d0d;
    min-height: 60vh;
    padding: 40px 0 60px;
}

.checkout-alert {
    background: rgba(255, 159, 28, 0.1);
    border: 1px solid rgba(255, 159, 28, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: #ff9f1c;
}

.checkout-alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Box */
.checkout-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
}

.checkout-box-header {
    background: rgba(230, 57, 70, 0.15);
    border-bottom: 2px solid rgba(230, 57, 70, 0.3);
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-box-header i {
    color: #e63946;
}

.checkout-box-body {
    padding: 20px;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.cart-table thead {
    background: rgba(230, 57, 70, 0.08);
}

.cart-table th {
    padding: 12px 14px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.cart-table td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    vertical-align: middle;
}

.cart-table td:nth-child(2) {
    text-align: left;
}

.cart-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.ct-emoji {
    font-size: 1.8rem;
}

.ct-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.88rem;
}

.ct-sub {
    color: #e63946 !important;
    font-weight: 800 !important;
    font-size: 0.95rem;
}

/* Qty in checkout */
.ct-qty-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 6px;
}

.ct-minus,
.ct-plus {
    background: rgba(230, 57, 70, 0.2);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ct-minus:hover,
.ct-plus:hover {
    background: #e63946;
}

.ct-qty-input {
    width: 46px;
    text-align: center;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
}

.ct-del-row {
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid rgba(230, 57, 70, 0.3);
    color: #e63946;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.ct-del-row:hover {
    background: #e63946;
    color: #fff;
}

/* Totals */
.cart-totals {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cart-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
    font-size: 0.9rem;
}

.cart-total-row .ctr-label {
    color: #9e9e9e;
    font-weight: 600;
    min-width: 200px;
    text-align: right;
}

.cart-total-row .ctr-value {
    min-width: 100px;
    text-align: right;
    font-weight: 700;
    color: #fff;
}

.cart-grand-total .ctr-label {
    color: #e63946;
    font-size: 1rem;
    font-weight: 800;
}

.cart-grand-total .ctr-value {
    color: #e63946;
    font-size: 1.15rem;
    font-weight: 900;
}

/* Billing Form */
.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 7px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: #e63946;
    background: rgba(230, 57, 70, 0.07);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9e9e9e;
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
}

.form-field select option {
    background: #1a1a2e;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment Grid */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 20px;
}

.payment-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.payment-box h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.payment-box h4 i {
    color: #ff9f1c;
}

.payment-box p {
    font-size: 0.8rem;
    color: #9e9e9e;
    line-height: 1.7;
    margin-bottom: 4px;
}

.payment-box strong {
    color: #e0e0e0;
}

/* Terms */
.tos-list {
    padding: 0 20px 20px;
}

.tos-list li {
    font-size: 0.82rem;
    color: #9e9e9e;
    line-height: 1.75;
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.tos-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #e63946;
    font-weight: 700;
}

/* Action Buttons */
.checkout-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn-confirm {
    background: linear-gradient(135deg, #e63946 0%, #ff9f1c 100%);
    color: #fff;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.btn-delete {
    background: rgba(255, 100, 100, 0.12);
    color: #ff6464;
    border: 1px solid rgba(255, 100, 100, 0.3);
    padding: 13px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(255, 100, 100, 0.22);
}

.btn-more {
    background: rgba(255, 255, 255, 0.07);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 13px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Empty Cart */
.empty-cart-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-state .ec-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-cart-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.empty-cart-state p {
    color: #9e9e9e;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .review-cart-banner {
        top: 56px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cart-table {
        font-size: 0.77rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 9px 8px;
    }

    .ct-name {
        font-size: 0.78rem;
    }

    .checkout-actions {
        flex-direction: column;
    }

    .btn-confirm,
    .btn-delete,
    .btn-more {
        width: 100%;
        justify-content: center;
    }

    .cart-table thead .hide-mobile {
        display: none;
    }
}