/**
 * Walmart Style Cart Page Stylesheet
 * Module: inc/modules/cart-manager/assets/css/cart-style.css
 */

.vbo-cart-page-wrapper {
    background-color: #f2f4f8;
    padding: 32px 0 64px 0;
    min-height: 70vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2e2f32;
}

.vbo-cart-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.vbo-cart-header-row {
    margin-bottom: 24px;
}

.vbo-cart-main-heading {
    font-size: 26px;
    font-weight: 700;
    color: #2e2f32;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vbo-cart-count-pill {
    font-size: 18px;
    font-weight: 400;
    color: #46474a;
}

.vbo-cart-sub-text {
    font-size: 14px;
    color: #6a6c70;
    margin: 0;
}

/* Grid Layout (Left Items 68% / Right Summary 32%) */
.vbo-cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

/* Card Common Styling */
.vbo-cart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e3e6ec;
}

/* Free Shipping Progress Card */
.vbo-shipping-perk-card {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #cce5ff;
    background-color: #f7faff;
}

.vbo-shipping-perk-icon svg {
    display: block;
}

.vbo-shipping-perk-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #0071dc;
}

.vbo-shipping-perk-info p {
    margin: 0;
    font-size: 13px;
    color: #46474a;
}

/* Cart Items Card Header */
.vbo-cart-group-header {
    border-bottom: 1px solid #eef0f4;
    padding-bottom: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vbo-cart-group-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #2e2f32;
}

.vbo-fulfillment-badge {
    background-color: #e6f1fc;
    color: #0071dc;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}

/* Single Cart Item Row */
.vbo-cart-item-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
    transition: opacity 0.2s ease;
}

.vbo-cart-item-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vbo-cart-item-row.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Thumb */
.vbo-cart-item-thumb {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background-color: #fafbfc;
    border: 1px solid #eef0f3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vbo-cart-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Info */
.vbo-cart-item-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.vbo-cart-item-title a {
    color: #2e2f32;
    text-decoration: none;
}

.vbo-cart-item-title a:hover {
    text-decoration: underline;
    color: #0071dc;
}

.vbo-cart-item-meta {
    font-size: 13px;
    color: #6a6c70;
    margin-bottom: 8px;
}

.vbo-cart-item-stock {
    font-size: 12px;
    color: #2a8703;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Actions Row: Stepper + Links */
.vbo-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
}

/* Quantity Stepper Pill */
.vbo-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #8e9094;
    border-radius: 100px;
    background: #ffffff;
    height: 36px;
    padding: 0 6px;
}

.vbo-qty-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    color: #2e2f32;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.vbo-qty-btn:hover {
    background-color: #f2f4f8;
}

.vbo-qty-input {
    width: 38px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #2e2f32;
    outline: none;
    background: transparent;
    -moz-appearance: textfield;
}

.vbo-qty-input::-webkit-outer-spin-button,
.vbo-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action text links */
.vbo-action-link {
    background: none;
    border: none;
    font-size: 13px;
    color: #46474a;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.vbo-action-link:hover {
    color: #d9381e;
}

/* Price Column */
.vbo-cart-item-price-wrap {
    text-align: right;
    min-width: 90px;
}

.vbo-item-line-total {
    font-size: 18px;
    font-weight: 700;
    color: #2e2f32;
    display: block;
}

.vbo-item-unit-price {
    font-size: 12px;
    color: #6a6c70;
}

/* RIGHT COLUMN: ORDER SUMMARY */
.vbo-order-summary-card {
    position: sticky;
    top: 24px;
}

.vbo-summary-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #2e2f32;
}

/* Primary Walmart Blue Checkout Button */
.vbo-checkout-btn-primary {
    display: block;
    width: 100%;
    background-color: #0071dc;
    color: #ffffff !important;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 100px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 113, 220, 0.28);
    transition: background 0.15s ease, transform 0.1s ease;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.vbo-checkout-btn-primary:hover {
    background-color: #005bb5;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Price Lines */
.vbo-summary-rows {
    border-bottom: 1px solid #eef0f4;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.vbo-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 12px;
    color: #46474a;
}

.vbo-summary-line span:last-child {
    font-weight: 600;
    color: #2e2f32;
}

.vbo-summary-line.vbo-free-shipping span:last-child {
    color: #2a8703;
    font-weight: 700;
}

/* Estimated Total */
.vbo-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 18px;
    font-weight: 700;
    color: #2e2f32;
    margin-bottom: 24px;
}

.vbo-summary-total-price {
    font-size: 24px;
    color: #2e2f32;
}

/* Promo Code Box */
.vbo-promo-toggle {
    margin-bottom: 20px;
}

.vbo-promo-trigger {
    background: none;
    border: none;
    color: #0071dc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vbo-promo-form {
    display: none;
    margin-top: 12px;
}

.vbo-promo-input-group {
    display: flex;
    gap: 8px;
}

.vbo-promo-input {
    flex: 1;
    border: 1px solid #b6b9bd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.vbo-promo-input:focus {
    border-color: #0071dc;
}

.vbo-promo-submit-btn {
    background: #2e2f32;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.vbo-promo-submit-btn:hover {
    background: #000000;
}

.vbo-coupon-notice {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
}

.vbo-coupon-notice.success { color: #2a8703; }
.vbo-coupon-notice.error { color: #d9381e; }

/* Trust Badges */
.vbo-cart-trust-badges {
    border-top: 1px solid #eef0f4;
    padding-top: 16px;
    font-size: 12px;
    color: #6a6c70;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* EMPTY CART STATE */
.vbo-empty-cart-card {
    text-align: center;
    padding: 60px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.vbo-empty-cart-icon {
    margin-bottom: 20px;
    color: #a2a6ad;
}

.vbo-empty-cart-title {
    font-size: 24px;
    font-weight: 700;
    color: #2e2f32;
    margin-bottom: 10px;
}

.vbo-empty-cart-desc {
    font-size: 15px;
    color: #6a6c70;
    margin-bottom: 28px;
}

.vbo-continue-shopping-btn {
    display: inline-block;
    background-color: #0071dc;
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
}

.vbo-continue-shopping-btn:hover {
    background-color: #005bb5;
}

/* Responsive */
@media (max-width: 991px) {
    .vbo-cart-layout-grid {
        grid-template-columns: 1fr;
    }
    .vbo-order-summary-card {
        position: static;
    }
}

@media (max-width: 580px) {
    .vbo-cart-item-row {
        grid-template-columns: 80px 1fr;
    }
    .vbo-cart-item-thumb {
        width: 80px;
        height: 80px;
    }
    .vbo-cart-item-price-wrap {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 8px;
    }
}