/* ==========================
   CHECKOUT — ALAS CHILD
========================== */

.woocommerce-checkout,
.checkout-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 50px;
}

.checkout-header h1 {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 12px;
}

.checkout-subtitle {
    color: #666;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}

/* ==========================
   CAMPOS DEL FORMULARIO
========================== */

.checkout-section {
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.checkout-section h3 {
    font-size: 1.3rem;
    color: var(--dark-green);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #eef4ea;
}

.woocommerce-checkout .form-row {
    margin-bottom: 18px;
}

.woocommerce-checkout label {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-container .select2-selection {
    width: 100%;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    border: 1px solid #dadada !important;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.15);
    outline: none;
}

.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    width: 48%;
}

.woocommerce-checkout .form-row-wide {
    width: 100%;
}

/* ==========================
   RESUMEN DEL PEDIDO
========================== */

.checkout-sidebar {
    position: sticky;
    top: 100px;
}

.checkout-sidebar #order_review_heading {
    font-size: 1.3rem;
    color: var(--dark-green);
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order {
    background: #f8faf6;
    padding: 32px;
    border-radius: 20px;
    border: 2px solid #e6ece5;
}

.woocommerce-checkout-review-order-table {
    border: none;
    width: 100%;
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 0;
    border-bottom: 1px solid #e6ece5;
    font-size: 0.95rem;
}

.woocommerce-checkout-review-order-table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border-bottom: 2px solid #e6ece5;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-green);
    border-bottom: none;
    padding-top: 16px;
}

.woocommerce-checkout-review-order-table .order-total td {
    color: var(--primary);
}

/* ==========================
   PAGO
========================== */

#payment {
    background: transparent;
    border-radius: 0;
    margin-top: 24px;
}

#payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

#payment .payment_methods li {
    background: #fff;
    border: 1px solid #e6ece5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}

#payment .payment_methods li label {
    font-weight: 600;
    cursor: pointer;
}

#payment .payment_box {
    background: #f8faf6;
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

#place_order {
    width: 100%;
    background: var(--primary) !important;
    border: none !important;
    padding: 18px 24px !important;
    border-radius: 999px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--dark-green) !important;
    transition: background 0.3s ease, transform 0.3s ease !important;
    cursor: pointer;
}

#place_order:hover {
    background: var(--dark-green) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #666;
}

/* ==========================
   MENSAJES
========================== */

.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info {
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.woocommerce-checkout .woocommerce-error {
    border-left: 4px solid #c44;
    background: #fff5f5;
}

.woocommerce-checkout .woocommerce-message {
    border-left: 4px solid var(--primary);
    background: #f8fff4;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
        order: -1;
    }

    .checkout-header h1 {
        font-size: 2rem;
    }

    .checkout-section {
        padding: 24px;
    }

    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100%;
    }
}

/* Acabado corporativo */
.checkout-page::before {
    content: "Datos protegidos y pago seguro";
    display: block;
    width: fit-content;
    margin: 0 auto 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef7e9;
    color: var(--dark-green);
    font-size: 0.82rem;
    font-weight: 700;
}

.woocommerce-checkout-review-order {
    box-shadow: 0 12px 36px rgba(29, 59, 32, 0.08);
}

.checkout-trust {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.checkout-trust div {
    padding: 16px;
    border: 1px solid #e6ece5;
    border-radius: 14px;
    background: #fff;
}

.checkout-trust strong,
.checkout-trust span {
    display: block;
}

.checkout-trust strong {
    color: var(--dark-green);
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.checkout-trust span {
    color: #666;
    font-size: 0.86rem;
    line-height: 1.5;
}

/* WooCommerce Checkout Block */
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary-item__description .wc-block-components-product-price,
.wc-block-components-product-metadata .wc-block-components-product-price {
    display: none !important;
}

.wc-block-components-order-summary-item__total-price {
    color: var(--primary) !important;
    font-weight: 800;
    white-space: nowrap;
}

.wc-block-components-order-summary-item__description {
    padding-right: 16px;
}
