/* ==========================================
   GASEX CART V4 — PREMIUM REFINED
   Mobile First · Woo Safe · UX Retail
========================================== */


/* ===============================
   WRAPPER
================================ */

.gx-cart-wrapper {
    max-width: 1280px;
    margin: 60px auto 100px;
    padding: 0 18px;
    min-height: calc(100svh - var(--gx-nav-h, 115px) - 200px);
  }
  
  
  /* ===============================
     WOOCOMMERCE NOTICE
  ================================ */
  
  body.woocommerce-cart .woocommerce-notices-wrapper {
    max-width: 900px;
    margin: 32px auto 0;
    padding: 0 18px;
  }
  
  body.woocommerce-cart .woocommerce-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  
    border-radius: 18px;
    padding: 18px 22px;
  
    background: #f4f8ff;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--gx-shadow-sm);
  
    font-weight: 500;
    font-size: 0.95rem;
  
    animation: gxNoticeFade 0.4s ease;
  }
  
  body.woocommerce-cart .woocommerce-message::before {
    content: "✓";
    width: 22px;
    height: 22px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    background: var(--gx-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  body.woocommerce-cart .woocommerce-message .button {
    display: none !important;
  }
  
  @keyframes gxNoticeFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  
  /* ===============================
     HEADER
  ================================ */
  
  .gx-cart-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
  }

  .gx-cart-header > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .gx-cart-header--center {
    justify-content: center;
  }

  .gx-cart-header--center > div {
    align-items: center;
    text-align: center;
  }

  @media (max-width: 560px) {
    .gx-cart-header {
      flex-direction: column;
      align-items: flex-start;
    }
    .gx-cart-header--center {
      align-items: center;
    }
  }
  
  .gx-cart-subtitle {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
  }

  .gx-cart-title {
    font-size: 2rem;
    font-weight: 900;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.2;
  }
  
  
  /* ===============================
     LAYOUT
  ================================ */
  
  .gx-cart-layout {
    display: flex;
    flex-direction: column;
    gap: 50px;
  }
  
  
  /* ===============================
     PRODUCT CARD
  ================================ */
  
  .gx-cart-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
  
    padding: 24px;
    border-radius: 22px;
  
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--gx-shadow-sm);
  
    transition: 0.25s ease;
  }
  
  .gx-cart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.08);
  }
  
  .gx-cart-card + .gx-cart-card {
    margin-top: 22px;
  }
  
  
  /* ===============================
     REMOVE BUTTON
  ================================ */
  
/* ===============================
   REMOVE BUTTON — UX FIX
================================ */

.gx-cart-remove {
    position: absolute;
    top: 14px;
    right: 14px;
  
    width: 34px;
    height: 34px;
  
    display: flex;
    align-items: center;
    justify-content: center;
  
    border-radius: 50%;
  
    background: #dc2626;
    color: #fff;
  
    font-size: 14px;
    font-weight: 700;
  
    box-shadow: 0 6px 12px rgba(220,38,38,0.35);
  
    transition: all 0.2s ease;
    z-index: 10;
  }
  
  .gx-cart-remove:hover {
    background: #b91c1c;
    transform: scale(1.08);
  }
  
  .gx-cart-remove:active {
    transform: scale(0.95);
  }
  
  
  /* ===============================
     IMAGE
  ================================ */
  
  .gx-cart-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
  }
  
  .gx-cart-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  
  /* ===============================
     INFO
  ================================ */
  
  .gx-cart-card-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .gx-cart-card-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .gx-cart-product-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    color: var(--gx-text);
  }
  
  .gx-cart-product-title:hover {
    color: var(--gx-primary);
  }
  
  .gx-cart-card-meta {
    font-size: 0.82rem;
    opacity: 0.6;
  }
  
  
  /* ===============================
     PRICE / QUANTITY / SUBTOTAL
  ================================ */
  
  .gx-cart-card-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
  }
  
  .gx-cart-price {
    font-size: 0.85rem;
    opacity: 0.5;
  }
  
  .gx-cart-quantity input {
    width: 72px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--gx-border);
    background: #fafafa;
    font-weight: 700;
    text-align: center;
    transition: 0.2s ease;
  }
  
  .gx-cart-quantity input:focus {
    border-color: var(--gx-primary);
    box-shadow: 0 0 0 3px rgba(0,57,102,0.08);
    outline: none;
  }
  
  .gx-cart-subtotal {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.02em;
  }
  
  
  /* ===============================
     ACTIONS
  ================================ */
  
  .gx-cart-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  
  .gx-cart-coupon {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .gx-cart-coupon input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--gx-border);
    background: #fafafa;
  }
  
  .gx-cart-coupon input:focus {
    border-color: var(--gx-primary);
    box-shadow: 0 0 0 3px rgba(0,57,102,0.08);
    outline: none;
  }
  
  .gx-btn-secondary {
    border: 2px solid var(--gx-primary);
    background: transparent;
    color: var(--gx-primary);
    padding: 0 18px;
    height: 44px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
  }
  
  .gx-btn-secondary:hover {
    background: var(--gx-primary);
    color: #fff;
  }
  
  
  /* ===============================
     SUMMARY SIDEBAR
  ================================ */
  
  .gx-cart-summary-card {
    padding: 26px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--gx-shadow-md);
  }
  
  .gx-cart-summary-card table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .gx-cart-summary-card table tr {
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  
  .gx-cart-summary-card table th,
  .gx-cart-summary-card table td {
    padding: 12px 0;
  }
  
  .gx-cart-summary-card table td {
    text-align: right;
  }
  
  .gx-cart-summary-card .order-total th,
  .gx-cart-summary-card .order-total td {
    font-size: 1.4rem;
    font-weight: 900;
    border-bottom: none;
    padding-top: 18px;
  }
  
  .gx-cart-summary-card .order-total td {
    color: var(--gx-primary);
  }
  
  .gx-cart-summary-card .wc-proceed-to-checkout a {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 58px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--gx-primary), #6d3fd1);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    transition: 0.25s ease;
  }
  
  .gx-cart-summary-card .wc-proceed-to-checkout a:hover {
    transform: translateY(-2px);
  }
  
  .gx-cart-trust {
    margin-top: 16px;
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.6;
  }
  
  
  /* ===============================
     DESKTOP LAYOUT
  ================================ */
  
  @media (min-width: 1024px) {
  
    .gx-cart-layout {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 70px;
      align-items: start;
    }
  
    .gx-cart-card {
      display: grid;
      grid-template-columns: 140px 1fr 120px 180px;
      align-items: center;
      gap: 30px;
    }
  
    .gx-cart-card-thumb {
      aspect-ratio: 1 / 1;
      max-height: 140px;
    }
  
    .gx-cart-card-info {
      display: contents;
    }
  
    .gx-cart-card-top {
      grid-column: 2;
    }
  
    .gx-cart-price {
      grid-column: 2;
    }
  
    .gx-cart-quantity {
      grid-column: 3;
      justify-self: center;
    }
  
    .gx-cart-subtotal {
      grid-column: 4;
      justify-self: end;
    }
  
    .gx-cart-sidebar {
      position: sticky;
      top: 120px;
    }
  
  }
  
  
  /* ===============================
     EMPTY STATE
  ================================ */
  
  .gx-cart-empty-state {
    text-align: center;
    padding: 140px 20px 160px;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .gx-empty-icon {
    font-size: 84px;
    margin-bottom: 30px;
    opacity: 0.25;
  }
  
  .gx-cart-empty-state h2 {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 12px;
  }
  
  .gx-cart-empty-state p {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 40px;
  }
  
  .gx-empty-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
  }

  /* ===============================
   CHECKOUT BUTTON FIX
================================ */

.gx-cart-summary-card .wc-proceed-to-checkout a,
.gx-cart-summary-card .wc-proceed-to-checkout a:visited,
.gx-cart-summary-card .wc-proceed-to-checkout a:active,
.gx-cart-summary-card .wc-proceed-to-checkout a:focus {
  background: linear-gradient(135deg, var(--gx-primary), #6d3fd1) !important;
  color: #fff !important;
  outline: none !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

/* efecto click controlado */
.gx-cart-summary-card .wc-proceed-to-checkout a:active {
  transform: translateY(1px);
}

.gx-cart-summary-card .wc-proceed-to-checkout a:hover {
    filter: brightness(1.05);
  }

  /* ===============================
   WHOLESALE INDICATOR
================================ */

.gx-cart-wholesale-badge {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #15803d;
    background: rgba(22,163,74,0.08);
    padding: 8px 12px;
    border-radius: 12px;
    text-align: center;
    line-height: 1.4;
  }
  
  @media (min-width: 1024px) {
    .gx-cart-wholesale-badge {
      grid-column: 2 / 5;
      justify-self: start;
      text-align: left;
    }
  }


  /* ==========================================
   EMPTY CART — PROFESSIONAL STATE
========================================== */

.gx-cart-empty-wrapper {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .gx-cart-header--center {
    text-align: center;
    margin-bottom: 40px;
  }
  
  .gx-cart-empty-state {
    text-align: center;
    padding: 60px 20px 80px;
    max-width: 520px;
    margin: 0 auto;
  }
  
  .gx-empty-icon {
    font-size: 72px;
    margin-bottom: 25px;
    opacity: 0.35;
  }
  
  .gx-cart-empty-state h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
  }
  
  .gx-cart-empty-state p {
    font-size: 0.95rem;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 35px;
  }
  
  .gx-empty-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  
  /* Mobile refinement */
  @media (max-width: 640px) {
    .gx-cart-empty-wrapper {
      min-height: 65vh;
    }
  
    .gx-empty-icon {
      font-size: 60px;
    }
  
    .gx-cart-empty-state h2 {
      font-size: 1.5rem;
    }
  }

  /* ==========================================
   EMPTY CART BUTTON SYSTEM
========================================== */

.gx-cart-empty-state .gx-btn--primary {
    background: var(--gx-primary);
    border: 2px solid var(--gx-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  }
  
  .gx-cart-empty-state .gx-btn--primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
  }
  
  .gx-cart-empty-state .gx-btn--outline {
    background: #fff;
    border: 2px solid var(--gx-primary);
    color: var(--gx-primary);
  }
  
  .gx-cart-empty-state .gx-btn--outline:hover {
    background: var(--gx-primary);
    color: #fff;
  }


/* ==========================================
   VACIAR CARRITO — BOTÓN HEADER
========================================== */

.gx-cart-items-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.gx-btn-empty-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(220,38,38,0.3);
  background: transparent;
  color: rgba(185,28,28,0.75);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.gx-btn-empty-cart:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220,38,38,0.05);
}


/* ==========================================
   MODAL VACIAR CARRITO
========================================== */

.gx-empty-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.gx-empty-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.gx-empty-modal {
  background: #fff;
  border-radius: 22px;
  padding: 36px 32px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  transform: scale(0.92) translateY(14px);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.gx-empty-modal-overlay.is-open .gx-empty-modal {
  transform: scale(1) translateY(0);
}

.gx-empty-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(220,38,38,0.08);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.gx-empty-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.gx-empty-modal-desc {
  font-size: 0.88rem;
  opacity: 0.65;
  line-height: 1.55;
  margin-bottom: 28px;
}

.gx-empty-modal-actions {
  display: flex;
  gap: 10px;
}

.gx-empty-modal-cancel {
  flex: 1;
  height: 46px;
  border-radius: 14px;
  border: 1.5px solid rgba(0,0,0,0.15);
  background: transparent;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: inherit;
}

.gx-empty-modal-cancel:hover {
  border-color: rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.04);
}

.gx-empty-modal-confirm {
  flex: 1;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(220,38,38,0.28);
}

.gx-empty-modal-confirm:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(220,38,38,0.38);
}

.gx-empty-modal-confirm:disabled {
  opacity: 0.65;
  transform: none;
  cursor: not-allowed;
}