.woocommerce-checkout #customer_details .woocommerce-billing-fields {
    max-width: 760px;
    margin: 0 auto 24px;
    background: #f9f6f2;
    border: 2px solid #c97a4b;
    border-radius: 14px;
    padding: 22px 22px 26px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.woocommerce-checkout #customer_details .woocommerce-billing-fields > h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #3f3f3f;
}

.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    column-gap: 26px;
    row-gap: 16px;
    margin-top: 8px;
}

.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row,
.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper .form-row {
    margin: 0;
    width: 100% !important;
    clear: none !important;
}

.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper .form-row-wide {
    grid-column: 1 / -1 !important;
}

#billing_customer_type_field .woocommerce-input-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 24px;
    row-gap: 0;
    padding: 2px 0;
}

#billing_customer_type_field .woocommerce-input-wrapper label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: #3b3b3b;
    margin: 0;
    width: auto !important;
    line-height: 1.25;
}

#billing_customer_type_field input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #c76f4e;
    margin: 0 8px 0 0 !important;
}

#billing_customer_type_field > label {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

#billing_customer_type_field br {
    display: none !important;
}

#billing_customer_type_field .woocommerce-input-wrapper > * {
    margin: 0 !important;
}

.woocommerce-checkout #ship-to-different-address {
    margin: 14px 0 18px;
    padding: 12px 16px;
    border: 2px solid #c97a4b;
    border-radius: 10px;
    background: #ffffff;
}

.woocommerce-checkout #ship-to-different-address label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.woocommerce-checkout #ship-to-different-address input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #c76f4e;
    margin: 0;
}

.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper label {
    font-weight: 700;
    color: #3f3f3f;
    margin-bottom: 6px;
}

/* --- Order review --- */
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 20px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: none;
}

.woocommerce-checkout #order_review h3,
.woocommerce-checkout .woocommerce-checkout-review-order h3 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    color: #3b3b3b;
}

.woocommerce-checkout .ccl-review-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.woocommerce-checkout .ccl-review-table thead th {
    font-size: 16px;
    font-weight: 700;
    padding: 12px 10px;
    color: #3f3f3f;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.woocommerce-checkout .ccl-review-table .ccl-remove-col {
    width: 32px;
}

.woocommerce-checkout .ccl-review-table .product-quantity {
    width: 170px;
    text-align: center;
}

.woocommerce-checkout .ccl-review-table .product-total {
    width: 140px;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    color: #3b3b3b;
}

.woocommerce-checkout .ccl-review-table tbody td {
    padding: 14px 10px;
    vertical-align: middle;
    font-size: 14px;
    color: #2f2f2f;
    border-bottom: 1px solid #ededed;
}

.woocommerce-checkout .ccl-review-table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-checkout .ccl-review-table .ccl-product {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 12px;
}

.woocommerce-checkout .ccl-review-table .ccl-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    display: block;
}

.woocommerce-checkout .ccl-review-table .ccl-title a {
    color: #2c2c2c;
    font-weight: 700;
    text-decoration: none;
}

.woocommerce-checkout .ccl-review-table .ccl-title a:hover {
    text-decoration: underline;
}

.woocommerce-checkout .ccl-review-table .ccl-remove a {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #cfcfcf;
    color: #414141;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}

.woocommerce-checkout .ccl-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.woocommerce-checkout .ccl-qty-btn {
    width: 40px;
    height: 40px;
    border: 0;
    background: #fff;
    font-size: 18px;
    color: #333;
    cursor: pointer;
}

.woocommerce-checkout .ccl-qty-btn:focus-visible {
    outline: 2px solid #7fae42;
    outline-offset: -2px;
}

.woocommerce-checkout .ccl-qty-input {
    width: 64px;
    text-align: center;
    border: 0;
    border-left: 1px solid #cfcfcf;
    border-right: 1px solid #cfcfcf;
    height: 40px;
    padding: 0;
    font-size: 15px;
}

.woocommerce-checkout .ccl-review-table tfoot th,
.woocommerce-checkout .ccl-review-table tfoot td {
    padding: 12px 10px;
    font-weight: 700;
    font-size: 15px;
    border: none;
}

.woocommerce-checkout .ccl-review-table tfoot tr {
    border-top: 1px solid #e6e6e6;
}

.woocommerce-checkout .ccl-review-table tfoot .order-total th,
.woocommerce-checkout .ccl-review-table tfoot .order-total td {
    font-size: 18px;
    color: #2d2d2d;
}

.woocommerce-checkout .ccl-review-table small,
.woocommerce-checkout .ccl-review-table .includes_tax {
    color: #666;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

/* Mini-cart table (Elementor/Woo) */
.ccl-mini-cart .ccl-review-table,
.widget_shopping_cart .ccl-review-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    table-layout: auto;
}

.ccl-mini-cart .ccl-review-table thead th,
.widget_shopping_cart .ccl-review-table thead th {
    display: none;
}

.ccl-mini-cart .ccl-review-table .ccl-remove-col,
.widget_shopping_cart .ccl-review-table .ccl-remove-col {
    width: 26px;
}

.ccl-mini-cart .ccl-review-table .product-quantity,
.widget_shopping_cart .ccl-review-table .product-quantity {
    width: 190px;
    text-align: center;
}

.ccl-mini-cart .ccl-review-table .product-total,
.widget_shopping_cart .ccl-review-table .product-total {
    width: 120px;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    color: #3b3b3b;
}

.ccl-mini-cart .ccl-review-table tbody td,
.widget_shopping_cart .ccl-review-table tbody td {
    padding: 0;
    vertical-align: middle;
    border: none;
    font-size: 15px;
    color: #2f2f2f;
}

.ccl-mini-cart .ccl-review-table tbody tr:last-child td,
.widget_shopping_cart .ccl-review-table tbody tr:last-child td {
    border-bottom: none;
}

.ccl-mini-cart .ccl-review-table .ccl-product,
.widget_shopping_cart .ccl-review-table .ccl-product {
    display: grid;
    grid-template-columns: 70px 1fr;
    align-items: center;
    gap: 12px;
}

.ccl-mini-cart .ccl-review-table .ccl-title,
.ccl-mini-cart .ccl-review-table .ccl-title a,
.widget_shopping_cart .ccl-review-table .ccl-title,
.widget_shopping_cart .ccl-review-table .ccl-title a {
    font-size: 16px;
    font-weight: 700;
    color: #2c2c2c;
    text-decoration: none;
    line-height: 1.35;
}

.ccl-mini-cart .ccl-review-table .ccl-title a:hover,
.widget_shopping_cart .ccl-review-table .ccl-title a:hover {
    text-decoration: underline;
}

.ccl-mini-cart .ccl-review-table .ccl-thumb img,
.widget_shopping_cart .ccl-review-table .ccl-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4e4e4;
    display: block;
}

.ccl-mini-cart .ccl-review-table .ccl-remove a,
.widget_shopping_cart .ccl-review-table .ccl-remove a {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #111;
    text-decoration: none;
    font-size: 22px;
    line-height: 1;
    background: transparent;
}

.ccl-mini-cart .ccl-review-table .ccl-qty-control,
.widget_shopping_cart .ccl-review-table .ccl-qty-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.ccl-mini-cart .ccl-review-table .ccl-qty-btn,
.widget_shopping_cart .ccl-review-table .ccl-qty-btn {
    width: 44px;
    height: 44px;
    background: #fff !important;
    border: 0 !important;
    font-size: 18px;
    color: #111 !important;
    cursor: pointer;
    line-height: 1;
}

.ccl-mini-cart .ccl-review-table .ccl-qty-input,
.widget_shopping_cart .ccl-review-table .ccl-qty-input {
    width: 70px;
    height: 44px;
    border: 0;
    border-left: 1px solid #1c1c1c;
    border-right: 1px solid #1c1c1c;
    text-align: center;
    font-size: 18px;
    padding: 0;
}

.widget_shopping_cart .woocommerce-mini-cart__total {
    margin: 4px 0 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
    font-weight: 700;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons.buttons {
    display: flex;
    gap: 18px;
    padding-top: 12px;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .button {
    flex: 1 1 50%;
    box-sizing: border-box;
    border-radius: 10px;
    font-weight: 700;
    padding: 20px 22px;
    font-size: 24px;
    text-align: center;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout {
    background: #78a732;
    border: 2px solid #6a972b;
    color: #fff;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout) {
    background: #fff;
    border: 2px solid #c86f33;
    color: #c86f33;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .button:hover {
    opacity: 0.94;
}

.woocommerce-checkout .wc-proceed-to-checkout,
.woocommerce-checkout #payment .place-order {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px;
}

.woocommerce-checkout .wc-proceed-to-checkout .button,
.woocommerce-checkout #payment .place-order .button {
    border-radius: 6px;
    font-weight: 700;
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.woocommerce-checkout .wc-proceed-to-checkout .button.alt,
.woocommerce-checkout #payment .place-order .button.alt {
    background: #6aa63b;
    color: #fff;
    border: 1px solid #5c8f32;
}

.woocommerce-checkout .wc-proceed-to-checkout .button:not(.alt),
.woocommerce-checkout #payment .place-order .button:not(.alt) {
    background: #fff7f2;
    color: #c76f4e;
    border: 1px solid #c76f4e;
}

.woocommerce-checkout .wc-proceed-to-checkout .button:hover,
.woocommerce-checkout #payment .place-order .button:hover {
    opacity: 0.92;
}

/* --- Mini-cart / sidebar cart (Elementor/Woo) --- */
.elementor-menu-cart__products ul.woocommerce-mini-cart {
    margin: 0;
    padding: 0;
}

.elementor-menu-cart__products ul.woocommerce-mini-cart li.woocommerce-mini-cart-item {
    list-style: none;
    display: grid;
    grid-template-columns: 32px 60px 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ededed;
}

.elementor-menu-cart__products ul.woocommerce-mini-cart li.woocommerce-mini-cart-item:last-child {
    border-bottom: 0;
}

.elementor-menu-cart__products .remove_from_cart_button {
    width: 28px;
    height: 28px;
    border: 1px solid #cfcfcf;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 16px;
    line-height: 1;
}

.elementor-menu-cart__products ul.woocommerce-mini-cart img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4e4e4;
}

.elementor-menu-cart__products ul.woocommerce-mini-cart .product-name {
    font-size: 13px;
    color: #2f2f2f;
    line-height: 1.35;
    margin: 0;
}

.elementor-menu-cart__products ul.woocommerce-mini-cart .quantity {
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    color: #4a4a4a;
    white-space: nowrap;
}

.elementor-menu-cart__footer-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.elementor-menu-cart__footer-buttons .elementor-button {
    border-radius: 6px;
    font-weight: 700;
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
}

.elementor-menu-cart__footer-buttons .elementor-button:not(.elementor-button--view-cart) {
    background: #6aa63b;
    border: 1px solid #5c8f32;
    color: #fff;
}

.elementor-menu-cart__footer-buttons .elementor-button.elementor-button--view-cart,
.elementor-menu-cart__footer-buttons .elementor-button.elementor-button--view-cart:hover,
.elementor-menu-cart__footer-buttons .elementor-button.elementor-button--view-cart:focus {
    background: #fff7f2 !important;
    border: 1px solid #CD6A2B !important;
    color: #CD6A2B !important;
    box-shadow: none !important;
}

.elementor-menu-cart__subtotal {
    padding: 12px 0 6px;
    border-top: 1px solid #ededed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #2f2f2f;
}

.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper label .required {
    color: #e04a1c;
}

.woocommerce-checkout form.checkout input.input-text,
.woocommerce-checkout form.checkout select,
.woocommerce-checkout form.checkout textarea {
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 15px;
    background: #ffffff;
    color: #2d2d2d;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.woocommerce-checkout form.checkout select {
    height: 48px;
}

.woocommerce-checkout form.checkout input.input-text:focus,
.woocommerce-checkout form.checkout select:focus,
.woocommerce-checkout form.checkout textarea:focus {
    border-color: #c76f4e;
    box-shadow: 0 0 0 3px rgba(199, 111, 78, 0.16);
    outline: none;
}

.woocommerce-checkout form.checkout input[type="radio"] {
    accent-color: #c76f4e;
    width: 18px;
    height: 18px;
}

.woocommerce-checkout form.checkout .form-row .woocommerce-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.woocommerce-checkout form.checkout .form-row input,
.woocommerce-checkout form.checkout .form-row select,
.woocommerce-checkout form.checkout .form-row textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.woocommerce-checkout form.checkout .form-row input.input-text,
.woocommerce-checkout form.checkout .form-row select,
.woocommerce-checkout form.checkout .form-row textarea {
    min-height: 46px;
}

/* Force inputs/selects inside billing grid to span full column width */
.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row input.input-text,
.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row textarea,
.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row select {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

/* tighten vertical space under labels inserted by some themes */
.woocommerce-checkout form.checkout .form-row .optional,
.woocommerce-checkout form.checkout .form-row .required {
    position: relative;
    top: 0;
}

#customer_details #billing_address_2_field {
    grid-column: 1 / -1;
}

/* ensure default WooCommerce widths do not override grid placement */
.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper .form-row-last {
    width: 100% !important;
}

@media (max-width: 640px) {
    .woocommerce-checkout #customer_details .woocommerce-billing-fields {
        padding: 18px 16px 22px;
    }

    .woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper,
    .woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr !important;
        column-gap: 0 !important;
    }

    #customer_details #billing_first_name_field,
    #customer_details #billing_postcode_field,
    #customer_details #billing_last_name_field,
    #customer_details #billing_city_field,
    #customer_details #billing_address_1_field,
    #customer_details #billing_country_field,
    #customer_details #billing_phone_field,
    #customer_details #billing_email_field,
    #customer_details #billing_nip_field,
    #customer_details #billing_company_field,
    #customer_details #billing_address_2_field {
        grid-column: 1 / -1 !important;
    }

    #billing_customer_type_field .woocommerce-input-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px 20px;
    }

    #billing_customer_type_field .woocommerce-input-wrapper label {
        font-size: 18px;
    }

    .woocommerce-checkout .ccl-review-table thead {
        display: none;
    }

    .woocommerce-checkout .ccl-review-table,
    .woocommerce-checkout .ccl-review-table tbody,
    .woocommerce-checkout .ccl-review-table tr {
        display: block;
        width: 100%;
    }

    .woocommerce-checkout .ccl-review-table tbody tr {
        border: 1px solid #ededed;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 12px;
    }

    .woocommerce-checkout .ccl-review-table tbody td {
        border: none;
        padding: 8px 0;
    }

    .woocommerce-checkout .ccl-review-table .ccl-product {
        grid-template-columns: 72px 1fr;
        gap: 10px;
    }

    .woocommerce-checkout .ccl-review-table .product-quantity,
    .woocommerce-checkout .ccl-review-table .product-total {
        width: 100%;
        text-align: left;
    }

    .woocommerce-checkout .ccl-review-table tfoot th,
    .woocommerce-checkout .ccl-review-table tfoot td {
        text-align: left;
    }
}
