/* ════════════════════════════════════════════════════════════
   FCM Basket — Custom cart page styles
   Overrides default WooCommerce cart output from [woocommerce_cart]
   ════════════════════════════════════════════════════════════ */

/* ══ TWO-COLUMN LAYOUT ════════════════════════════════════════ */
.woo-cart-section  .woocommerce {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: auto auto;
    gap: 0 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.woo-cart-section .woocommerce-notices-wrapper {
    grid-column: 1;
}

.woo-cart-section .woocommerce-notices-wrapper:empty {
    display: none;
    padding: 0;
    margin: 0;
    height: 0;
    overflow: hidden;
}

.woo-cart-section .fcm-basket-header {
    grid-column: 1;
}

.woo-cart-section .woocommerce-cart-form {
    grid-column: 1;
    float: none !important;
    width: 100% !important;
}


.woo-cart-section .cart-collaterals {
    grid-column: 2;
    grid-row: 1 / -1;
    border-left: none !important;
    #ppcp-recaptcha-v2-container{
        margin: 0!important;
    }
}

/* ══ BASKET HEADER (injected via hook) ════════════════════════ */
.fcm-basket-header {
    border: 1px solid #ddd;
    border-radius: 3px 3px 0 0;
    padding: 20px 25px;
    margin-bottom: 0;
    min-height: 75px;
    display: flex;
    align-items: center;
}

/* Remove gap: notices wrapper sits between header and form */
.fcm-basket-header ~ .woocommerce-notices-wrapper:empty {
    display: none;
}

.woocommerce-cart .woocommerce-cart-form {
    border-top: none !important;
    margin-top: 0 !important;
    border-radius: 0 0 3px 3px;
}

.fcm-basket-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #232323;
    line-height: 30px;
}


/* ══ CART TABLE ════════════════════════════════════════════════ */
.woo-cart-section .woocommerce-cart-form {
    border: 1px solid #ddd;
    padding: 20px 25px 30px;
}

.woo-cart-section .shop_table.cart {
    border: none !important;
    margin: 0 !important;
    border-collapse: collapse;
}

.woo-cart-section .shop_table.cart th {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #555;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    border-top: none;
    text-transform: none;
    background: transparent;
}

.woo-cart-section .shop_table.cart td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    border-top: none;
    vertical-align: middle;
    font-family: 'Poppins', sans-serif;
}

.woo-cart-section .shop_table.cart th,
.woo-cart-section .shop_table.cart td {
    border-left: none !important;
    border-right: none !important;
}

/* Product name */
.woo-cart-section .shop_table .product-name a {
    font-weight: 700;
    font-size: 15px;
    color: #000 !important;
    text-decoration: none;
}

/* Variations */
.woo-cart-section .shop_table .product-name .variation {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.woo-cart-section .shop_table .product-name .variation dt,
.woo-cart-section .shop_table .product-name .variation dd {
    display: inline;
    margin: 0;
    padding: 0;
    font-weight: 400;
    float: none!important;
}

.woo-cart-section .shop_table .product-name .variation dd p {
    display: inline;
    margin: 0;
}

.woo-cart-section .shop_table .product-name .variation dt::after {
    content: ' ';
}

.woo-cart-section .shop_table .product-name .variation dd::after {
    content: '\A';
    white-space: pre;
}

/* Price & Subtotal */
.woo-cart-section .shop_table .product-price .amount,
.woo-cart-section .shop_table .product-subtotal .amount {
    font-weight: 700;
    font-size: 15px;
    color: #000;
}

/* Thumbnail */
.woo-cart-section .shop_table .product-thumbnail img {
    width: 79px;
    min-width: 79px;
    height: 75px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Remove button */
.woo-cart-section .shop_table .product-remove a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    background: #f9f9f9;
    border-radius: 100px;
    color: #a00 !important;
    font-size: 21px;
    line-height: 21px;
    text-decoration: none;
}

/* Quantity input */
.woo-cart-section .shop_table .quantity{
    margin: 0!important;
}
.woo-cart-section .shop_table .quantity .qty {
    width: 60px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1px;
    text-align: center;
    font-size: 14px;
    color: #888;
    font-family: 'Poppins', sans-serif;
    padding: 0;
    margin: 0;
}

.woocommerce table.shop_table_responsive tr:nth-child(2n) td, .woocommerce-page table.shop_table_responsive tr:nth-child(2n) td{
    background-color: transparent!important;
}

/* ══ COUPON ROW ═══════════════════════════════════════════════ */
.woo-cart-section .shop_table .actions {
    border-bottom: none !important;
    padding-top: 20px !important;
}

.woo-cart-section .coupon {
    display: flex !important;
    gap: 11px;
    align-items: center;
    float: none !important;
}

.woo-cart-section .coupon .input-text {
    width: 221px !important;
    padding: 10px 16px !important;
    border: 1px solid #ddd !important;
    font-size: 14px;
    color: #999;
    font-family: 'Poppins', sans-serif;
    border-radius: 0;
}

.woo-cart-section .coupon .input-text::placeholder {
    font-style: italic;
    color: #999;
}

.woo-cart-section .coupon .button {
    background: #fff !important;
    border: 1px solid #64ad20 !important;
    color: #64ad20 !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 20px !important;
    border-radius: 1px !important;
    cursor: pointer;
    line-height: 28.9px;
    min-width: 138px;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.woo-cart-section .coupon .button:hover {
    background: #64ad20 !important;
    color: #fff !important;
}

/* Hide Update cart button */
.woo-cart-section .actions > .button[name="update_cart"] {
    display: none !important;
}

/* ══ VAT INFO BOX ═════════════════════════════════════════════ */
.fcm-basket-vat-info {
    background: #F0FBFE;
    padding: 20px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 20px;
}

.fcm-basket-vat-info__icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.fcm-basket-vat-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.48;
    font-weight: 400;
    color: #125177;
    font-family: 'Poppins', sans-serif;
}

/* ══ SIDEBAR — ORDER SUMMARY ═════════════════════════════════ */
.woo-cart-section .cart-collaterals {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.woo-cart-section .cart_totals {
    float: none !important;
    width: 100% !important;
    border: none;
    border-radius: 3px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    order: 1;
}

/* Card border wrapping heading + products + totals only */
.woo-cart-section .cart_totals > h2 {
    order: 1;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px 3px 0 0;
    padding: 20px 25px;
    margin: 0 !important;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #232323;
    line-height: 30px;
    min-height: 75px;
    display: flex;
    align-items: center;
}

/* Summary product list (injected via hook) */
.fcm-summary-products {
    order: 2;
    padding: 20px 25px;
    border: 1px solid #ddd;
    border-top: none;
}

.woo-cart-section .cart_totals .shop_table {
    order: 3;
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 3px 3px;
}

/* Proceed to checkout + PayPal messaging */
.woo-cart-section .wc-proceed-to-checkout {
    order: 4;
}

.fcm-summary-product {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.fcm-summary-product + .fcm-summary-product {
    margin-top: 15px;
}

.fcm-summary-product__img {
    width: 79px;
    height: 75px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.fcm-summary-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fcm-summary-product__name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.48;
    color: #000;
}

/* Totals table */
.woo-cart-section .cart_totals .shop_table {
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 3px 3px !important;
    margin: 0 !important;
    padding: 20px 25px !important;
}

.woo-cart-section .cart_totals .shop_table th,
.woo-cart-section .cart_totals .shop_table td {
    padding: 6px 0 !important;
    border: none !important;
    font-family: 'Poppins', sans-serif;
    background: transparent !important;
}

.woo-cart-section .cart_totals .shop_table th {
    font-weight: 700!important;
    font-size: 14px!important;
    color: #555!important;
    width: auto;
    text-transform: none !important;
}

.woo-cart-section .cart_totals .shop_table td {
    text-align: right;
    font-size: 16px !important;
    font-weight: 700; 
    color: #000;
    text-transform: none !important;
}

/* Hide native WC shipping row — replaced by our custom fcm-basket-delivery-row */
.woo-cart-section .cart_totals tr.shipping {
    display: none !important;
}

/* Custom Delivery row */
.woo-cart-section .cart_totals tr.fcm-basket-delivery-row th {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #777;
}

.woo-cart-section .cart_totals tr.fcm-basket-delivery-row td {
    text-align: right;
}

.woo-cart-section .cart_totals tr.fcm-basket-delivery-row .fcm-basket-delivery-calc {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: #999;
}

/* VAT row — replace with "Confirmed at next step" */
.woo-cart-section .cart_totals .tax-total td .amount,
.woo-cart-section .cart_totals .tax-total td bdi {
    display: none !important;
}

.woo-cart-section .cart_totals .tax-total td {
    font-weight: 400 !important;
    font-style: italic;
    font-size: 15px !important;
    color: #999 !important;
}

.woo-cart-section .cart_totals .tax-total td::after {
    content: 'Confirmed at next step';
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: #999;
}

/* Total row */
.woo-cart-section .cart_totals .order-total th {
    font-size: 18px;
    color: #555;
    padding-top: 13px !important;
    border-top: 1px solid #ddd !important;
}

.woo-cart-section .cart_totals .order-total td {
    font-size: 18px;
    padding-top: 13px !important;
    border-top: 1px solid #ddd !important;
}

/* Rename "Total" to "Total (ex. VAT)" via content trick — see PHP for label override */

/* ══ PROCEED TO CHECKOUT ══════════════════════════════════════ */
.woo-cart-section .wc-proceed-to-checkout {
    padding: 0 !important;
    margin-top: 22px;
}
 
.woo-cart-section .wc-proceed-to-checkout a.checkout-button.wc-forward {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #64ad20 !important;
    border: 1px solid #64ad20 !important;
    padding: 13px 69px !important;
    border-radius: 1px !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 17px !important;
    color: #fff !important;
    text-decoration: none;
    text-align: center;
    line-height: 28.9px;
    margin: 0 !important;
    transition: background 0.2s;
}

.woo-cart-section .wc-proceed-to-checkout a.checkout-button.wc-forward:hover {
    background: #579a1b !important;
    border-color: #579a1b !important;
    padding: 13px 69px !important;
}

/* ══ ACCEPTED PAYMENTS (injected via hook) ════════════════════ */
.fcm-accepted-payments {
    order: 5;
    margin-top: 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fcm-accepted-payments h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #111;
    text-transform: uppercase;
    line-height: 16px;
}

.fcm-accepted-payments img {
    max-width: 343px;
    height: auto;
}

/* ══ HIDE DIVI WRAPPING on basket page ════════════════════════ */
.woo-cart-section .et_pb_code_inner > .woocommerce {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0 40px;
    align-items: start;
}

.woo-cart-section .woo-cart-section  > .et_pb_row {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;    
}

/* ══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 980px) {
    .woo-cart-section .woocommerce,
    .woo-cart-section .et_pb_code_inner > .woocommerce {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .woo-cart-section .cart-collaterals {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    /* ── Basket header ── */
    .fcm-basket-header {
        padding: 15px;
    }
    .fcm-basket-header h2 {
        font-size: 16px;
    }

    /* ── Cart form ── */
    .woo-cart-section .woocommerce-cart-form {
        padding: 15px !important;
    }

    /* ── Responsive cart table ── */
    .woo-cart-section .shop_table.cart thead {
        display: none;
    }
    .woo-cart-section .shop_table.cart,
    .woo-cart-section .shop_table.cart tbody {
        display: block;
        width: 100%;
    }
    .woo-cart-section .shop_table.cart tr.cart_item {
        display: block;
        padding-bottom: 10px!important;
        margin-bottom: 10px;
        border-bottom: 1px solid #ddd;
    }
    .woo-cart-section .shop_table.cart td {
        display: block;
        border-bottom: none !important;
        border-top: none !important;
        padding: 6px 0 !important;
    }

    /* Remove button: own line, no top border */
    .woo-cart-section .shop_table.cart .product-remove {
        padding-top: 5px !important;
        padding-bottom: 4px !important;
    }

    /* Product thumbnail + name: thumbnail floats left next to name */
    .woo-cart-section .shop_table.cart .product-thumbnail {
        float: left;
        width: auto !important;
        padding: 0 !important;
        margin-right: 15px;
        border-top: 1px solid #ddd;
        padding-top: 8px !important;
        &:before{
            content: none!important;
        }
    }
    .woo-cart-section .shop_table.cart .product-name {
        overflow: hidden;
        min-height: 75px;
        border-top: 1px solid #ddd;
        padding-top: 8px !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Price, Quantity, Subtotal: clear float, flex label:value rows */
    .woo-cart-section .shop_table.cart .product-price,
    .woo-cart-section .shop_table.cart .product-quantity,
    .woo-cart-section .shop_table.cart .product-subtotal {
        clear: both;
        display: flex !important;
        align-items: center;
        border-top: 1px solid #ddd;
        gap: 10px;
        padding: 8px 0 !important;
        justify-content: space-between;
    }
    .woo-cart-section .shop_table.cart .product-price::before,
    .woo-cart-section .shop_table.cart .product-quantity::before,
    .woo-cart-section .shop_table.cart .product-subtotal::before {
        font-family: 'Poppins', sans-serif;
        font-weight: 700;
        font-size: 14px;
        color: #555;
        flex-shrink: 0;
        width: 80px;
    }
    .woo-cart-section .shop_table.cart .product-price::before    { content: 'Price:'; }
    .woo-cart-section .shop_table.cart .product-quantity::before  { content: 'Quantity:'; }
    .woo-cart-section .shop_table.cart .product-subtotal::before  { content: 'Subtotal:'; }

    /* ── Coupon ── */
    .woo-cart-section .coupon {
        flex-direction: column;
        align-items: stretch !important;
    }
    .woo-cart-section .coupon .input-text {
        width: 100% !important;
    }

    /* ── Order summary sidebar (mobile) ── */
    .woo-cart-section .cart_totals > h2 {
        font-size: 16px;
        padding: 15px;
    }
    .fcm-summary-products {
        padding: 15px;
    }
    .woo-cart-section .cart_totals .shop_table {
        padding: 15px !important;
    }
}


.product-price small.woocommerce-price-suffix {
    color: #64ad20 !important;
}