/* =====================================================
   SURPIN - CARRITO (VISTA ESCRITORIO Y BASE)
   ===================================================== */

/* Ocultar el título "Cart" arriba */
body.page-id-69 .wp-block-inner-page-title,
body.page-id-69 h2.wp-block-post-title,
body.page-id-69 h1.wp-block-post-title,
body.page-id-69 .entry-header,
body.page-id-69 .woocommerce-products-header {
  display: none !important;
}

/* El main del carrito */
body.page-id-69 main.wp-block-group {
  padding-top: 10px !important;
  padding-bottom: 60px !important;
  background: #F5F7FA !important;
}

/* El contenedor .woocommerce (grid 2 columnas en PC) */
body.page-id-69 .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  grid-template-areas: "form totals" "empty empty";
  gap: 40px !important;
  align-items: start !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 40px 24px 80px !important;
  box-sizing: border-box !important;
}

body.page-id-69 .woocommerce > form.woocommerce-cart-form { grid-area: form !important; min-width: 0 !important; }
body.page-id-69 .woocommerce > .cart-collaterals { grid-area: totals !important; min-width: 0 !important; max-width: 380px !important; }
body.page-id-69 .woocommerce > .cart-empty { grid-area: empty !important; margin: 0 !important; }
body.page-id-69 .woocommerce > .return-to-shop { grid-area: empty !important; margin: 0 !important; }

/* --- TABLA DE PRODUCTOS (ESCRITORIO) --- */
body.page-id-69 table.shop_table.cart {
  width: 100% !important;
  background: #fff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(10, 31, 68, 0.08) !important;
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}

body.page-id-69 table.shop_table.cart thead {
  background: #0A1F44 !important;
}

body.page-id-69 table.shop_table.cart thead th {
  background: #0A1F44 !important;
  color: #fff !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  padding: 16px 20px !important;
  border: none !important;
  text-align: center !important;
}

body.page-id-69 table.shop_table.cart tbody td {
  padding: 12px 15px !important;
  border-bottom: 1px solid #F0F3F8 !important;
  color: #0A1F44 !important;
  font-family: 'Nunito Sans', sans-serif !important;
  font-size: 14px !important;
  vertical-align: middle !important;
  background: #fff !important;
  text-align: center !important;
}

body.page-id-69 table.shop_table.cart tbody tr:last-child td {
  border-bottom: none !important;
}

/* Celda eliminar (X roja) */
body.page-id-69 table.shop_table.cart .product-remove a.remove {
  color: #A0AEC0 !important;
  background: transparent !important;
  font-size: 18px !important;
  width: 28px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  text-decoration: none !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  transition: color 0.3s ease !important;
}

body.page-id-69 table.shop_table.cart .product-remove a.remove:hover {
  color: #E63946 !important;
  background: #FFF5F5 !important;
}

/* Imagen del producto */
body.page-id-69 table.shop_table.cart .product-thumbnail img {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  border: 1px solid #E5EAF3 !important;
  padding: 2px !important;
  background: #F9FAFC !important;
  display: block !important;
}

/* Nombre del producto */
body.page-id-69 table.shop_table.cart .product-name a {
  font-family: 'Nunito Sans', sans-serif !important;
  font-size: 14px !important;
  color: #0A1F44 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

/* Precio y Subtotal */
body.page-id-69 table.shop_table.cart .product-price .amount {
  font-size: 14px !important;
  color: #5C7291 !important;
  font-weight: 500 !important;
}

body.page-id-69 table.shop_table.cart .product-subtotal .amount {
  font-size: 15px !important;
  color: #0A1F44 !important;
  font-weight: 600 !important;
  font-family: 'Oswald', sans-serif !important;
}

/* Selector de Cantidad (Píldora con + y -) */
body.page-id-69 table.shop_table.cart .product-quantity .quantity {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #D5DDEE !important;
  border-radius: 20px !important;
  padding: 2px !important;
  height: 36px !important;
  width: auto !important;
  margin: 0 auto !important;
}

body.page-id-69 table.shop_table.cart .product-quantity .quantity input.qty {
  width: 32px !important;
  height: 30px !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0A1F44 !important;
  padding: 0 !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Ocultar las flechas nativas del input number */
body.page-id-69 table.shop_table.cart .product-quantity .quantity input.qty::-webkit-outer-spin-button,
body.page-id-69 table.shop_table.cart .product-quantity .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Los botones + y - */
body.page-id-69 table.shop_table.cart .product-quantity .quantity .minus,
body.page-id-69 table.shop_table.cart .product-quantity .quantity .plus {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  background: transparent !important;
  color: #0A1F44 !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border-radius: 50% !important;
  transition: background 0.2s !important;
  padding: 0 !important;
  line-height: 1 !important;
}

body.page-id-69 table.shop_table.cart .product-quantity .quantity .minus:hover,
body.page-id-69 table.shop_table.cart .product-quantity .quantity .plus:hover {
  background: #F5F7FA !important;
}

/* --- TOTALES DEL CARRITO (SIDEBAR PC) --- */
body.page-id-69 .cart-collaterals {
  width: 100% !important;
  margin: 0 !important;
}

body.page-id-69 .cart-collaterals .cart_totals {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 28px !important;
  box-shadow: 0 10px 40px rgba(10, 31, 68, 0.12) !important;
  border: 1px solid #E5EAF3 !important;
  border-top: 5px solid #0A1F44 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

body.page-id-69 .cart-collaterals .cart_totals h2 {
  font-family: 'Oswald', sans-serif !important;
  font-size: 18px !important;
  color: #0A1F44 !important;
  text-transform: uppercase !important;
  margin: 0 0 20px !important;
  padding: 0 0 12px !important;
  border-bottom: 2px solid #F5F7FA !important;
}

body.page-id-69 .cart-collaterals .cart_totals table {
  width: 100% !important;
  border: none !important;
  border-collapse: collapse !important;
}

body.page-id-69 .cart-collaterals .cart_totals table th {
  color: #5C7291 !important;
  font-size: 13px !important;
  text-align: left !important;
  padding: 10px 0 !important;
  font-weight: 500 !important;
}

body.page-id-69 .cart-collaterals .cart_totals table td {
  color: #0A1F44 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-align: right !important;
  padding: 10px 0 !important;
}

body.page-id-69 .cart-collaterals .cart_totals table tr.order-total th {
  color: #0A1F44 !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  padding-top: 15px !important;
  border-top: 1px solid #E5EAF3 !important;
}

body.page-id-69 .cart-collaterals .cart_totals table tr.order-total td .amount {
  color: #E63946 !important;
  font-size: 26px !important;
  font-weight: 700 !important;
}

/* Botón FINALIZAR COMPRA */
body.page-id-69 .cart-collaterals .wc-proceed-to-checkout a.checkout-button {
  background: #E63946 !important;
  color: #fff !important;
  padding: 18px 24px !important;
  border-radius: 10px !important;
  font-family: 'Nunito Sans', sans-serif !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  display: block !important;
  text-align: center !important;
  margin-top: 20px !important;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35) !important;
  text-decoration: none !important;
}

/* Ocultar el botón "Actualizar Carrito" */
body.page-id-69 table.shop_table.cart button[name="update_cart"] {
    display: none !important;
}

body.page-id-69 table.shop_table.cart td.actions {
    padding-top: 10px !important;
    border: none !important;
    background: transparent !important;
}

/* =====================================================
   ESTILO DE LA CAJA DE TOTALES (SOLO EN PC)
   ===================================================== */

@media (min-width: 769px) {

  /* La caja principal */
  body.page-id-69 .cart-collaterals .cart_totals {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(10, 31, 68, 0.08) !important;
    border: none !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  /* La cabecera azul (el título "TOTALES DEL CARRITO") */
  body.page-id-69 .cart-collaterals .cart_totals h2 {
    background: #0A1F44 !important;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    text-align: center !important;
    padding: 16px 20px !important;
    margin: 0 0 20px 0 !important;
    border-bottom: none !important;
  }

  /* La tabla interior */
  body.page-id-69 .cart-collaterals .cart_totals table {
    width: 100% !important;
    border: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
  }

  body.page-id-69 .cart-collaterals .cart_totals table th {
    color: #5C7291 !important;
    font-size: 13px !important;
    text-align: left !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
  }

  body.page-id-69 .cart-collaterals .cart_totals table td {
    color: #0A1F44 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: right !important;
    padding: 10px 20px !important;
  }

  /* La fila del Total (número rojo) */
  body.page-id-69 .cart-collaterals .cart_totals table tr.order-total th {
    color: #0A1F44 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding-top: 15px !important;
    border-top: 1px solid #E5EAF3 !important;
  }

  body.page-id-69 .cart-collaterals .cart_totals table tr.order-total td .amount {
    color: #E63946 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
  }

  /* El botón FINALIZAR COMPRA */
  body.page-id-69 .cart-collaterals .wc-proceed-to-checkout {
    padding: 0 20px 20px 20px !important;
  }

  body.page-id-69 .cart-collaterals .wc-proceed-to-checkout a.checkout-button {
    background: #E63946 !important;
    color: #fff !important;
    padding: 16px 24px !important;
    border-radius: 8px !important;
    font-family: 'Nunito Sans', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    display: block !important;
    text-align: center !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.25) !important;
    text-decoration: none !important;
  }
}