/* Custom Cart Page Stylings */
section.PageBanner {
    display: none;
}

.custom-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

.custom-cart-container .cart-wrapper>form {
    display: flex;
    flex-direction: column;
}

.custom-cart-header {
    margin: 25px 0;
}

.custom-cart-title h1 {
    font-family: var(--paddle-font-heading-family);
    font-size: 1.8rem;
}

.continue-shopping-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-cart-title h1 {
    text-transform: initial;
    font-weight: 700;
}

.continue-shopping-link:hover {
    text-decoration: underline;
    color: #333;
}

.custom-cart-grid {
    align-items: flex-start;
    gap: 4%;
}

.custom-cart-left {
    flex: 0 0 58%;
    min-width: 0;
}

.custom-cart-container-inner {
    flex: 1 1 auto;
    min-width: 0;
    position: sticky;
    top: 20px;
}

/* Base Form and Table Styles */
table.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
    border-radius: 0;
    margin-bottom: 30px;
}

table.shop_table.cart th {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    font-weight: 500;
    color: #555;
    text-align: left;
    font-size: 16px;
}

table.shop_table.cart td {
    padding: 20px 0;
    border-top: none;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

/* Product Row Specifics */
.product-thumbnail img {
    width: 100px;
    height: auto;
    display: block;
}

/* Cross-sell products */
.custom-cart-cross-sells-wrapper {
    margin-top: 2rem;
}

.cross-sells h2 {
    text-align: center;
    text-transform: none !important;
    margin-bottom: 1.4rem;
}




@media screen and (min-width:768px) {
    .woocommerce .custom-cart-cross-sells-wrapper ul.products li.product,
    .woocommerce-page .custom-cart-cross-sells-wrapper ul.products li.product {
        max-width: 25%;
    }
    .woocommerce-page .custom-cart-container table.cart .product-thumbnail img {
        min-width: 150px;
        margin-right: 15px;
    }

    .custom-cart-container td.product-subtotal span.woocommerce-Price-amount.amount {
        padding-left: 120px;
    }

    .custom-cart-container table.shop_table.cart th.product-subtotal {
        text-align: right;
    }

    .custom-cart-container table.shop_table.cart th {
        border-bottom: none;
    }
}

.product-name a {
    font-weight: 600;
    color: #333;
    display: block;
    padding-right: 12px;
    margin-bottom: 5px;
    text-decoration: none;
}

.product-price-display .amount {
    font-weight: 600;
    color: #333;
}

.quantity-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quantity-wrapper .quantity {
    margin-bottom: 10px;
}

.product-remove-wrapper {
    margin-top: 5px;
}

.woocommerce .product-remove-wrapper .remove-text-link {
    font-size: 13px;
    color: #7c7c7c !important;
    text-decoration: underline;
    white-space: nowrap !important;
    display: inline-block !important;
    border: none;
}

.woocommerce .product-remove-wrapper .remove-text-link:hover {
    color: var(--wc-red) !important;
    background-color: transparent !important;
    border: none !important;
}

.product-subtotal {
    font-weight: bold;
    color: #333;
}

/* Delivery Options Box */
.custom-cart-shipping-wrapper {
    margin: 0 0 30px 0;
    border: 1px solid #ccc;
    padding: 20px;
    background: #fff;
}

.shipping-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.shipping-box-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.shipping-box-icon {
    display: flex;
    color: #555;
}

/* Shipping method list styling */
.custom-cart-shipping-wrapper .shipping-box-content .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-cart-shipping-wrapper .shipping-box-content .woocommerce-shipping-methods li {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 14px;
    color: #444;
    gap: 8px;
}

.custom-cart-shipping-wrapper .shipping-box-content .woocommerce-shipping-methods li label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}

/* Tooltip-style callout for selected shipping option */
.custom-cart-shipping-wrapper .shipping-box-content .woocommerce-shipping-methods li.is-selected-shipping,
.custom-cart-shipping-wrapper .shipping-box-content .woocommerce-shipping-methods li input[type=radio]:checked+label {
    position: relative;
}

.woocommerce-shipping-destination {
    font-size: 13px;
    color: #555;
    margin-top: 8px;
}

.woocommerce-shipping-destination a {
    color: #D6708F;
    text-decoration: underline;
}

/* Accordion Specifics */
.custom-cart-accordion {
    margin-top: 1rem;
    order: 2;
}

.custom-cart-accordion h3 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: normal;
}

.accordion-item {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    background: #fff;
}

.custom-cart-grid .custom-cart-accordion .accordion-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 15px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-icon {
    font-size: 18px;
    color: #999;
}

.accordion-content {
    display: none;
    padding: 0 15px 15px 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.woocommerce .custom-cart-container table.shop_table thead,
.woocommerce-page table.shop_table thead {
    background-color: transparent;
}

/* Right Sidebar Totals */
.custom-cart-container-inner .cart-collaterals {
    width: 100%;
    margin-bottom: 0;
    clear: both;
}

.woocommerce .custom-cart-totals-box,
.woocommerce-page .custom-cart-totals-box {
    padding: 20px !important;
    background-color: #f5f5f5;
    border: none !important;
    border-radius: 4px;
    margin-bottom: 15px !important;
}

.custom-cart-totals-box {
    width: 100%;
}

.custom-totals-table {
    width: 100%;
    margin-bottom: 20px;
    border: none !important;
    border-bottom: 1px solid #eee !important;
}

.custom-totals-table th {
    text-align: left;
    font-size: 18px;
    font-weight: normal;
    padding: 15px 0;
    border: none !important;
    color: #333;
}

.custom-totals-table td {
    text-align: right;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 0;
    border: none !important;
    color: #333;
}

/* Checkout button — full width, pink */
.wc-proceed-to-checkout {
    margin-bottom: 0;
}

.wc-proceed-to-checkout .checkout-button,
a.checkout-button.button.alt.wc-forward {
    width: 100% !important;
    font-weight: bold !important;
    border-radius: 3px !important;
}

/* Order Notes Form — sits below the totals box in right column */
.custom-cart-notes {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;
}

.custom-cart-notes h3 {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.custom-cart-notes textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    min-height: 100px;
}

/* Removing the regular total since it's renamed to estimated total */
tr.order-total th {
    white-space: normal;
}

/* Standard WC button spacing */
.wcppec-checkout-buttons {
    margin-top: 10px !important;
}

/* Payment buttons — stack full width */
.wc-ppcp-cart-payments__container {
    width: 100% !important;
}

#wc-stripe-express-checkout-element {
    margin-top: 0 !important;
}

/* PayPal / express buttons container */
.woocommerce .custom-cart-totals-box .woocommerce-PaymentButton,
.woocommerce .custom-cart-totals-box .wcppec-checkout-buttons__button {
    width: 100% !important;
    margin-bottom: 8px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .custom-cart-grid {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .custom-cart-left,
    .custom-cart-container-inner {
        flex: 1 1 100%;
        width: 100%;
        min-width: 100%;
        position: static;
    }

    /* Shopify-style mobile cart items */
    table.shop_table.cart thead {
        display: none;
    }

    table.shop_table.cart tbody tr.cart_item {
        display: flex;
        flex-wrap: wrap;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    .woocommerce .cart-wrapper table.shop_table.cart td {
        border: none;
        padding: 0;
        display: block;
        text-align: left !important;
    }

    table.shop_table.cart td::before {
        display: none !important;
        /* hide default woocommerce data-titles */
    }

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

    .product-thumbnail {
        flex: 0 0 80px;
        margin-right: 15px;
    }

    .product-thumbnail img {
        width: 100%;
    }

    .product-name {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .product-name a {
        font-size: 0.88rem;
        padding-right: 0px;
    }

    .product-quantity {
        flex: 0 0 100%;
        margin-top: 15px;
        /* align with text */
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    .quantity-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .quantity-wrapper .quantity {
        margin-bottom: 0;
    }

    .product-remove-wrapper {
        margin-top: 0;
    }

    .product-subtotal {
        position: absolute;
        top: 15px;
        right: 0;
    }

    .wc-proceed-to-checkout .checkout-button {
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    table.shop_table.cart tbody tr.cart_item {
        display: block;
    }

    .product-price-display .amount {
        font-weight: normal;
    }

    .product-name a {
        font-size: 0.88rem;
        font-weight: 400;
        padding-top: 0.55rem;
        padding-right: 0px;
    }
}