/* Empty Cart */
.ptfc-empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.ptfc-empty-cart p {
    font-size: 16px;
    color: #64748b;
    margin: 15px 0 25px;
}
.ptfc-empty-cart .ptfc-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--ptfc-primary);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}

/* Cart Items */
.ptfc-checkout-cart-items {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 25px;
    margin-bottom: 30px;
}
.ptfc-cart-header {
    display: flex;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}
.ptfc-ch-col-product { flex: 1; }
.ptfc-ch-col-price { width: 120px; text-align: center; }
.ptfc-ch-col-qty { width: 150px; text-align: center; }

.ptfc-cart-body {
    max-height: none;
    overflow-y: visible;
    padding-right: 5px;
}
.ptfc-cart-body::-webkit-scrollbar {
    width: 5px;
}
.ptfc-cart-body::-webkit-scrollbar-track {
    background: #f1f5f9; 
    border-radius: 10px;
}
.ptfc-cart-body::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 10px;
}
.ptfc-cart-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

.ptfc-cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f8fafc;
    transition: opacity 0.3s;
}
.ptfc-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ptfc-ci-product {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}
.ptfc-ci-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.ptfc-ci-name {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.4;
}
.ptfc-ci-price {
    width: 120px;
    text-align: center;
    font-weight: 700;
    color: var(--ptfc-primary);
    font-size: 16px;
}
.ptfc-ci-qty {
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    color: #475569;
}

/* Checkout Form Section */
.ptfc-checkout-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}
.ptfc-checkout-wc-form-wrapper {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 25px;
    margin-bottom: 30px;
}

/* Hide WooCommerce stuff we don't want */
.ptfc-checkout-wc-form-wrapper .woocommerce-billing-fields h3,
.ptfc-checkout-wc-form-wrapper .woocommerce-additional-fields h3,
.ptfc-checkout-wc-form-wrapper #order_review_heading,
.ptfc-checkout-wc-form-wrapper .shop_table.woocommerce-checkout-review-order-table,
.ptfc-checkout-wc-form-wrapper .woocommerce-notices-wrapper,
.ptfc-checkout-wc-form-wrapper .woocommerce-form-coupon-toggle,
.ptfc-checkout-wc-form-wrapper .woocommerce-form-coupon,
.ptfc-checkout-wc-form-wrapper #billing_last_name_field,
.ptfc-checkout-wc-form-wrapper #billing_company_field,
.ptfc-checkout-wc-form-wrapper #billing_country_field,
.ptfc-checkout-wc-form-wrapper #billing_postcode_field {
    display: none !important;
}

body .ptfc-checkout-wc-form-wrapper .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    display: block !important;
    clear: both !important;
}
.ptfc-checkout-wc-form-wrapper .form-row label {
    display: none !important; /* Hide labels, we use placeholders except for notes */
}
.ptfc-checkout-wc-form-wrapper .form-row.notes label {
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
}
body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout input.input-text,
body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout textarea.input-text {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    height: auto !important;
    margin: 0 !important;
}
body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout input.input-text:focus,
body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout textarea.input-text:focus {
    border-color: var(--ptfc-primary) !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1) !important;
    outline: none !important;
}

body .ptfc-checkout-wc-form-wrapper .col2-set .col-1,
body .ptfc-checkout-wc-form-wrapper .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
    clear: both !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Force columns side-by-side on desktop */
@media (min-width: 768px) {
    body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout .form-row-first {
        width: calc(50% - 7.5px) !important;
        float: left !important;
        clear: both !important;
    }
    body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout .form-row-last {
        width: calc(50% - 7.5px) !important;
        float: right !important;
        clear: none !important;
    }
    body .ptfc-checkout-wc-form-wrapper form.woocommerce-checkout .form-row-wide {
        clear: both !important;
        width: 100% !important;
        float: none !important;
    }
}
.ptfc-field-row-2 {
    display: flex;
    gap: 15px;
}
.ptfc-field-row-2 .form-row {
    flex: 1;
    margin-bottom: 0 !important;
}

/* Payment Methods */
body .ptfc-checkout-wc-form-wrapper #payment {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
body .ptfc-checkout-wc-form-wrapper #payment ul.payment_methods {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
body .ptfc-checkout-wc-form-wrapper #payment li.payment_method {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    padding: 15px !important;
    background: #fff !important;
    list-style: none !important;
}
body .ptfc-checkout-wc-form-wrapper #payment li.payment_method > label {
    display: inline-block !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    margin: 0 0 0 10px !important;
    vertical-align: middle !important;
}
body .ptfc-checkout-wc-form-wrapper #payment li.payment_method input[type="radio"] {
    margin: 0 !important;
    vertical-align: middle !important;
}
body .ptfc-checkout-wc-form-wrapper #payment div.payment_box {
    background: #f8fafc !important;
    border-radius: 6px !important;
    padding: 15px !important;
    margin-top: 15px !important;
    font-size: 13px !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}
body .ptfc-checkout-wc-form-wrapper #payment div.payment_box::before { display: none !important; }
body .ptfc-checkout-wc-form-wrapper .place-order { display: none !important; }

/* Summary Right Column */
.ptfc-checkout-summary {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 25px;
}
.ptfc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 15px;
    color: #475569;
}
.ptfc-summary-row.total {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 20px;
}
.ptfc-summary-row.total span:last-child {
    color: var(--ptfc-primary);
}
body .ptfc-checkout-summary .ptfc-btn-place-order {
    display: block !important;
    width: 100% !important;
    padding: 15px !important;
    background: var(--ptfc-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
}
body .ptfc-checkout-summary .ptfc-btn-place-order:hover {
    background: #e66800 !important;
}
.ptfc-checkout-terms {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}
.ptfc-checkout-terms a {
    color: var(--ptfc-primary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ptfc-checkout-layout { flex-direction: column; gap: 15px; }
    .ptfc-checkout-right { width: 100%; position: static; margin-top: 0; }
    .ptfc-checkout-cart-items { padding: 16px; margin-bottom: 15px; }
    .ptfc-checkout-wc-form-wrapper { padding: 16px; margin-bottom: 0; }
    .ptfc-checkout-summary { padding: 16px; }
    .ptfc-cart-header { display: none; }
    .ptfc-cart-item { flex-wrap: wrap; flex-direction: row; justify-content: space-between; align-items: center; padding: 15px 0; }
    .ptfc-ci-product { width: 100%; margin-bottom: 10px; flex: none; }
    .ptfc-ci-price { width: auto; text-align: left; font-size: 16px; margin-bottom: 0; }
    .ptfc-ci-qty { width: auto; justify-content: flex-end; }
    .ptfc-field-row-2 { flex-direction: column; gap: 0; }
}

/* Loop Add to Cart Button */
.ptfc-loop-add-to-cart .button {
    display: block;
    width: 100%;
    background-color: #e2e8f0;
    color: #475569;
    text-align: center;
    border-radius: 99px;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}
.ptfc-loop-add-to-cart .button:hover {
    background-color: #cbd5e1;
    color: #334155;
}
.ptfc-loop-add-to-cart .add_to_cart_button.ajax_add_to_cart,
.ptfc-loop-add-to-cart .add_to_cart_button {
    background-color: var(--ptfc-primary);
    color: #fff;
}
.ptfc-loop-add-to-cart .add_to_cart_button.ajax_add_to_cart:hover,
.ptfc-loop-add-to-cart .add_to_cart_button:hover {
    background-color: #e66600;
    color: #fff;
}
.ptfc-loop-add-to-cart .add_to_cart_button.added::after {
    content: " \2714";
    margin-left: 5px;
}

/* Quote Actions */
.ptfc-quote-actions {
    margin-top: 20px;
}
.ptfc-qa-title {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}
.ptfc-qa-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.ptfc-qa-title span {
    background: #fff;
    padding: 0 15px;
    color: #64748b;
    font-size: 14px;
    position: relative;
    z-index: 2;
}
.ptfc-qa-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.ptfc-btn-quote {
    flex: 1;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}
.ptfc-btn-quote.pdf {
    background-color: #3b82f6 !important;
}
.ptfc-btn-quote.pdf:hover {
    background-color: #2563eb !important;
}
.ptfc-btn-quote.excel {
    background-color: #10b981 !important;
}
.ptfc-btn-quote.excel:hover {
    background-color: #059669 !important;
}

/* Hide Payment Section */
#payment .wc_payment_methods,
#payment .place-order {
    display: none !important;
}
#payment {
    background: transparent !important;
}

/* Hide entire WooCommerce form since we auto-fill from profile */
.ptfc-checkout-wc-form-wrapper {
    display: none !important;
}

/* Ensure theme offcanvas cart is above everything */
.offcanvas-right, .offcanvas-left, .offcanvas, .mfp-wrap, .mfp-bg {
    z-index: 99999 !important;
}
