/* =====================================================
   GASEX CHECKOUT V4
   Alineado a Tienda Retail
===================================================== */

.gx-checkout-wrapper{
    max-width:1360px;
    margin:60px auto 120px;
    padding:0 20px;
  }

/* Auth panel — centrado vertical y horizontal, fondo blanco */
body:has(.gx-checkout-wrapper--auth) {
    background: #fff;
}

.gx-checkout-wrapper--auth {
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    min-height: calc(100svh - var(--gx-nav-h, 115px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.gx-checkout-wrapper--auth .gx-checkout-hero {
    width: 100%;
    max-width: 560px;
    margin-bottom: 32px;
}

.gx-checkout-wrapper--auth .gx-checkout-auth-wrap {
    width: 100%;
}
  
  /* =====================================================
     HERO
  ===================================================== */
  
  .gx-checkout-hero{
    margin-bottom:50px;
  }
  
  /* =====================================================
     LAYOUT
  ===================================================== */
  
  .gx-checkout-layout{
    display:flex;
    flex-direction:column;
    gap:50px;
  }
  
  @media (min-width:1024px){
    .gx-checkout-layout{
      display:grid;
      grid-template-columns:1.1fr .9fr;
      gap:70px;
      align-items:start;
    }
  
    .gx-checkout-sidebar{
      position:sticky;
      top:120px;
    }
  }
  
  /* =====================================================
     CARDS
  ===================================================== */
  
  .gx-elevated{
    background:#fff;
    border-radius:22px;
    border:1px solid rgba(0,0,0,.04);
    box-shadow:0 18px 45px rgba(0,0,0,.06);
    padding:38px;
    transition:.3s ease;
  }
  
  .gx-elevated:hover{
    box-shadow:0 22px 60px rgba(0,0,0,.08);
  }
  
  .gx-checkout-card + .gx-checkout-card{
    margin-top:40px;
  }
  
  /* =====================================================
     TITLES
  ===================================================== */
  
  .gx-section-title{
    font-family:var(--gx-font-heading);
    font-weight:900;
    font-size:1.3rem;
    margin-bottom:28px;
    position:relative;
  }
  
  .gx-section-title::after{
    content:'';
    width:40px;
    height:3px;
    background:var(--gx-primary);
    display:block;
    margin-top:12px;
    border-radius:2px;
  }
  
  /* =====================================================
     DATOS TRANSFERENCIA (BACS) — integrado con el resto de tarjetas
  ===================================================== */

  .gx-bacs-details h2{
    font-family:var(--gx-font-heading);
    font-weight:900;
    font-size:1.3rem;
    margin:0 0 28px;
    position:relative;
  }

  .gx-bacs-details h2::after{
    content:'';
    width:40px;
    height:3px;
    background:var(--gx-primary);
    display:block;
    margin-top:12px;
    border-radius:2px;
  }

  .gx-bacs-details .wc-bacs-bank-details-account-name{
    font-weight:800;
    font-size:1rem;
    margin:0 0 16px;
    color:var(--gx-text);
  }

  .gx-bacs-details ul.bacs_details{
    list-style:none;
    margin:0; padding:0;
  }

  /* Neutraliza el estilo nativo de WooCommerce para ul.order_details
     (float:left + uppercase + borde punteado) — pensado para la fila
     compacta de meta del pedido, no para esta lista de datos bancarios */
  .gx-bacs-details ul.bacs_details li{
    float:none !important;
    text-transform:none !important;
    border-right:none !important;
    padding-right:0 !important;
    margin-right:0 !important;
    font-size:.95rem !important;
    line-height:1.5 !important;
    margin-bottom:10px;
    color:var(--gx-text);
  }

  .gx-bacs-details ul.bacs_details li:last-child{
    margin-bottom:0;
  }

  .gx-bacs-details ul.bacs_details li strong{
    display:inline !important;
    font-size:1em !important;
    text-transform:none !important;
    font-weight:700;
  }

  /* =====================================================
     FORM FIELDS
  ===================================================== */
  
  .gx-checkout-wrapper label{
    font-weight:600;
    font-size:.85rem;
    margin-bottom:8px;
  }
  
  .gx-checkout-wrapper input,
  .gx-checkout-wrapper select,
  .gx-checkout-wrapper textarea{
    width:100%;
    background:#f8fafc;
    border:1px solid var(--gx-border);
    border-radius:14px;
    padding:14px 16px;
    font-size:.95rem;
    transition:.25s ease;
  }
  
  .gx-checkout-wrapper input:focus,
  .gx-checkout-wrapper select:focus,
  .gx-checkout-wrapper textarea:focus{
    background:#fff;
    border-color:var(--gx-primary);
    box-shadow:0 0 0 3px rgba(0,57,102,.08);
    outline:none;
  }
  
  /* =====================================================
     ORDER SUMMARY
  ===================================================== */
  
  .woocommerce-checkout-review-order-table{
    width:100%;
    border-collapse:collapse;
  }
  
  .woocommerce-checkout-review-order-table th,
  .woocommerce-checkout-review-order-table td{
    padding:16px 0;
    border-top:1px solid var(--gx-border);
  }
  
  
  .woocommerce-checkout-review-order-table td{
    font-weight:700;
  }
  
  .order-total th,
  .order-total td{
    border-top:2px solid var(--gx-primary);
    padding-top:24px;
  }
  
  .order-total .amount{
    font-size:1.9rem;
    font-weight:900;
    color:var(--gx-primary);
  }
  
  /* =====================================================
     BUTTON
  ===================================================== */
  
  #place_order{
    width:100%;
    height:65px;
    border-radius:50px;
    font-weight:900;
    font-size:1rem;
    letter-spacing:.8px;
    text-transform:uppercase;
    border:none;
    background:var(--gx-primary);
    color:#fff;
    box-shadow:0 14px 28px rgba(0,57,102,.25);
    transition:.3s cubic-bezier(.25,1,.5,1);
  }
  
  #place_order:hover{
    transform:translateY(-3px);
    filter:brightness(1.05);
  }
  
  /* =====================================================
     TRUST SIGNAL
  ===================================================== */
  
  .gx-checkout-trust{
    margin-top:18px;
    font-size:.8rem;
    text-align:center;
    opacity:.6;
  }

/* ===============================
   CUPÓN LIMPIO Y CENTRADO
================================ */

.woocommerce-form-coupon-toggle {
    max-width: 1280px;
    margin: 0 auto 40px;
    padding: 0 18px;
  }
  
  .woocommerce-form-coupon-toggle .woocommerce-info {
    border-radius: 20px;
    padding: 20px 24px;
    background: #f4f8ff;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--gx-shadow-sm);
  }
  
  .checkout_coupon {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .checkout_coupon input.input-text {
    flex: 1;
    min-width: 260px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--gx-border);
    padding: 0 14px;
  }
  
  .checkout_coupon button {
    height: 46px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 600;
  }

  /* Quitar icono feo Woo */
.woocommerce-form-coupon-toggle .woocommerce-info::before {
    display: none !important;
  }

  /* ===============================
   MOBILE RESUMEN SIMPLE Y CLARO
================================ */

@media (max-width: 640px) {

    .woocommerce-checkout-review-order-table {
      width: 100%;
    }
  
    .woocommerce-checkout-review-order-table thead {
      display: none;
    }
  
    .woocommerce-checkout-review-order-table tr {
      display: block;
      padding: 16px 0;
      border-bottom: 1px solid var(--gx-border);
    }
  
    .woocommerce-checkout-review-order-table td {
      display: block;
      text-align: left;
      padding: 6px 0;
      border: none;
    }
  
    .woocommerce-checkout-review-order-table .product-name {
      font-weight: 600;
      margin-bottom: 6px;
    }
  
    .woocommerce-checkout-review-order-table .product-total {
      font-weight: 700;
      text-align: left;
    }
  
    .woocommerce-checkout-review-order-table tfoot tr {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  
    .woocommerce-checkout-review-order-table .order-total {
      font-size: 1.5rem;
      font-weight: 800;
    }

    .woocommerce-checkout-review-order-table .product-total{
        text-align: right;
    }

  }

/* =====================================================
   LOGIN REQUIRED — cuando el checkout exige cuenta
===================================================== */

.gx-checkout-login-required {
    max-width: 520px;
    margin: 0 auto;
}

.gx-login-box {
    padding: 40px 36px;
    text-align: center;
}

.gx-login-box__text {
    font-size: 1rem;
    color: var(--gx-text, #1f1f1f);
    margin: 0 0 28px;
    line-height: 1.6;
}

.gx-login-box__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gx-btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--gx-primary, #003966);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s;
}

.gx-btn-primary:hover {
    background: #002a4d;
    color: #fff;
}

.gx-btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    color: var(--gx-primary, #003966);
    border: 2px solid var(--gx-primary, #003966);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.gx-btn-secondary:hover {
    background: var(--gx-primary, #003966);
    color: #fff;
}

.gx-login-box__separator {
    color: var(--gx-muted, #6b7280);
    font-size: 1.2rem;
}

/* =====================================================
   AUTH PANEL (checkout usuarios no logueados)
===================================================== */

.gx-checkout-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gx-auth-panel {
    display: block;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 57, 102, 0.10);
    padding: 36px 32px;
}

.gx-auth-panel.gx-auth-panel--hidden {
    display: none;
}

/* Evita que el navbar sticky tape el panel al hacer scrollIntoView */
#gx-auth-panel {
    scroll-margin-top: 140px;
}

/* Tabs login/registro en Mi Cuenta (woocommerce/myaccount/form-login.php) —
   IDs especificos para no tocar el #gx-auth-panel del checkout, que usa su
   propio mecanismo (.gx-auth-panel--hidden) */
#gx-panel-login:not(.is-active),
#gx-panel-register:not(.is-active) {
    display: none;
}

/* Microfrase de tranquilidad arriba de las opciones */
.gx-auth-reassurance {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Elección inicial: dos caminos con el mismo peso visual */
.gx-auth-choice {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.gx-auth-choice__card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 18px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.1s;
}

.gx-auth-choice__card:hover,
.gx-auth-choice__card:focus-visible {
    border-color: var(--gx-primary, #003966);
    box-shadow: 0 4px 16px rgba(0, 57, 102, 0.10);
}

.gx-auth-choice__card:focus-visible {
    outline: 3px solid var(--gx-primary, #003966);
    outline-offset: 2px;
}

.gx-auth-choice__card:active {
    transform: scale(0.98);
}

.gx-auth-choice__card.is-active {
    border-color: var(--gx-primary, #003966);
    background: #f5f8fb;
}

.gx-auth-choice__card.is-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Ligera ventaja visual para "Continuar sin cuenta" — sin convertirla en botón sólido */
.gx-auth-choice__card--primary {
    border-color: #c7d6e3;
    background: #fafcfd;
}

.gx-auth-choice__card--primary:hover,
.gx-auth-choice__card--primary:focus-visible {
    border-color: var(--gx-primary, #003966);
    background: #ffffff;
}

.gx-auth-choice__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gx-primary, #003966);
}

.gx-auth-choice__subtitle {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

.gx-auth-choice__cta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gx-primary, #003966);
}

@media (max-width: 560px) {
    .gx-auth-choice {
        flex-direction: column;
    }
}

/* =====================================================
   AUTH PANEL HEADER — centrado
===================================================== */

.gx-checkout-auth-header {
    text-align: center;
}

.gx-checkout-auth-header .gx-header-type1__subtitle {
    display: block;
    text-align: center;
}

/* Centra el separador ::after del header (definido en style.css como .gx-header-type1::after) */
.gx-checkout-auth-header::after {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Tabs */
.gx-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 32px;
    gap: 0;
}

.gx-auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    text-align: center;
    transition: color 0.15s;
}

/* Underline alineado bajo el texto, centrado en el tab */
.gx-auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--gx-primary, #003966);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s;
    border-radius: 2px;
}

.gx-auth-tab.is-active {
    color: var(--gx-primary, #003966);
}

.gx-auth-tab.is-active::after {
    transform: scaleX(1);
}

/* Panes */
.gx-auth-pane--hidden {
    display: none;
}

/* Campos del formulario */
.gx-auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.gx-auth-field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.83rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.gx-auth-forgot {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--gx-primary, #003966);
    text-decoration: none;
    opacity: 0.75;
}

.gx-auth-forgot:hover { opacity: 1; }

.gx-auth-field input[type="text"],
.gx-auth-field input[type="email"],
.gx-auth-field input[type="password"] {
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    background: #fafafa;
}

.gx-auth-field input:focus {
    border-color: var(--gx-primary, #003966);
    box-shadow: 0 0 0 3px rgba(0,57,102,.1);
    background: #fff;
}

/* Remember me */
.gx-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.84rem;
    color: #4b5563;
}

.gx-auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gx-primary, #003966);
    cursor: pointer;
}

/* Botón full width */
.gx-btn-full {
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

/* Tab crear cuenta */
.gx-auth-register-text {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

.gx-auth-register-note {
    margin-top: 14px;
    font-size: 0.78rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.5;
}

/* Botón volver — discreto, no compite con las dos opciones principales */
.gx-auth-back {
    text-align: center;
}

.gx-auth-back__link {
    display: inline-block;
    font-size: 0.82rem;
    color: #9ca3af;
    text-decoration: none;
}

.gx-auth-back__link:hover,
.gx-auth-back__link:focus-visible {
    color: var(--gx-primary, #003966);
    text-decoration: underline;
}

.gx-btn-ghost {
    display: inline-block;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    transition: color 0.15s, border-color 0.15s;
}

.gx-btn-ghost:hover {
    color: var(--gx-primary, #003966);
    border-color: var(--gx-primary, #003966);
}

/* Banner invitado en formulario */
.gx-checkout-guest-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 11px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #1e40af;
}

.gx-checkout-guest-banner a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
}

/* =====================================================
   THANK YOU — página pedido recibido
===================================================== */

.gx-thankyou { max-width: 700px; margin: 0 auto; }

.gx-order-overview {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.gx-order-overview li {
    background: #fff;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gx-order-overview__label {
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gx-order-overview li strong {
    font-size: 1rem;
    color: #111827;
}

/* Cards invitado — viven en el sidebar del thankyou, una columna */
.gx-thankyou-guest {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.gx-thankyou-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gx-thankyou-card--account {
    border-color: var(--gx-primary, #003966);
    background: #f0f7ff;
}

.gx-thankyou-card__icon { font-size: 1.8rem; line-height: 1; }

.gx-thankyou-card__body { display: flex; flex-direction: column; gap: 8px; }

.gx-thankyou-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.gx-thankyou-card p {
    font-size: 0.88rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

.gx-thankyou-card .gx-btn-primary,
.gx-thankyou-card .gx-btn-secondary {
    display: inline-block;
    margin-top: 4px;
    text-align: center;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.gx-thankyou-card .gx-btn-primary {
    background: var(--gx-primary, #003966);
    color: #fff;
}

.gx-thankyou-card .gx-btn-secondary {
    background: #fff;
    color: var(--gx-primary, #003966);
    border: 1.5px solid var(--gx-primary, #003966);
}

.gx-thankyou-card .gx-btn-primary:hover,
.gx-thankyou-card .gx-btn-secondary:hover { opacity: 0.85; }

/* =====================================================
   MIS COTIZACIONES (Mi Cuenta)
===================================================== */

.gx-cotizaciones__intro {
    color: var(--gx-muted, #6b7280);
    font-size: 0.95rem;
    margin: -16px 0 24px;
}

.gx-cotizaciones__empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--gx-muted, #6b7280);
}
.gx-cotizaciones__empty svg { margin-bottom: 12px; opacity: 0.5; }

.gx-cotizaciones__lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gx-cotizacion-card {
    background: var(--gx-card, #fff);
    border: 1px solid var(--gx-border, #e5e7eb);
    border-radius: var(--gx-radius-md, 12px);
    box-shadow: var(--gx-shadow-sm, 0 2px 4px rgba(0,0,0,0.05));
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.gx-cotizacion-card__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gx-cotizacion-card__numero {
    font-family: var(--gx-font-heading);
    font-size: 1rem;
    color: var(--gx-text, #1f1f1f);
}
.gx-cotizacion-card__meta {
    font-size: 0.85rem;
    color: var(--gx-muted, #6b7280);
    flex: 1 1 auto;
}
.gx-cotizacion-card__link {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gx-primary, #003966);
    text-decoration: none;
    white-space: nowrap;
}
.gx-cotizacion-card__link:hover { text-decoration: underline; }

/* Pastillas de estado — mismos colores que la vista pública de la cotización */
.gx-cotizaciones .gx-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.gx-cotizaciones .gx-badge--pending   { background: #f1f5f9; color: #475569; }
.gx-cotizaciones .gx-badge--sent      { background: #e0ecff; color: #003966; }
.gx-cotizaciones .gx-badge--approved  { background: #dcfce7; color: #15803d; }
.gx-cotizaciones .gx-badge--rejected  { background: #fee2e2; color: #b91c1c; }
.gx-cotizaciones .gx-badge--converted { background: #ede9fe; color: #6d28d9; }

@media (max-width: 480px) {
    .gx-cotizacion-card { flex-direction: column; align-items: flex-start; }
}