/**
 * Bollebos Cart Page - Complete Redesign v3.0.9
 *
 * Clean, minimalist aesthetic
 * Maximum breathing room
 * Premium interactions
 * Mobile-first responsive
 *
 * Note: Foundation grid wrappers (.row, .thb-cart-column) are removed via PHP hooks
 */

/* ============================================
   HIDE LEGACY WPBAKERY CONTENT ABOVE CART
   The counter ("0 bomen geplant") and testimonials carousel
   above the cart are redundant — the cart sidebar already has
   its own "Jouw Impact" card. These WPBakery rows (page 1052)
   have broken JS (Odometer/Slick replaced by Splide).
   ============================================ */
.woocommerce-cart .testimonialsCheckout,
.woocommerce-cart .vc_custom_1651675855302 {
    display: none !important;
}

/* ============================================
   CART WRAPPER & BASE
   ============================================ */

.bb-cart-wrapper {
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.bb-cart-progress-bar {
    margin-bottom: 60px;
}

.bb-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.bb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bb-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #aaa;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.bb-step-active .bb-step-circle {
    background: var(--bb-orange, #D96A3B);
    border-color: var(--bb-orange, #D96A3B);
    color: white;
    box-shadow: 0 4px 16px rgba(217, 106, 59, 0.3);
}

.bb-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
}

.bb-step-active .bb-step-label {
    color: var(--bb-green-dark, #2D5016);
}

.bb-progress-connector {
    width: 80px;
    height: 2px;
    background: #e8e8e8;
    margin: 0 16px 30px;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.bb-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

@media (min-width: 1200px) {
    .bb-cart-grid {
        grid-template-columns: minmax(0, 1fr) 420px;
    }
}

/* ============================================
   LEFT COLUMN - CART CONTENT
   ============================================ */

.bb-cart-content {
    min-width: 0;
}

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

.bb-cart-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--bb-green-dark, #2D5016);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.bb-cart-count {
    font-size: 16px;
    color: #888;
    margin: 0;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.bb-products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.bb-product-card {
    display: grid;
    grid-template-columns: 120px 1fr 108px 80px 36px;
    gap: 24px;
    align-items: center;
    padding: 24px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bb-product-card:hover {
    border-color: rgba(217, 106, 59, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.bb-product-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #fafafa;
}

.bb-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bb-product-card:hover .bb-product-image img {
    transform: scale(1.05);
}

.bb-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.bb-product-details {
    min-width: 0;
}

.bb-product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--bb-green-dark, #2D5016);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.bb-product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bb-product-name a:hover {
    color: var(--bb-orange, #D96A3B);
}

.bb-product-meta {
    font-size: 14px;
    color: #999;
}

.bb-product-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bb-quantity-label,
.bb-price-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #aaa;
}

.bb-quantity-control input[type="number"] {
    width: 70px;
    height: 44px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--bb-green-dark, #2D5016);
    background: #fafafa;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bb-quantity-control input[type="number"]:hover {
    border-color: var(--bb-orange, #D96A3B);
    background: white;
}

.bb-quantity-control input[type="number"]:focus {
    outline: none;
    border-color: var(--bb-orange, #D96A3B);
    box-shadow: 0 0 0 3px rgba(217, 106, 59, 0.1);
    background: white;
}

.bb-product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.bb-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--bb-green-dark, #2D5016);
    text-align: right;
}

.bb-price-amount del {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #aaa;
    text-decoration: line-through;
}

.bb-price-amount ins {
    display: block;
    text-decoration: none;
}

.bb-product-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    color: #bbb;
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bb-product-remove:hover {
    background: rgba(255, 68, 68, 0.08);
    border-color: #ff4444;
    color: #ff4444;
    transform: rotate(90deg) scale(1.1);
}

/* ============================================
   CART ACTIONS
   ============================================ */

.bb-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

.bb-coupon-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 400px;
}

.bb-cart-actions .bb-coupon-wrapper .bb-coupon-input {
    flex: 1;
    height: 48px !important;
    min-height: 48px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 0 16px !important;
    margin: 0 !important;
    font-size: 15px !important;
    box-sizing: border-box;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bb-coupon-input:focus {
    outline: none;
    border-color: var(--bb-orange, #D96A3B);
    box-shadow: 0 0 0 3px rgba(217, 106, 59, 0.1);
}

.bb-coupon-btn {
    height: 48px;
    padding: 0 28px;
    background: #f5f5f5;
    color: var(--bb-green-dark, #2D5016);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bb-coupon-btn:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.bb-update-btn {
    height: 48px;
    padding: 0 24px;
    background: white;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bb-update-btn:hover {
    border-color: #c0c0c0;
    background: #f5f5f5;
    color: #333;
}

/* ============================================
   TRUST SIGNALS
   ============================================ */

.bb-trust-signals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 32px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 16px;
    margin-top: 40px;
}

.bb-trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bb-green-dark, #2D5016);
    transition: transform 0.3s ease;
}

.bb-trust-badge:hover {
    transform: translateY(-2px);
}

.bb-trust-badge svg {
    width: 28px;
    height: 28px;
    color: var(--bb-orange, #D96A3B);
    flex-shrink: 0;
}

/* ============================================
   RIGHT COLUMN - SIDEBAR
   ============================================ */

.bb-cart-sidebar {
    position: sticky;
    top: 32px;
}

.bb-summary-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 24px;
}

.bb-summary-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--bb-green-dark, #2D5016);
    margin: 0 0 32px 0;
    letter-spacing: -0.5px;
}

.bb-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bb-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
}

.bb-line-label {
    color: #888;
    font-weight: 500;
}

.bb-line-value {
    color: var(--bb-green-dark, #2D5016);
    font-weight: 600;
    text-align: right;
}

.bb-discount-line .bb-line-label,
.bb-discount-line .bb-line-value {
    color: var(--bb-orange, #D96A3B);
}

.bb-remove-discount {
    background: none;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    color: #bbb;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bb-remove-discount:hover {
    color: #ff4444;
    transform: scale(1.1);
}

.bb-total-line {
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
    font-size: 18px;
}

.bb-total-line .bb-line-label {
    color: var(--bb-green-dark, #2D5016);
    font-weight: 700;
}

.bb-total-amount {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: var(--bb-orange, #D96A3B) !important;
    letter-spacing: -1px !important;
}

.bb-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 64px;
    background: linear-gradient(135deg, #D96A3B 0%, #c75a33 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 32px;
    box-shadow: 0 8px 24px rgba(217, 106, 59, 0.25);
    position: relative;
    overflow: hidden;
}

.bb-checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.bb-checkout-btn:hover::before {
    left: 100%;
}

.bb-checkout-btn:hover {
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(217, 106, 59, 0.35);
}

.bb-checkout-btn svg {
    transition: transform 0.4s ease;
}

.bb-checkout-btn:hover svg {
    transform: translateX(4px);
}

.bb-payment-methods {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.bb-payment-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #aaa;
    margin-bottom: 12px;
}

.bb-payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.bb-payment-badge {
    padding: 8px 16px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.bb-payment-logo {
    height: 28px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
}

.bb-payment-logo:hover {
    transform: scale(1.08);
}

/* ============================================
   IMPACT CARD
   ============================================ */

.bb-impact-card {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bb-impact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(217, 106, 59, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.bb-impact-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(45, 80, 22, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.bb-impact-icon-wrap svg {
    color: var(--bb-green-dark, #2D5016);
    filter: drop-shadow(0 2px 8px rgba(45, 80, 22, 0.2));
}

.bb-impact-heading {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    color: var(--bb-green-dark, #2D5016);
}

.bb-impact-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 32px 0;
    position: relative;
    z-index: 1;
}

.bb-impact-description strong {
    color: var(--bb-green-dark, #2D5016);
    font-weight: 700;
}

.bb-impact-stat {
    position: relative;
    z-index: 1;
}

.bb-stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--bb-green-dark, #2D5016);
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.bb-stat-label {
    font-size: 14px;
    color: #666;
}

/* ============================================
   RESPONSIVE - SIDEBAR COMPACT (sidebar present at 1200px+)
   Product cards get compact layout to leave room for name
   ============================================ */

@media (min-width: 1200px) {
    .bb-product-card {
        grid-template-columns: 90px 1fr 80px 70px 36px;
        gap: 12px;
        padding: 20px;
    }

    .bb-product-image {
        width: 90px;
        height: 90px;
    }

    .bb-product-name {
        font-size: 16px;
    }

    .bb-quantity-label,
    .bb-price-label {
        display: none;
    }

    .bb-product-price {
        min-width: 0;
    }

    .bb-price-amount {
        font-size: 18px;
    }

    .bb-quantity-control input[type="number"] {
        width: 56px;
        height: 40px;
        font-size: 14px;
    }
}

@media (min-width: 1200px) and (max-width: 1499px) {
    .bb-cart-grid {
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 32px;
    }

    .bb-summary-card {
        padding: 32px;
    }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1199px) {
    .bb-cart-sidebar {
        position: static;
    }
}

@media (max-width: 992px) {
    .bb-product-card {
        grid-template-columns: 90px 1fr 108px 80px 36px;
        gap: 16px;
        padding: 20px;
    }

    .bb-product-image {
        width: 90px;
        height: 90px;
    }

    .bb-product-price {
        min-width: 80px;
    }

    .bb-product-name {
        font-size: 16px;
    }

    .bb-trust-signals {
        gap: 32px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .bb-cart-wrapper {
        padding: 40px 16px 60px;
    }

    .bb-cart-progress-bar {
        margin-bottom: 40px;
    }

    .bb-step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .bb-step-label {
        font-size: 12px;
    }

    .bb-progress-connector {
        width: 40px;
        margin: 0 8px 24px;
    }

    .bb-cart-title {
        font-size: 28px;
    }

    .bb-product-card {
        grid-template-columns: 80px 1fr 40px;
        grid-template-areas:
            "image details remove"
            "image quantity remove"
            "image price remove";
        gap: 12px 16px;
        padding: 16px;
        position: relative;
    }

    .bb-product-image {
        width: 80px;
        height: 80px;
        grid-area: image;
    }

    .bb-product-details {
        grid-area: details;
        align-self: start;
    }

    .bb-product-quantity {
        grid-area: quantity;
        display: block !important;
    }

    .bb-product-price {
        grid-area: price;
        display: block !important;
    }

    .bb-product-name {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .bb-quantity-label,
    .bb-price-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .bb-product-remove {
        grid-area: remove;
        position: static;
        align-self: start;
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .bb-cart-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .bb-coupon-wrapper {
        max-width: 100%;
    }

    .bb-trust-signals {
        flex-direction: column;
        gap: 24px;
    }

    .bb-trust-badge {
        justify-content: center;
    }

    .bb-summary-card {
        padding: 32px 24px;
    }

    .bb-summary-heading {
        font-size: 22px;
    }

    .bb-total-amount {
        font-size: 32px !important;
    }

    .bb-checkout-btn {
        height: 60px;
        font-size: 17px;
    }

    .bb-impact-card {
        padding: 32px 24px;
    }

    .bb-stat-number {
        font-size: 40px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bb-product-card {
    animation: fadeIn 0.4s ease;
}

/* ============================================
   TREE COUNTER (plugin: trees-checkout.php)
   ============================================ */

.bb-trees-counter {
    margin: 16px 0 8px;
    padding: 16px;
    background: #f0f7f0;
    border-radius: 10px;
    border: 1px solid #d4e8d4;
}

.bb-trees-counter .bb-summary-line {
    margin-bottom: 8px;
}

.bb-trees-message {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 6px;
}

.bb-trees-next {
    font-size: 13px;
    color: #888;
}

.bb-trees-next small {
    font-size: inherit;
}
