/* ============================================
   Checkout Page Styling
   Match Product Page & Cart (Grey BG, White Cards)
   ============================================ */

/* Remove inner shadows/backgrounds - the white card is now in page.php wrapper */
.woocommerce-checkout #customer_details {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 2rem !important;
}

/* Order Review Heading */
.woocommerce-checkout #order_review_heading {
    margin-top: 0 !important;
    padding-top: 1rem !important;
    margin-bottom: 1.5rem !important;
    color: #1d1d1d !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 1rem !important;
}

/* Order Review Table */
.woocommerce-checkout .woocommerce-checkout-review-order {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #1d1d1d !important;
    border: none !important;
}

/* Table Content - Dark Text */
.woocommerce-checkout .woocommerce-checkout-review-order .product-name,
.woocommerce-checkout .woocommerce-checkout-review-order .product-total,
.woocommerce-checkout .woocommerce-checkout-review-order .cart-subtotal,
.woocommerce-checkout .woocommerce-checkout-review-order .order-total,
.woocommerce-checkout .woocommerce-checkout-review-order table.shop_table th,
.woocommerce-checkout .woocommerce-checkout-review-order table.shop_table td {
    color: #1d1d1d !important;
    border-color: #f0f0f0 !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order .product-name {
    font-weight: 600 !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order .order-total .woocommerce-Price-amount {
    color: #000 !important;
    font-size: 1.5rem !important;
}

/* ============================================
   LAYOUT: CSS Grid - 2 columns
   Left: #customer_details (billing form)
   Right: #order_review_heading + #order_review
          (summary table + payment + button)
   ============================================ */

.woocommerce-checkout form.woocommerce-checkout {
    display: grid !important;
    grid-template-columns: 58% 1fr !important;
    gap: 0 2rem !important;
    align-items: start !important;
}

/* Left column: spans all rows */
.woocommerce-checkout form.woocommerce-checkout>#customer_details {
    grid-column: 1 !important;
    grid-row: 1 / 4 !important;
}

/* Right column: heading */
.woocommerce-checkout form.woocommerce-checkout>#order_review_heading {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

/* Right column: order review (table + #payment + button) */
.woocommerce-checkout form.woocommerce-checkout>#order_review {
    grid-column: 2 !important;
    grid-row: 2 !important;
}

/* Payment Section - inside #order_review, under the summary table */
#payment {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin-top: 2rem !important;
    border: 1px solid #e9ecef !important;
}

#payment ul.payment_methods {
    border-bottom: none !important;
    padding: 0 !important;
}

#payment ul.payment_methods li label {
    color: #1d1d1d !important;
}

#payment div.payment_box {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    color: #555 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

#payment div.payment_box::before {
    border-color: transparent transparent #ddd transparent !important;
}

/* Place Order Button - "Kupuję i płacę" */
#place_order {
    background-color: #e50000 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    width: 100% !important;
    padding: 18px 30px !important;
    font-size: 1.25rem !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    transition: all 0.3s ease !important;
    margin-top: 1.5rem !important;
}

#place_order:hover {
    background-color: #c00000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure form fields look clean */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select {
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    background: #fff !important;
}

.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .woocommerce-checkout form.woocommerce-checkout {
        display: block !important;
    }
}