/* ==========================================================
   Aluvidrios Cotización — Checkout Styles
   ========================================================== */

/* ---------- Progress Bar ---------- */
.alv-cot-bar {
    background: #1a2744;
    padding: 18px 24px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.alv-cot-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
}

.alv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 90px;
}

.alv-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #8899aa;
    border: 2px solid #3a4d66;
    background: transparent;
    transition: all .3s ease;
}

.alv-step-label {
    font-size: 12px;
    color: #8899aa;
    font-weight: 500;
    white-space: nowrap;
}

.alv-step--active .alv-step-circle {
    background: #e8812a;
    border-color: #e8812a;
    color: #fff;
}

.alv-step--active .alv-step-label {
    color: #fff;
    font-weight: 700;
}

.alv-step--done .alv-step-circle {
    background: transparent;
    border-color: #4caf50;
    color: #4caf50;
}

.alv-step--done .alv-step-label {
    color: #a0b0c0;
}

.alv-step-line {
    flex: 1;
    height: 2px;
    background: #3a4d66;
    min-width: 30px;
    margin: 0 6px;
    margin-bottom: 22px;
}

.alv-step-line--done {
    background: #4caf50;
}

/* ---------- Layout: main + sidebar ---------- */
.alv-cot-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .alv-cot-layout {
        grid-template-columns: 1fr;
    }

    .alv-cot-sidebar {
        order: -1;
    }
}

/* ---------- Sidebar ---------- */
.alv-cot-sidebar {
    position: sticky;
    top: 100px;
}

.alv-resumen {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.alv-resumen-header {
    background: #1a2744;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .5px;
    padding: 14px 20px;
    text-transform: uppercase;
}

.alv-resumen-items {
    padding: 16px 20px;
    max-height: 260px;
    overflow-y: auto;
}

.alv-resumen-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.alv-resumen-item:last-child {
    border-bottom: 0;
}

.alv-resumen-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.alv-resumen-name {
    font-weight: 600;
    font-size: 13px;
    color: #1a2744;
}

.alv-resumen-meta {
    font-size: 11px;
    color: #888;
}

.alv-resumen-qty {
    font-weight: 700;
    font-size: 14px;
    color: #1a2744;
    margin-left: 12px;
    white-space: nowrap;
}

.alv-resumen-totals {
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
}

.alv-resumen-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
}

.alv-resumen-row strong {
    color: #1a2744;
}

.alv-resumen-nota {
    padding: 14px 20px;
    background: #fff8ee;
    border-top: 1px solid #f0e0c0;
    font-size: 12px;
    color: #7a6530;
    line-height: 1.5;
}

/* ---------- Hide unwanted checkout elements ---------- */
#order_review_heading,
form.woocommerce-checkout .shop_table,
.woocommerce-checkout #payment {
    display: none !important;
}

/* ---------- Submit button styling ---------- */
.alv-btn-enviar-side {
    background: #e8812a !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px 32px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background .3s ease;
    width: 100%;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.woocommerce #place_order:hover {
    background: #d0711f !important;
}

/* ---------- WhatsApp button on thank-you ---------- */
.alv-wa-btn-wrap {
    margin: 20px 0;
    text-align: center;
}

.alv-wa-btn {
    display: inline-block;
    background: #25d366;
    color: #fff !important;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    text-decoration: none !important;
    transition: background .3s ease;
}

.alv-wa-btn:hover {
    background: #1fb855;
    color: #fff !important;
}

/* ---------- Checkout form refinements ---------- */
.woocommerce-checkout h3 {
    font-size: 18px;
    font-weight: 800;
    color: #1a2744;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-top: 10px;
}

/* ---------- Método de Contacto ---------- */
.alv-metodo-contacto {
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
}

.alv-mc-label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alv-mc-options {
    display: flex;
    gap: 10px;
}

.alv-mc-option {
    flex: 1;
    cursor: pointer;
}

.alv-mc-option input {
    display: none !important;
}

.alv-mc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    background: #f9fafb;
    transition: all 0.2s;
}

.alv-mc-option input:checked+.alv-mc-btn {
    background: #e8f0fe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* ---------- Cajas de Secciones (UI) ---------- */
.alv-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.alv-box h3 {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1a2744 !important;
    text-transform: uppercase;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.alv-fields-wrap {
    display: flex;
    flex-wrap: wrap;
}

.alv-fields-wrap .form-row {
    width: 100%;
}

.alv-fields-wrap .form-row-first,
.alv-fields-wrap .form-row-last {
    width: 48%;
}

@media (max-width: 768px) {

    .alv-fields-wrap .form-row-first,
    .alv-fields-wrap .form-row-last {
        width: 100%;
    }
}

/* Force 1 column layout for the entire form and all fields */
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
}

.woocommerce-checkout .woocommerce-billing-fields .form-row,
.woocommerce-checkout .woocommerce-additional-fields .form-row {
    width: 100% !important;
    float: none !important;
}

/* ---------- Layout 60/35 (Desktop) ---------- */
@media (min-width: 982px) {
    .woocommerce-checkout .col2-set {
        float: left !important;
        width: 60% !important;
        margin-right: 5% !important;
    }

    .woocommerce-checkout .woocommerce-checkout-review-order,
    .woocommerce-checkout #order_review_heading {
        float: left !important;
        width: 35% !important;
    }
}

/* Forzar col-1 y col-2 a 1 columna siempre */
.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
}

/* Radio de borde para el pago */
#add_payment_method #payment,
.woocommerce-cart #payment,
.woocommerce-checkout #payment {
    border-radius: 5px;
}