/* WooCommerce Checkout Korean Style Styling */

/* ────────────────────────────────────────────────────────
   1. Naver Pay & Buy Now Buttons (Product Detail page)
   ──────────────────────────────────────────────────────── */
.bl-fast-checkout-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
    clear: both;
    width: 100%;
}

.bl-quick-btn {
    flex: 1;
    height: 48px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.bl-quick-btn:hover {
    transform: translateY(-0.5px);
    opacity: 0.95;
}

.bl-buy-now-btn {
    background-color: #3b82f6;
    color: #ffffff !important;
    border: none;
}

.bl-buy-now-btn:hover {
    background-color: #2563eb;
}

.bl-naverpay-btn {
    background-color: #03c75a;
    color: #ffffff !important;
    border: none;
}

.bl-naverpay-btn:hover {
    background-color: #02b14f;
}

.bl-npay-logo {
    background: #ffffff;
    color: #03c75a;
    font-weight: 900;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    letter-spacing: -0.5px;
}

.bl-cart-naverpay-wrapper {
    margin-top: 15px;
}

.bl-cart-npay {
    width: 100%;
}

/* ────────────────────────────────────────────────────────
   2. Postcode Input + Search Button Row
   ──────────────────────────────────────────────────────── */
.bl-postcode-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    width: 100% !important;
    float: none !important;
    margin-bottom: 15px !important;
}

.bl-postcode-row .woocommerce-input-wrapper {
    display: flex;
    flex: 1;
    min-width: 150px;
    gap: 8px;
    align-items: center;
}

.bl-postcode-row input#billing_postcode,
.bl-postcode-row input#shipping_postcode {
    flex: 1;
    height: 46px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.bl-postcode-row input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

.bl-postcode-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: #4f46e5;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Address & Detail Fields */
#billing_address_1_field, 
#billing_address_2_field,
#shipping_address_1_field,
#shipping_address_2_field {
    width: 100% !important;
    float: none !important;
    margin-bottom: 15px !important;
}

#billing_address_1_field input,
#billing_address_2_field input,
#shipping_address_1_field input,
#shipping_address_2_field input {
    height: 46px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 0 14px !important;
    font-size: 14px !important;
}

.bl-hidden-field {
    display: none !important;
}

/* Customs Code Field */
.bl-customs-code-row {
    width: 100% !important;
    margin-bottom: 20px !important;
}

.bl-customs-code-row input {
    height: 46px !important;
    border-radius: 8px !important;
    border: 1.5px dashed #fca5a5 !important;
    background-color: #fffafb !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #b91c1c !important;
}

#bl_shipping_notes_wrapper {
    margin-bottom: 20px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#bl_shipping_notes_wrapper label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

#bl_shipping_notes_wrapper select {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background-color: #fff;
    padding: 0 12px;
    font-size: 14px;
    color: #475569;
}

/* ────────────────────────────────────────────────────────
   3. Premium Korean 2-Column Checkout Layout
   ──────────────────────────────────────────────────────── */
.bl-checkout-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    align-items: flex-start;
}

.bl-checkout-left-col {
    flex: 1;
    min-width: 0; /* Prevents overflow in flexbox */
}

.bl-checkout-right-col {
    width: 380px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.bl-sticky-box {
    position: sticky;
    top: 30px;
}

/* Adjust Checkout Headings */
.bl-checkout-left-col h3 {
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* Payment Gateway Selector styling (Korea Style Clickable Badges) */
#order_review_heading {
    display: none !important; /* Hide standard heading */
}

/* Payment list wrapper */
.woocommerce-checkout #payment {
    background: transparent !important;
    padding: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    border: none !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.woocommerce-checkout #payment ul.payment_methods li {
    margin: 0 !important;
    padding: 14px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.woocommerce-checkout #payment ul.payment_methods li:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

/* Active gateway selection styling */
.woocommerce-checkout #payment ul.payment_methods li.bl-active-payment {
    border-color: #4f46e5 !important;
    background: #f5f3ff !important;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
    margin-right: 8px !important;
}

/* Payment details box */
.woocommerce-checkout #payment div.payment_box {
    grid-column: span 2;
    background: #f1f5f9 !important;
    border-radius: 8px !important;
    padding: 14px !important;
    font-size: 12px !important;
    color: #475569 !important;
    margin-top: 8px !important;
}

.woocommerce-checkout #payment div.payment_box::before {
    display: none !important;
}

/* Order Summary Details */
.woocommerce-checkout-review-order-table {
    border: none !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13px !important;
}

.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .shipping th,
.woocommerce-checkout-review-order-table .shipping td {
    font-weight: 600 !important;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* Big Checkout Submit Button */
#place_order {
    width: 100% !important;
    height: 52px !important;
    background: #4f46e5 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
    transition: all 0.2s !important;
}

#place_order:hover {
    background: #4338ca !important;
    transform: translateY(-1px) !important;
}

/* Responsive checkout */
@media (max-width: 900px) {
    .bl-checkout-container {
        flex-direction: column;
    }
    .bl-checkout-right-col {
        width: 100%;
        position: static;
    }
    .woocommerce-checkout #payment ul.payment_methods {
        grid-template-columns: 1fr;
    }
    .woocommerce-checkout #payment div.payment_box {
        grid-column: span 1;
    }
}
