/*
Theme Name: Printella v5
Template: hello-elementor
Description: Child theme of Hello Elementor for Printella v5
Version: 5.0.0
*/

/* Custom styles for Hello Child theme */

/* ============================================
   PRINTELLA ELEMENTOR WIDGETS STYLES
   ============================================ */

/* Variant Display Widget */
.printella-variant-display {
    margin: 10px 0;
}

.printella-variant-label {
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

/* Dropdown Styles */
.printella-variant-dropdown-wrapper {
    margin-bottom: 15px;
}

.printella-variant-dropdown {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.printella-variant-dropdown:hover {
    border-color: #999;
}

.printella-variant-dropdown:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* PRNT Radio Button Styles */
.prnt-radio-wrapper {
    margin-bottom: 20px;
}

.prnt-radio-list {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
}

.prnt-radio-list li,
.prnt-radio-item {
    position: relative;
    list-style: none !important;
    list-style-type: none !important;
}

.prnt-radio-list li::before,
.prnt-radio-item::before {
    display: none !important;
}

.prnt-radio-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    visibility: hidden;
}

.prnt-radio-label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    margin: 0;
    padding: 8px 10px 8px 51px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    gap: 16px;
}

.prnt-radio-label:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background-color: #fff;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 1;
    box-sizing: border-box;
}

.prnt-radio-label:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 20px;
    width: 8px;
    height: 8px;
    background-color: #6b8b6b;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transition: all 0.3s ease;
    z-index: 2;
}

.prnt-radio-input:checked + .prnt-radio-label {
    background-color: #edf2ed;
}

.prnt-radio-input:checked + .prnt-radio-label:before {
    border-color: #6b8b6b;
    background-color: #fff;
}

.prnt-radio-input:checked + .prnt-radio-label:after {
    transform: translateY(-50%) scale(1);
}

.prnt-radio-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.prnt-radio-label:hover {
    background-color: #f9f9f9;
}

.prnt-radio-label:hover:before {
    border-color: #999;
}


.printella-variant-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.printella-variant-item {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.printella-variant-item:last-child {
    border-bottom: none;
}

.printella-variant-rectangles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.printella-variant-rectangle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.printella-variant-rectangle:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.printella-display-inline_rectangles .printella-variant-rectangles {
    display: flex;
    flex-wrap: wrap;
}

/* Product Listing Widget */
.printella-products-grid {
    display: grid;
    gap: 20px;
}

.printella-products-grid.columns-1 {
    grid-template-columns: 1fr;
}

.printella-products-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.printella-products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.printella-products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.printella-products-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.printella-products-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 768px) {
    .printella-products-grid.columns-4,
    .printella-products-grid.columns-5,
    .printella-products-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .printella-products-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .printella-products-grid {
        grid-template-columns: 1fr !important;
    }
}

.printella-product-item {
    text-align: center;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.printella-product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.printella-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.printella-product-title {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.printella-product-title a {
    text-decoration: none;
    color: inherit;
}

.printella-product-title a:hover {
    text-decoration: underline;
}

.printella-product-price {
    margin: 10px 0;
    font-weight: bold;
}

.printella-product-button {
    margin-top: 15px;
}

.printella-product-button .button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.printella-product-button .button:hover {
    background-color: #005177;
    color: white;
}

.printella-product-button .added::after {
    content: " ✓";
    color: #46b450;
}

/* Add to Cart Widget */
.printella-add-to-cart-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.printella-add-to-cart-wrapper.printella-button-full-width {
    flex-direction: column;
    align-items: stretch;
}

.printella-add-to-cart-wrapper.printella-button-full-width .button {
    width: 100% !important;
}

.printella-cart-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.printella-add-to-cart-wrapper .quantity {
    margin: 0;
}

.printella-add-to-cart-wrapper .quantity input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Fix for View Cart button after adding to cart */
.printella-add-to-cart-wrapper .added_to_cart {
    display: block !important;
    width: 100%;
    margin-top: 10px;
    visibility: hidden; /* Temporarily hide View Cart button */
}

/* Prevent button shifting when View Cart appears */
.printella-add-to-cart-wrapper .add_to_cart_button {
    flex-shrink: 0;
}

/* Printella Variant Display Price and Cart Styles */
.printella-variant-price-display {
    margin: 20px 0 15px 0;
}

.printella-variant-price-display .price {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.printella-cart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.printella-cart-controls .quantity {
    margin: 0;
    flex-shrink: 0;
}

.printella-cart-controls .quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.printella-cart-controls .quantity input[type="number"] {
    width: 60px;
    padding: 8px 8px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 16px;
    background: white;
    -moz-appearance: textfield;
}

.printella-cart-controls .quantity input[type="number"]::-webkit-outer-spin-button,
.printella-cart-controls .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.printella-cart-controls .quantity-btn {
    width: 32px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    user-select: none;
}

.printella-cart-controls .quantity-btn:hover {
    background: #e9ecef;
    color: #212529;
}

.printella-cart-controls .quantity-btn:active {
    background: #dee2e6;
}

.printella-cart-controls .quantity-minus {
    border-right: 1px solid #ddd;
}

.printella-cart-controls .quantity-plus {
    border-left: 1px solid #ddd;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) .printella-cart-controls button.button.alt,
.woocommerce .printella-cart-controls .single_add_to_cart_button,
.printella-cart-controls .single_add_to_cart_button {
    flex: 1;
    width: auto;
    padding: .8em 1em;
    background-color: rgb(218, 254, 20);
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) .printella-cart-controls button.button.alt:hover:not(:disabled),
.printella-cart-controls .single_add_to_cart_button:hover:not(:disabled) {
    background-color: rgb(195, 228, 18);
}

.printella-cart-controls .single_add_to_cart_button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.printella-cart-controls .single_add_to_cart_button.loading {
    opacity: 0.7;
    cursor: wait;
}

.printella-cart-controls .single_add_to_cart_button.added {
    background-color: #46b450;
}

/* Simple Product Styles */
.printella-simple-product-info {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Simple products have enabled buttons by default */
.printella-variant-display[data-product-type="simple"] .single_add_to_cart_button {
    background-color: rgb(218, 254, 20);
    color: black;
}

.printella-variant-display[data-product-type="simple"] .single_add_to_cart_button:hover {
    background-color: rgb(195, 228, 18);
}

/* Style all WooCommerce buttons uniformly - both "Wybierz opcje" and "Dodaj do koszyka" */
.woocommerce button.wp-element-button.product_type_variable,
.woocommerce .wp-element-button.product_type_variable,
.wp-element-button.product_type_variable,
.woocommerce a.button.product_type_variable,
.woocommerce button.button.product_type_variable,
a.button.product_type_variable,
.printella-add-to-cart-wrapper a.button.product_type_variable {
    background-color: rgb(218, 254, 20);
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.woocommerce button.wp-element-button.product_type_variable:hover,
.woocommerce .wp-element-button.product_type_variable:hover,
.wp-element-button.product_type_variable:hover,
.woocommerce a.button.product_type_variable:hover,
.woocommerce button.button.product_type_variable:hover,
a.button.product_type_variable:hover,
.printella-add-to-cart-wrapper a.button.product_type_variable:hover {
    background-color: rgb(195, 228, 18);
    color: black;
}

/* Style all "Dodaj do koszyka" buttons uniformly */
.woocommerce a.button.add_to_cart_button,
.woocommerce button.button.add_to_cart_button,
.woocommerce button.button.add_to_cart_button.product_type_simple,
.woocommerce a.button.add_to_cart_button.product_type_simple,
.printella-add-to-cart-wrapper a.add_to_cart_button,
.printella-add-to-cart-wrapper button.add_to_cart_button,
a.button.add_to_cart_button.product_type_simple,
button.button.add_to_cart_button.product_type_simple {
    background-color: rgb(218, 254, 20);
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.woocommerce a.button.add_to_cart_button:hover,
.woocommerce button.button.add_to_cart_button:hover,
.woocommerce button.button.add_to_cart_button.product_type_simple:hover,
.woocommerce a.button.add_to_cart_button.product_type_simple:hover,
.printella-add-to-cart-wrapper a.add_to_cart_button:hover,
.printella-add-to-cart-wrapper button.add_to_cart_button:hover,
a.button.add_to_cart_button.product_type_simple:hover,
button.button.add_to_cart_button.product_type_simple:hover {
    background-color: rgb(195, 228, 18);
    color: black;
}

/* WooCommerce Messages - Minimalist Style */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
    padding: 12px 16px;
    margin: 16px 0;
    border: none !important;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    box-shadow: none !important;
}

.woocommerce-message {
    background-color: #f0f9ff;
    color: #0369a1;
    border-left: 3px solid #0ea5e9;
}

.woocommerce-error {
    background-color: #fef2f2;
    color: #dc2626;
    border-left: 3px solid #ef4444;
}

.woocommerce-info {
    background-color: #f8fafc;
    color: #475569;
    border-left: 3px solid #64748b;
}

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
    display: none;
}

.woocommerce-message a,
.woocommerce-error a,
.woocommerce-info a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.woocommerce-message a:hover,
.woocommerce-error a:hover,
.woocommerce-info a:hover {
    text-decoration: none;
}

/* Hide individual error items on checkout - show only main message */
.woocommerce-error .printella-hidden-error {
    display: none !important;
}


/* ============================================
   PRODUCT IMAGE HOVER WIDGET
   ============================================ */

.prnt-product-image-hover {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.prnt-product-image-hover .prnt-image-wrapper {
    position: relative;
    display: block;
    overflow: hidden;
}

.prnt-product-image-hover img {
    display: block;
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.prnt-product-image-hover .prnt-hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prnt-product-image-hover:hover .prnt-hover-image {
    opacity: 1;
}

/* Sale Badge */
.prnt-sale-badge {
    position: absolute;
    z-index: 10;
    padding: 5px 10px;
    background-color: #ff0000;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Badge Positions */
.prnt-badge-top-left .prnt-sale-badge {
    top: 10px;
    left: 10px;
}

.prnt-badge-top-right .prnt-sale-badge {
    top: 10px;
    right: 10px;
}

.prnt-badge-bottom-left .prnt-sale-badge {
    bottom: 10px;
    left: 10px;
}

.prnt-badge-bottom-right .prnt-sale-badge {
    bottom: 10px;
    right: 10px;
}

/* ============================================
   PRINTELLA QUANTITY INPUT (Global)
   ============================================ */

.printella-quantity {
    margin: 0;
    flex-shrink: 0;
}

.printella-quantity .quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.printella-quantity input[type="number"] {
    width: 50px;
    padding: 8px 4px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 16px;
    background: white;
    -moz-appearance: textfield;
}

.printella-quantity input[type="number"]::-webkit-outer-spin-button,
.printella-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.printella-quantity .quantity-btn {
    width: 32px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    user-select: none;
}

.printella-quantity .quantity-btn:hover {
    background: #e9ecef;
    color: #212529;
}

.printella-quantity .quantity-btn:active {
    background: #dee2e6;
}

.printella-quantity .quantity-minus {
    border-right: 1px solid #ddd;
}

.printella-quantity .quantity-plus {
    border-left: 1px solid #ddd;
}

/* Cart table quantity styling */
.woocommerce-cart-form .printella-quantity,
.shop_table .printella-quantity {
    display: inline-flex;
}

/* Ensure proper alignment in JetWooBuilder cart table */
.jet-woo-builder .product-quantity .printella-quantity {
    justify-content: center;
}

/* ============================================
   CART TOTALS - Minimal Style (No borders)
   ============================================ */

.cart_totals .shop_table,
.cart_totals .shop_table tr,
.cart_totals .shop_table th,
.cart_totals .shop_table td {
    border: none !important;
    background: transparent;
}

.cart_totals .shop_table {
    border-collapse: collapse;
}

.cart_totals .shop_table th {
    padding: 8px 10px 8px 0;
    font-weight: normal;
    color: #666;
    text-align: left;
}

.cart_totals .shop_table td {
    padding: 8px 0 8px 10px;
    text-align: right;
}

.cart_totals .shop_table tr.order-total th,
.cart_totals .shop_table tr.order-total td {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    padding-top: 15px;
    border-top: 1px solid #eee !important;
}

/* Shipping - minimal display */
.printella-shipping-method {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.printella-shipping-label {
    font-weight: normal;
}

/* Shipping info tooltip icon (next to "Wysyłka" label) */
.cart_totals .shipping th,
.woocommerce-shipping-totals th {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.printella-shipping-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    cursor: help;
    position: relative;
}

.printella-shipping-info:hover {
    color: #666;
}

.printella-shipping-info svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* Custom tooltip */
.printella-shipping-info::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    right: 0;
    transform: translateY(-8px);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    pointer-events: none;
}

.printella-shipping-info::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 10px;
    transform: translateY(0);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.printella-shipping-info:hover::after,
.printella-shipping-info:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Hide native title tooltip */
.printella-shipping-info[title] {
    -webkit-touch-callout: none;
}

/* Hide shipping calculator on cart */
.woocommerce-shipping-calculator {
    display: none;
}

/* Hide shipping destination text */
.woocommerce-shipping-destination {
    display: none;
}

/* Order total styling - .includes_tax removed via PHP filter */

/* Cart item variation details */
.woocommerce-cart-form .variation,
.shop_table .variation,
.woocommerce-cart-form .wc-item-meta,
.shop_table .wc-item-meta {
    font-size: 13px;
}

/* ============================================
   CHECKOUT BILLING FORM - Postcode + City inline
   ============================================ */

.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0 15px;
}

.woocommerce-billing-fields__field-wrapper .form-row {
    flex: 0 0 100%;
    max-width: 100%;
}

/* First name + Last name: 50% each */
.woocommerce-billing-fields__field-wrapper #billing_first_name_field,
.woocommerce-billing-fields__field-wrapper #billing_last_name_field {
    flex: 0 0 calc(50% - 7.5px);
    max-width: calc(50% - 7.5px);
}

/* Phone + Email: 100% each */
.woocommerce-billing-fields__field-wrapper #billing_phone_field,
.woocommerce-billing-fields__field-wrapper #billing_email_field {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Postcode: 20% width */
.woocommerce-billing-fields__field-wrapper #billing_postcode_field {
    flex: 0 0 20%;
    max-width: 20%;
}

/* City: 80% width (minus gap) */
.woocommerce-billing-fields__field-wrapper #billing_city_field {
    flex: 0 0 calc(80% - 15px);
    max-width: calc(80% - 15px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .woocommerce-billing-fields__field-wrapper #billing_postcode_field {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .woocommerce-billing-fields__field-wrapper #billing_city_field {
        flex: 0 0 calc(70% - 15px);
        max-width: calc(70% - 15px);
    }
}

@media (max-width: 480px) {
    .woocommerce-billing-fields__field-wrapper #billing_first_name_field,
    .woocommerce-billing-fields__field-wrapper #billing_last_name_field,
    .woocommerce-billing-fields__field-wrapper #billing_phone_field,
    .woocommerce-billing-fields__field-wrapper #billing_email_field,
    .woocommerce-billing-fields__field-wrapper #billing_postcode_field,
    .woocommerce-billing-fields__field-wrapper #billing_city_field {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   CHECKOUT SHIPPING FORM - Same layout as billing
   ============================================ */

.woocommerce-shipping-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0 15px;
}

.woocommerce-shipping-fields__field-wrapper .form-row {
    flex: 0 0 100%;
    max-width: 100%;
}

/* First name + Last name: 50% each */
.woocommerce-shipping-fields__field-wrapper #shipping_first_name_field,
.woocommerce-shipping-fields__field-wrapper #shipping_last_name_field {
    flex: 0 0 calc(50% - 7.5px);
    max-width: calc(50% - 7.5px);
}

/* Postcode: 20% width */
.woocommerce-shipping-fields__field-wrapper #shipping_postcode_field {
    flex: 0 0 20%;
    max-width: 20%;
}

/* City: 80% width (minus gap) */
.woocommerce-shipping-fields__field-wrapper #shipping_city_field {
    flex: 0 0 calc(80% - 15px);
    max-width: calc(80% - 15px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .woocommerce-shipping-fields__field-wrapper #shipping_postcode_field {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .woocommerce-shipping-fields__field-wrapper #shipping_city_field {
        flex: 0 0 calc(70% - 15px);
        max-width: calc(70% - 15px);
    }
}

@media (max-width: 480px) {
    .woocommerce-shipping-fields__field-wrapper #shipping_first_name_field,
    .woocommerce-shipping-fields__field-wrapper #shipping_last_name_field,
    .woocommerce-shipping-fields__field-wrapper #shipping_postcode_field,
    .woocommerce-shipping-fields__field-wrapper #shipping_city_field {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Country field - reduce padding */
#billing_country_field .select2-selection,
#shipping_country_field .select2-selection,
#billing_country_field select,
#shipping_country_field select {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    min-height: auto !important;
    height: auto !important;
}

#billing_country_field .select2-selection__rendered,
#shipping_country_field .select2-selection__rendered {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.5 !important;
}

#billing_country_field .select2-selection__arrow,
#shipping_country_field .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important;
}

/* ============================================
   APACZKA PLUGIN COMPATIBILITY
   Ensure map modal displays correctly
   ============================================ */

/* Apaczka map modal - ensure proper display */
.apaczka_pl_geowidget_modal {
    z-index: 999999 !important;
}

.apaczka_pl_geowidget_modal_inner {
    width: 90% !important;
    height: 80% !important;
    min-width: 320px !important;
    min-height: 400px !important;
}

#apaczka_pl_geowidget_modal_inner_content {
    width: 100% !important;
    height: calc(100% - 40px) !important;
    min-height: 350px !important;
}

/* BPWidget map container */
#apaczka_pl_geowidget_modal_inner_content #BPWidget,
.apaczka_pl_geowidget_modal #BPWidget {
    width: 100% !important;
    height: 100% !important;
    min-height: 350px !important;
}

/* Leaflet map container */
#apaczka_pl_geowidget_modal_inner_content .leaflet-container,
.apaczka_pl_geowidget_modal .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 300px !important;
}

/* Ensure Apaczka elements are visible on checkout */
.apaczka-parcel-machine,
.apaczka-parcel-machine-select,
#apaczka_pl_geowidget_classic,
#selected-parcel-machine {
    display: block !important;
}

.apaczka-parcel-machine-select {
    padding-bottom: 20px;
}

#apaczka_pl_geowidget_classic.apaczka-hidden,
#selected-parcel-machine.apaczka-hidden {
    display: none !important;
}

/* ============================================
   FAKTUROWNIA INVOICE FIELDS
   Custom checkbox with input outside label
   ============================================ */

/* Checkbox wrapper - flexbox layout */
.printella-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Checkbox input */
.printella-checkbox-wrapper input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Checkbox label - override Elementor/JetWooBuilder border with ID selector */
#billing_faktura_field .printella-checkbox-label {
    margin: 0;
    padding: 0;
    border: 0;
    border-width: 0;
    border-style: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #222;
}

/* Company field inside checkbox container */
#billing_faktura_field #billing_company_field {
    margin-top: 15px;
    margin-left: 0;
    padding-left: 0;
}

/* NIP field inside checkbox container */
#billing_faktura_field #billing_nip_field {
    margin-top: 10px;
    margin-left: 0;
    padding-left: 0;
}

/* Hide "(opcjonalne)" / "(optional)" text from invoice fields */
#billing_company_field .optional,
#billing_nip_field .optional {
    display: none;
}

/* ============================================
   CHECKOUT: Order review "cardify"
   ============================================ */

/* === Order review: reset "śmieci" (linie, tło, odstępy) === */
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table * {
    box-sizing: border-box;
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* usuń archaiczne obramowania z motywu */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table tr {
    border: 0 !important;
    background: transparent !important;
}

/* nagłówków nie potrzebujemy */
.woocommerce-checkout-review-order-table thead {
    display: none !important;
}

/* ================================
   ORDER REVIEW: ONE CARD CONTAINER
   ================================ */

/* KARTA dla listy produktów */
.woocommerce-checkout-review-order-table tbody {
    display: block;
    padding: 15px 25px;
    border: 1px solid #afafaf;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

/* Każdy produkt = WIERSZ (bez własnej karty) */
.woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name total";
    column-gap: 16px;
    row-gap: 6px;
    align-items: start;
    margin: 0 !important;
    padding: 15px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
}

/* Separator tylko POMIĘDZY wierszami */
.woocommerce-checkout-review-order-table tbody tr.cart_item + tr.cart_item {
    border-top: 1px solid rgba(0,0,0,.17) !important;
}

/* komórki przypisujemy do obszarów */
.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-name {
    grid-area: name;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

.woocommerce-checkout-review-order-table tbody tr.cart_item td.product-total {
    grid-area: total;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    font-weight: 600;
    white-space: nowrap;
    align-self: start;
}

/* === Order review: ukryj stary wariant (WooCommerce dodaje go po naszym wrapperze) === */
.woocommerce-checkout-review-order-table td.product-name dl.variation,
.woocommerce-checkout-review-order-table td.product-name .wc-item-meta {
    display: none !important;
}

/* usuń ×1 w tekście (zostaje bubble) */
.woocommerce-checkout-review-order-table .product-quantity {
    display: none !important;
}

/* Kill margins inside product-name */
.woocommerce-checkout-review-order-table td.product-name * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* === Layout: miniatura + tekst === */
.printella-review-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.printella-review-item__thumb {
    position: relative;
    width: 56px;
    flex: 0 0 auto;
}

.printella-review-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    background: rgba(0,0,0,.03);
}

/* bubble ilości */
.printella-review-qty {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* tytuł + meta */
.printella-review-item__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding-left: 10px;
}

.printella-review-title {
    font-weight: 600;
    font-size: 1em;
    line-height: 1.2;
}

.printella-review-variant {
    display: block;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: pre-line;
    color: rgba(0,0,0,.7);
}

/* Variant label bold, value normal */
.printella-review-variant strong,
.printella-review-variant b {
    font-weight: 500;
}

.printella-review-variant span {
    font-weight: 400;
}

/* ================================
   ORDER REVIEW: COMPACT MODE
   ================================ */

.printella-compact .woocommerce-checkout-review-order-table tbody {
    padding: 10px 12px;
}

.printella-compact .woocommerce-checkout-review-order-table tbody tr.cart_item {
    padding: 10px 0 !important;
    row-gap: 4px;
}

.printella-compact .printella-review-item__thumb,
.printella-compact .printella-review-thumb {
    width: 48px;
    height: 48px;
}

/* ================================
   ORDER REVIEW: TFOOT / PODSUMOWANIE
   ================================ */

.woocommerce-checkout-review-order-table tfoot {
    display: block;
    margin-top: 14px;
}

.woocommerce-checkout-review-order-table tfoot tr {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid rgba(0,0,0,.17);
}

/* usuń wszelkie pseudo-linie z motywu */
.woocommerce-checkout-review-order-table tfoot tr::before,
.woocommerce-checkout-review-order-table tfoot tr::after,
.woocommerce-checkout-review-order-table tfoot th::before,
.woocommerce-checkout-review-order-table tfoot th::after,
.woocommerce-checkout-review-order-table tfoot td::before,
.woocommerce-checkout-review-order-table tfoot td::after {
    content: none !important;
}

.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table tfoot th {
    font-weight: 600;
}

.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total {
    font-size: 1.05em;
    font-weight: 800;
}

/* Ukryj dopisek "zawiera X VAT" */
.woocommerce-checkout-review-order-table .includes_tax {
    display: none !important;
}

/* ============================
   SHIPPING METHODS (Modivo-like)
   ============================ */

/* Kontener: jedna "karta" na metody wysyłki */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td,
.woocommerce-checkout-review-order-table tr.shipping td {
    padding-top: 8px;
}

/* Sama lista metod wysyłki */
.woocommerce-checkout-review-order-table ul#shipping_method {
    margin: 0;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid #afafaf;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    width: 100%;
    max-width: none;
}

/* ===============================
   SHIPPING – clean grid layout
   =============================== */

/* Separator tylko między wierszami */
.woocommerce-checkout-review-order-table ul#shipping_method li + li {
    border-top: 1px solid rgba(0,0,0,.17);
}

.woocommerce-checkout ul#shipping_method li {
    display: grid;
    grid-template-columns: 28px 1fr auto; /* radio | name | price */
    column-gap: 12px;
    align-items: start;
    padding: 14px 0;
}

/* radio - custom styled */
.woocommerce-checkout ul#shipping_method li > input[type="radio"] {
    --selected-border: #111;
    --selected-bg: #f7f7f7;

    grid-column: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background-color .15s;
}

.woocommerce-checkout ul#shipping_method li > input[type="radio"]:checked {
    border-color: var(--selected-border);
    background: var(--selected-bg);
}

.woocommerce-checkout ul#shipping_method li > input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--selected-border);
}

.woocommerce-checkout ul#shipping_method li > input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.1);
}

/* label rozciąga się od kolumny 2 do 3, wewnątrz flex wyrównuje nazwę do lewej, cenę do prawej */
.woocommerce-checkout ul#shipping_method li > label {
    grid-column: 2 / 4;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    line-height: 1.3;
    gap: 12px;
}

/* cena - wyrównana do prawej dzięki margin-left: auto w flexbox */
.woocommerce-checkout ul#shipping_method li > label .woocommerce-Price-amount {
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    margin-left: auto;
}

/* opis pod nazwą - wyrównany do lewej, zaczyna od kolumny 2, rozciąga się do 3 */
.woocommerce-checkout ul#shipping_method li > p.shipping-method-description {
    grid-column: 2 / 4;
    justify-self: start;
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
    opacity: 0.78;
    margin: 0;
}

/* Stan aktywny (delikatne podświetlenie) */
.woocommerce-checkout-review-order-table ul#shipping_method li:has(input[type="radio"]:checked) {
    background: #f7f7f7;
}

/* Tło aktywnego wiersza na całą szerokość karty */
.woocommerce-checkout-review-order-table ul#shipping_method li {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
}

/* Logos w label */
.woocommerce-checkout-review-order-table ul#shipping_method label img {
    height: 22px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: inline-block;
    order: -1;
}

/* ============================
   APACZKA / "Wybierz punkt" button
   ============================ */

.woocommerce-checkout-review-order-table .apaczka-pickup-point,
.woocommerce-checkout-review-order-table .apaczka_select_point,
.woocommerce-checkout-review-order-table .apaczka-point-select,
.woocommerce-checkout-review-order-table button[id*="apaczka"],
.woocommerce-checkout-review-order-table a[id*="apaczka"],
.woocommerce-checkout-review-order-table .printella-apaczka-button {
    grid-column: 2 / -1;
    justify-self: center;
    margin-top: 14px;
}

/* Odstęp w td */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td > * + * {
    margin-top: 10px;
}

/* =========================
   SHIPPING ROW: remove left column (th) and make td full width
   ========================= */

/* SHIPPING ROW as block layout */
.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals,
.woocommerce-checkout-review-order-table tfoot tr.shipping {
    display: block !important;
}

/* th ukryte (nie zabiera miejsca) */
.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals th,
.woocommerce-checkout-review-order-table tfoot tr.shipping th {
    display: none !important;
}

/* td 100% */
.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td,
.woocommerce-checkout-review-order-table tfoot tr.shipping td {
    display: block !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================================
   CHECKOUT PAYMENTS – SAFE LIST STYLE
   - nie odkrywa ukrytych metod (nie dotyka display li)
   - label w jednej linii, bez ucinania logotypów
   - payment_box widoczny tylko dla zaznaczonej metody
   ========================================================= */

/* Usuń domyślne fioletowe tło z sekcji płatności */
#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0;
}

/* Karta dla listy metod płatności */
.woocommerce-checkout #payment ul.payment_methods {
    margin: 0;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid #afafaf;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

/* Usuń border z każdego elementu i rozszerz na całą szerokość karty */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
    padding: 18px 14px !important;
    margin: 0 -14px !important;
    border-bottom: 0 !important;
}

/* ...i dodaj separator tylko między kolejnymi metodami */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method + li.wc_payment_method {
    border-top: 1px solid rgba(0,0,0,.17) !important;
}

/* radio - custom styled */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"] {
    --selected-border: #111;
    --selected-bg: #f7f7f7;

    -webkit-appearance: none;
    appearance: none;
    width: 22px !important;
    height: 22px !important;
    margin: 0 14px 0 0 !important;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background-color .15s;
    vertical-align: middle;
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked {
    border-color: var(--selected-border);
    background: var(--selected-bg);
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--selected-border);
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.1);
}

/* label: jedna linia, brak obcinania (żeby nie ucinać logo P24) */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    cursor: pointer !important;
    vertical-align: middle;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* obrazki metod */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img {
    display: inline-block !important;
    vertical-align: middle !important;
    max-height: 28px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

/* -------- Payment box visibility logic (ONLY active method) -------- */

/* Domyślnie chowamy panele (nie na sztywno !important, żeby nie popsuć JS bramek) */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box {
    display: none;
    margin: 12px 0 0 0 !important;
    padding: 0 0 0 36px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Pokazuj tylko przy zaznaczonym radiu */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked ~ .payment_box {
    display: block;
}

/* usuń "dymek" */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box::before,
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > .payment_box::after {
    content: none !important;
    display: none !important;
}

/* ===== Stripe card form: layout + spacing ===== */

/* wrapper payment_box dla Stripe */
.woocommerce-checkout #payment li.payment_method_stripe > .payment_box,
.woocommerce-checkout #payment li.payment_method_stripe_cc > .payment_box,
.woocommerce-checkout #payment li.payment_method_stripe_card > .payment_box {
    padding-left: 36px !important; /* jak reszta metod */
}

/* Kontener Stripe w payment_box */
.woocommerce-checkout #payment .wc-stripe-gateway-container {
    max-width: 680px;
}

/* Wiele instalacji Woo Stripe używa tych klas dla pól */
.woocommerce-checkout #payment .wc-stripe-gateway-container .form-row {
    margin: 0 0 14px 0 !important;
}

/* Ustawiamy siatkę dla pól karty: numer (2 kolumny), data, cvc */
.woocommerce-checkout #payment .wc-stripe-gateway-container .wc-stripe-card-elements,
.woocommerce-checkout #payment .wc-stripe-gateway-container .stripe-card-group,
.woocommerce-checkout #payment .wc-stripe-gateway-container .wc-stripe-card-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    align-items: start;
}

/* Jeśli wtyczka ma oddzielne wiersze, też to złapiemy */
.woocommerce-checkout #payment .wc-stripe-gateway-container .form-row-first {
    width: auto !important;
}
.woocommerce-checkout #payment .wc-stripe-gateway-container .form-row-last {
    width: auto !important;
}

/* "Kafelek" dla StripeElement – stylujemy wrapper, nie wnętrze iframe */
.woocommerce-checkout #payment .wc-stripe-gateway-container .StripeElement {
    background: #fff;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 12px;
    padding: 14px 14px 35px 14px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* Focus (gdy Stripe doda klasę) */
.woocommerce-checkout #payment .wc-stripe-gateway-container .StripeElement--focus {
    border-color: rgba(0,0,0,.35);
    box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

/* Invalid (Stripe doda klasę) */
.woocommerce-checkout #payment .wc-stripe-gateway-container .StripeElement--invalid {
    border-color: rgba(220,38,38,.55);
    box-shadow: 0 0 0 4px rgba(220,38,38,.10);
}

/* Responsywność: na mobile w kolumnie */
@media (max-width: 640px) {
    .woocommerce-checkout #payment .wc-stripe-gateway-container .wc-stripe-card-elements,
    .woocommerce-checkout #payment .wc-stripe-gateway-container .stripe-card-group,
    .woocommerce-checkout #payment .wc-stripe-gateway-container .wc-stripe-card-container {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   APACZKA – Wybierz punkt FIX
   (pewne wyrównanie do lewej)
   =========================== */

/* zabij układ tabelowy dla tego wiersza */
.woocommerce-checkout-review-order-table tr.apaczka-parcel-machine {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* usuń pustą kolumnę th */
.woocommerce-checkout-review-order-table tr.apaczka-parcel-machine > th.apaczka-parcel-machine-label {
    display: none !important;
}

/* TD ma być normalnym blokiem i ma NIE centrować */
.woocommerce-checkout-review-order-table tr.apaczka-parcel-machine > td.apaczka-parcel-machine-select {
    display: block !important;
    width: 100% !important;

    /* to jest krytyczne na "przycisk na środku" */
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;

    /* usuń wszelkie centrowania od motywu */
    margin: 12px 0 0 0 !important;
    padding: 0 !important;
}

/* przycisk – inline-flex + bez .alt (zielonego) */
.woocommerce-checkout-review-order-table #apaczka_pl_geowidget_classic,
.woocommerce-checkout-review-order-table #apaczka_pl_geowidget_classic.button,
.woocommerce-checkout-review-order-table #apaczka_pl_geowidget_classic.button.alt {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    float: none !important;

    background: #fff !important;
    background-image: none !important;
    color: #222 !important;

    border: 1px solid #ddd !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    text-shadow: none !important;

    padding: 12px 18px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.woocommerce-checkout-review-order-table #apaczka_pl_geowidget_classic:hover {
    background: #f7f7f7 !important;
    border-color: #bbb !important;
}

/* panel "Wybrany Paczkomat" – spójny box */
.woocommerce-checkout-review-order-table #selected-parcel-machine {
    margin-top: 12px !important;
    padding: 12px 14px !important;

    background: #fafafa !important;
    border: 1px solid #eee !important;
    border-radius: 14px !important;

    text-align: left !important;
}

.woocommerce-checkout-review-order-table #selected-parcel-machine .font-height-600 {
    font-weight: 900 !important;
}

.woocommerce-checkout-review-order-table #selected-parcel-machine span.italic {
    display: block !important;
    font-style: normal !important;
    opacity: .85 !important;
    margin-top: 2px !important;
}

button.alt.apaczka_pl_geowidget_classic,
#apaczka_pl_geowidget_classic {
    font-size: 15px !important;
    font-weight: 500 !important;
}

/* =========================
   PODSUMOWANIE (tylko 3 wiersze)
   ========================= */

/* tfoot jako blok */
.woocommerce-checkout-review-order-table tfoot {
    display: block !important;
    width: 100% !important;
}

/* wspólne reguły dla trzech wierszy podsumowania */
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-subtotal,
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-shipping,
.woocommerce-checkout-review-order-table tfoot tr.order-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    padding: 10px 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* separator między wierszami (oprócz ostatniego) */
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-subtotal,
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-shipping {
    border-bottom: 1px solid rgba(0,0,0,.17) !important;
}

/* th = etykieta (lewa) */
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-subtotal > th,
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-shipping > th,
.woocommerce-checkout-review-order-table tfoot tr.order-total > th {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    color: #222 !important;
    text-align: left !important;
    border: 0 !important;
    background: transparent !important;
}

/* td = kwota (prawa) */
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-subtotal > td,
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-shipping > td,
.woocommerce-checkout-review-order-table tfoot tr.order-total > td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #222 !important;
    text-align: right !important;
    border: 0 !important;
    background: transparent !important;
}

/* ukryj dopisek „(w tym VAT …)" */
.woocommerce-checkout-review-order-table tfoot tr.order-total .includes_tax {
    display: none !important;
}

/* usuń strong wokół ceny w podsumowaniu */
.woocommerce-checkout-review-order-table tfoot tr.printella-summary-subtotal td strong {
    font-weight: 600 !important;
}

/* 1. Zabijamy wpływ strong tylko w order-total */
.woocommerce-checkout-review-order-table tr.order-total strong {
    font-weight: inherit;
}

/* 2. Kontrolujemy wagę i rozmiar tam, gdzie trzeba */
.woocommerce-checkout-review-order-table tr.order-total td {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

/* 3. Opcjonalnie: trochę oddechu */
.woocommerce-checkout-review-order-table tr.order-total {
    padding-top: 12px;
}

/* Ship to different address checkbox */
.elementor-1351 .elementor-element.elementor-element-75f4041 .woocommerce-shipping-fields #ship-to-different-address,
.elementor-1351 .elementor-element.elementor-element-75f4041 .woocommerce-shipping-fields #ship-to-different-address label {
    font-size: 18px;
}

/* =========================
   Hide empty WooCommerce notices wrapper (checkout 1377)
   ========================= */
.elementor-1377 .elementor-element-126c4b5 {
    display: none;
}

/* Show only when there are actual notices */
.elementor-1377 .elementor-element-126c4b5:has(.woocommerce-message),
.elementor-1377 .elementor-element-126c4b5:has(.woocommerce-error),
.elementor-1377 .elementor-element-126c4b5:has(.woocommerce-info) {
    display: flex;
}

/* =========================
   Thank You Page - Global Font
   ========================= */
.woocommerce-order-received .woocommerce,
.woocommerce-order-received .woocommerce *,
.woocommerce-order-received h1.entry-title,
.woocommerce-order-received .entry-title {
    font-family: "Montserrat", sans-serif;
}

/* =========================
   Thank You Page - Order Overview Card
   ========================= */
.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details,
.woocommerce .elementor-jet-thankyou-order ul.woocommerce-order-overview {
    display: grid !important;
    grid-template-columns: 1fr 0.8fr 1.2fr 0.8fr 1.2fr;
    gap: 20px 32px;
    list-style: none;
    padding: 30px !important;
    margin: 0 0 32px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #afafaf;
}

/* pseudo-elements (clearfix) become grid items -> remove them */
.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details::before,
.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details::after {
    content: none !important;
    display: none !important;
}

/* Woo often floats li's in order overview -> must disable for grid */
.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details > li {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(0,0,0,.55);
    border-right: 1px solid rgba(0,0,0,.17);
    padding-right: 24px !important;
}

.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details > li:last-child {
    border-right: none;
    padding-right: 0 !important;
}

.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details > li strong {
    font-weight: 700;
    font-size: 17px;
    line-height: 1.25;
    color: rgba(0,0,0,.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make total stand out */
.woocommerce-order-overview__total strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #000;
}

/* Hide payment method (moved to address section) */
.woocommerce-order-overview__payment-method {
    display: none !important;
}

@media (max-width: 1023px) {
    .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 24px;
        padding: 24px;
    }
}

@media (max-width: 639px) {
    .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
        border-radius: 12px;
    }
}

/* =========================
   Thank You Page - Order Details Table
   ========================= */
.woocommerce-order-details table.shop_table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100%;
    border: 0 !important;
}

/* table header (Produkt / Łącznie) */
.woocommerce-order-details table.shop_table thead {
    border-bottom: 1px solid rgba(0,0,0,.17);
}

.woocommerce-order-details table.shop_table thead th {
    border: 0 !important;
    padding: 10px 16px 14px !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    color: rgba(0,0,0,.75);
}

.woocommerce-order-details table.shop_table tbody tr,
.woocommerce-order-details table.shop_table tbody tr.order_item {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* Separator only BETWEEN rows (like checkout) */
.woocommerce-order-details table.shop_table tbody tr + tr,
.woocommerce-order-details table.shop_table tbody tr.order_item + tr.order_item {
    border-top: 1px solid rgba(0,0,0,.17) !important;
}

/* Remove any WooCommerce alternating row styles */
.woocommerce-order-details table.shop_table tbody tr:nth-child(odd),
.woocommerce-order-details table.shop_table tbody tr:nth-child(even),
.woocommerce-order-details table.shop_table tbody tr.order_item,
.woocommerce-order-details table.shop_table tbody tr.woocommerce-table__line-item,
.woocommerce-order-details .shop_table tbody tr,
.printella-order-details .shop_table tbody tr,
.printella-order-details tbody tr.order_item,
.printella-order-table tbody tr.order_item {
    background: transparent !important;
    background-color: transparent !important;
}

.woocommerce-order-details table.shop_table td,
.woocommerce-order-details table.shop_table th {
    border: 0 !important;
    padding: 14px 16px !important;
    vertical-align: top;
    background: transparent !important;
    background-color: transparent !important;
}

/* product cell - unified with checkout */
.woocommerce-order-details table.shop_table td.woocommerce-table__product-name a,
.woocommerce-table__product-name > a {
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1em;
    color: rgba(0,0,0,.92);
}

/* Variant label: font-weight 500, value: normal */
.woocommerce-order-details table.shop_table td.woocommerce-table__product-name strong {
    font-weight: 500;
    color: rgba(0,0,0,.7);
}

.woocommerce-order-details table.shop_table .wc-item-meta {
    font-size: 0.95em;
    color: rgba(0,0,0,.7);
}

.woocommerce-order-details table.shop_table .wc-item-meta li {
    font-weight: 400;
}

.woocommerce-order-details table.shop_table .wc-item-meta li strong,
.woocommerce-order-details table.shop_table .wc-item-meta li p:first-child {
    font-weight: 500;
}

/* right column (price) align */
.woocommerce-order-details table.shop_table td.woocommerce-table__product-total,
.woocommerce-order-details table.shop_table tfoot td {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
}

/* kill the vertical divider vibe */
.woocommerce-order-details table.shop_table thead th:last-child,
.woocommerce-order-details table.shop_table tbody td:last-child,
.woocommerce-order-details table.shop_table tfoot td:last-child {
    border-left: 0 !important;
}

/* make footer totals cleaner */
.woocommerce-order-details table.shop_table tfoot {
    background: rgba(0,0,0,.02);
}

.woocommerce-order-details table.shop_table tfoot th {
    color: rgba(0,0,0,.62);
    font-weight: 600;
}

.woocommerce-order-details table.shop_table tfoot tr:last-child td {
    font-size: 18px;
    font-weight: 700;
}

/* VAT row - subtle styling */
.woocommerce-order-details table.shop_table tfoot tr.vat-row th,
.woocommerce-order-details table.shop_table tfoot tr.vat-row td {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0,0,0,.5);
    padding-top: 6px !important;
    padding-bottom: 10px !important;
}

/* Order total row - make it stand out */
.woocommerce-order-details table.shop_table tfoot tr.order-total-row th,
.woocommerce-order-details table.shop_table tfoot tr.order-total-row td {
    font-size: 17px;
    font-weight: 700;
    color: rgba(0,0,0,.9);
    padding-top: 14px !important;
}

/* Shipping row - label and price same weight */
.woocommerce-order-details table.shop_table tfoot tr.shipping-row th,
.woocommerce-order-details table.shop_table tfoot tr.shipping-row td {
    font-size: 14px;
    font-weight: 600;
}

/* Hide "(zawiera X VAT)" text in order total */
.woocommerce-order-details table.shop_table tfoot .includes_tax,
.woocommerce-order-details table.shop_table tfoot small.includes_tax,
.printella-order-details tfoot .includes_tax {
    display: none !important;
}

@media (max-width: 640px) {
    .woocommerce-order-details table.shop_table thead {
        display: none !important;
    }

    .woocommerce-order-details table.shop_table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
    }

    .woocommerce-order-details table.shop_table td.woocommerce-table__product-total {
        text-align: left;
        padding-top: 0 !important;
        color: rgba(0,0,0,.9);
    }
}

/* =========================
   Thank You Page - Hide payment method from order overview (moved to address section)
   ========================= */
.woocommerce-order-overview__payment-method {
    display: none !important;
}

/* Order overview: 5 columns - status gets more space */
.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
    grid-template-columns: 1fr 0.8fr 1.2fr 0.8fr 1.2fr;
}

/* Status column styling */
.woocommerce-order-overview__status strong {
    color: #79b91a;
    font-weight: 700;
    white-space: normal;
    word-break: break-word;
}

/* Status column - processing/completed state (checkmark before text) */
body.status-processing .woocommerce-order-overview__status strong::before,
body.status-completed .woocommerce-order-overview__status strong::before {
    content: "\2713";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
    vertical-align: middle;
}

/* Status column - pending/on-hold state (hourglass icon + yellow background) */
body.status-pending .woocommerce-order-overview__status strong,
body.status-on-hold .woocommerce-order-overview__status strong {
    background: #fff8e6;
    padding: 6px 12px;
    border-radius: 6px;
    color: #92400e;
}

body.status-pending .woocommerce-order-overview__status strong::before,
body.status-on-hold .woocommerce-order-overview__status strong::before {
    content: "\23F3";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    font-size: 12px;
    margin-right: 8px;
    vertical-align: middle;
}

@media (max-width: 1023px) {
    .woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   Thank You Page - Printella Order Details (with thumbnails)
   ========================= */

/* Container card */
.printella-order-details {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #afafaf;
    padding: 24px;
    margin-bottom: 24px;
}

.printella-order-details .woocommerce-order-details__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Table styles */
.printella-order-table {
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.printella-order-table thead {
    border-bottom: 1px solid rgba(0,0,0,.17);
}

.printella-order-table thead th {
    border: 0 !important;
    padding: 0 12px 14px !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    color: rgba(0,0,0,.5);
    text-align: left;
}

.printella-order-table thead th.product-thumbnail {
    width: 70px;
    padding-left: 0 !important;
}

.printella-order-table thead th.product-quantity {
    width: 70px;
    text-align: center;
}

.printella-order-table thead th.product-total {
    text-align: right;
    padding-right: 0 !important;
}

/* Table body - no alternating background, reset borders */
.printella-order-table tbody tr,
.printella-order-details table tbody tr,
.printella-order-details .printella-order-table tbody tr,
.woocommerce-table--order-details tbody tr,
table.order_details tbody tr,
table.order_details tbody tr.order_item {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* Separator only BETWEEN rows (like checkout) */
.printella-order-table tbody tr + tr,
.printella-order-details table tbody tr + tr,
.printella-order-details .printella-order-table tbody tr + tr,
.woocommerce-table--order-details tbody tr + tr,
.woocommerce-table--order-details tbody tr.order_item + tr.order_item,
table.order_details tbody tr + tr,
table.order_details tbody tr.woocommerce-table__line-item + tr.woocommerce-table__line-item {
    border-top: 1px solid rgba(0,0,0,.17) !important;
}

/* Remove any WooCommerce alternating row styles */
.printella-order-table tbody tr:nth-child(odd),
.printella-order-table tbody tr:nth-child(even),
.printella-order-table tbody tr.order_item,
.printella-order-table tbody tr.woocommerce-table__line-item {
    background: transparent !important;
    background-color: transparent !important;
}

.printella-order-table td,
.printella-order-details table td,
.printella-order-details .printella-order-table td {
    border: 0 !important;
    padding: 16px 12px !important;
    vertical-align: middle;
    background: transparent !important;
    background-color: transparent !important;
}

/* Thumbnail column */
.printella-order-table td.product-thumbnail {
    width: 70px;
    padding-left: 0 !important;
}

.printella-order-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    background: rgba(0,0,0,.03);
}

.printella-order-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0,0,0,.05);
}

/* Product name column */
.printella-order-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.printella-order-item-name {
    font-weight: 600;
    font-size: 1em;
    line-height: 1.3;
    color: rgba(0,0,0,.92);
}

.printella-order-item-name a {
    text-decoration: none !important;
    color: inherit;
}

.printella-order-item-name a:hover {
    color: #79b91a;
}

.printella-order-item-meta {
    font-size: 0.95em;
    color: rgba(0,0,0,.7);
    line-height: 1.4;
}

.printella-order-item-meta p {
    margin: 0 !important;
}

/* Variant label bold, value normal */
.printella-order-item-meta strong,
.printella-order-item-meta b {
    font-weight: 500;
}

.printella-order-item-meta .wc-item-meta,
.printella-order-details .wc-item-meta {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.printella-order-item-meta .wc-item-meta li {
    font-weight: 400;
}

.printella-order-item-meta .wc-item-meta li strong,
.printella-order-item-meta .wc-item-meta li p:first-child {
    font-weight: 500;
}

/* Quantity column */
.printella-order-table td.product-quantity {
    width: 70px;
    text-align: center;
}

.printella-order-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(0,0,0,.06);
    font-weight: 600;
    font-size: 14px;
    color: rgba(0,0,0,.8);
}

/* Total column */
.printella-order-table td.product-total {
    text-align: right;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    padding-right: 0 !important;
}

/* Table footer */
.printella-order-table tfoot {
    border-top: 1px solid rgba(0,0,0,.17);
}

.printella-order-table tfoot tr {
    border: 0 !important;
}

.printella-order-table tfoot th,
.printella-order-table tfoot td {
    border: 0 !important;
    padding: 6px 0 !important;
}

.printella-order-table tfoot th {
    font-weight: 500;
    color: rgba(0,0,0,.6);
    text-align: left;
}

.printella-order-table tfoot td {
    text-align: right;
    font-weight: 600;
}

.printella-order-table tfoot tr:last-child th,
.printella-order-table tfoot tr:last-child td {
    font-size: 17px;
    font-weight: 700;
    padding-top: 16px !important;
    color: rgba(0,0,0,.92);
}

/* Order actions */
.woocommerce-order-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,.17);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .printella-order-details {
        padding: 16px;
    }

    .printella-order-table thead {
        display: none !important;
    }

    .printella-order-table tbody tr {
        display: grid;
        grid-template-columns: 56px 1fr;
        grid-template-areas:
            "thumb name"
            "thumb qty-total";
        gap: 4px 12px;
        padding: 16px 0;
    }

    .printella-order-table td {
        padding: 0 !important;
    }

    .printella-order-table td.product-thumbnail {
        grid-area: thumb;
        width: auto;
    }

    .printella-order-table td.product-name {
        grid-area: name;
    }

    .printella-order-table td.product-quantity {
        grid-area: qty-total;
        width: auto;
        text-align: left;
    }

    .printella-order-table td.product-total {
        grid-area: qty-total;
        justify-self: end;
    }

    .printella-order-qty {
        min-width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .printella-order-table tfoot th[colspan] {
        display: none;
    }

    .printella-order-table tfoot tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* =========================
   Thank You Page - Customer Details (3 card columns)
   ========================= */
.woocommerce-customer-details .woocommerce-columns--addresses,
.woocommerce-customer-details .woocommerce-columns--3,
.woocommerce-customer-details .col3-set {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.woocommerce-customer-details .woocommerce-columns--addresses > div,
.woocommerce-customer-details .col3-set > div {
    float: none !important;
    width: auto !important;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #afafaf;
    padding: 24px !important;
}

.woocommerce-customer-details .woocommerce-column__title {
    font-weight: 600;
    margin: 0 0 16px 0;
    padding: 0;
    text-transform: none;
}

.woocommerce-customer-details address {
    font-style: normal;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(0,0,0,.9);
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Contact info section (phone + email) */
.woocommerce-customer-details--contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.1);
    font-size: 14px;
    color: rgba(0,0,0,.7);
}

.woocommerce-customer-details--contact .woocommerce-customer-details--phone,
.woocommerce-customer-details--contact .woocommerce-customer-details--email {
    display: block;
}

/* Invoice label styling */
.billing-invoice-label {
    color: rgba(0,0,0,.92);
}

.billing-nip {
    color: rgba(0,0,0,.7);
    font-size: 14px;
}

/* Payment method card styling */
.woocommerce-column--payment-method .payment-method-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.woocommerce-column--payment-method .payment-method-logo {
    width: 56px;
    height: 36px;
    object-fit: contain;
}

.woocommerce-column--payment-method .payment-method-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(0,0,0,.9);
}

/* Pay button for unpaid orders */
.woocommerce-column--payment-method .pay-button {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background: #141418;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.woocommerce-column--payment-method .pay-button:hover {
    background: #79b91a;
    color: #fff;
}

/* Shipping method card styling */
.woocommerce-column--shipping-address .shipping-method-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-column--shipping-address .shipping-method-name {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: rgba(0,0,0,.9);
}

.woocommerce-column--shipping-address .shipping-method-name strong {
    font-weight: 600;
}

/* Pickup point ID styling */
.woocommerce-column--shipping-address .pickup-point-id {
    display: inline;
    font-weight: 400;
    font-size: 15px;
    color: rgba(0,0,0,.7);
    margin-left: 6px;
}

.woocommerce-column--shipping-address .pickup-point-id::before {
    content: "•";
    margin-right: 6px;
    color: rgba(0,0,0,.4);
}

@media (max-width: 768px) {
    .woocommerce-customer-details .woocommerce-columns--addresses,
    .woocommerce-customer-details .col3-set {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================
   Order Pay Page - Printella Custom
   ========================= */
.printella-order-pay-page {
    max-width: 800px;
    margin: 0 auto;
}

.printella-order-pay-page .printella-order-details {
    margin-bottom: 32px;
}

/* Payment section */
.printella-payment-section {
    padding: 0;
}

.printella-payment-section .woocommerce-column__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
}

/* Payment methods list - matching checkout style */
.printella-payment-section ul.payment_methods {
    margin: 0 0 24px 0;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid #afafaf;
    border-radius: 18px;
    background: #f5f3ff;
    overflow: hidden;
}

.printella-payment-section ul.payment_methods li.wc_payment_method {
    padding: 18px 14px !important;
    margin: 0 -14px !important;
    border-bottom: 0 !important;
}

.printella-payment-section ul.payment_methods li.wc_payment_method + li.wc_payment_method {
    border-top: 1px solid rgba(0,0,0,.17) !important;
}

/* Radio - custom styled like checkout */
.printella-payment-section ul.payment_methods li.wc_payment_method > input[type="radio"] {
    --selected-border: #111;
    --selected-bg: #f7f7f7;

    -webkit-appearance: none;
    appearance: none;
    width: 22px !important;
    height: 22px !important;
    margin: 0 14px 0 0 !important;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.printella-payment-section ul.payment_methods li.wc_payment_method > input[type="radio"]:checked {
    border-color: var(--selected-border);
    background: var(--selected-bg);
}

.printella-payment-section ul.payment_methods li.wc_payment_method > input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--selected-border);
}

.printella-payment-section ul.payment_methods li.wc_payment_method > input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.1);
}

/* Label styling like checkout */
.printella-payment-section ul.payment_methods li.wc_payment_method > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    cursor: pointer !important;
    vertical-align: middle;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.printella-payment-section ul.payment_methods li.wc_payment_method > label img {
    display: inline-block !important;
    vertical-align: middle !important;
    max-height: 28px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

/* Payment box visibility */
.printella-payment-section ul.payment_methods li.wc_payment_method > .payment_box {
    display: none;
    margin: 12px 0 0 0 !important;
    padding: 0 0 0 36px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.printella-payment-section ul.payment_methods li.wc_payment_method > input[type="radio"]:checked ~ .payment_box {
    display: block;
}

.printella-payment-section ul.payment_methods li.wc_payment_method > .payment_box::before,
.printella-payment-section ul.payment_methods li.wc_payment_method > .payment_box::after {
    content: none !important;
    display: none !important;
}

.printella-payment-section .payment_box p {
    margin: 0;
    font-size: 14px;
    color: rgba(0,0,0,.7);
}

/* Place order row */
.printella-payment-section .place-order {
    margin-top: 24px;
}

/* Terms checkbox */
.printella-payment-section .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
}

.printella-payment-section .woocommerce-terms-and-conditions-wrapper label {
    font-size: 14px;
    color: rgba(0,0,0,.7);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .printella-payment-section ul.payment_methods {
        padding: 10px 12px;
        border-radius: 14px;
    }

    .printella-payment-section ul.payment_methods li.wc_payment_method {
        padding: 14px 12px !important;
        margin: 0 -12px !important;
    }

    .printella-payment-section .payment_box {
        padding-left: 0 !important;
    }
}
